@semcore/core 16.0.0-prerelease.10 → 16.0.0-prerelease.12

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 (344) hide show
  1. package/lib/{LastInteractionType.cjs → LastInteractionType.js} +1 -1
  2. package/lib/LastInteractionType.js.map +1 -0
  3. package/lib/LastInteractionType.mjs +1 -1
  4. package/lib/core-types/{Component.cjs → Component.js} +1 -1
  5. package/lib/core-types/Component.js.map +1 -0
  6. package/lib/core-types/UnknownProperties.js +2 -0
  7. package/lib/core-types/UnknownProperties.js.map +1 -0
  8. package/lib/core-types/reshadow.d.js +2 -0
  9. package/lib/core-types/reshadow.d.js.map +1 -0
  10. package/lib/core-types/{symbols.cjs → symbols.js} +1 -1
  11. package/lib/core-types/symbols.js.map +1 -0
  12. package/lib/{coreFactory.cjs → coreFactory.js} +1 -1
  13. package/lib/coreFactory.js.map +1 -0
  14. package/lib/coreFactory.mjs +5 -5
  15. package/lib/enhancement/{Children.cjs → Children.js} +1 -1
  16. package/lib/enhancement/Children.js.map +1 -0
  17. package/lib/enhancement/Children.mjs +1 -1
  18. package/lib/enhancement/{Root.cjs → Root.js} +1 -1
  19. package/lib/enhancement/Root.js.map +1 -0
  20. package/lib/enhancement/Root.mjs +3 -7
  21. package/lib/enhancement/{bindHandler.cjs → bindHandler.js} +1 -1
  22. package/lib/enhancement/bindHandler.js.map +1 -0
  23. package/lib/enhancement/{dataName.cjs → dataName.js} +1 -1
  24. package/lib/enhancement/dataName.js.map +1 -0
  25. package/lib/enhancement/{enhance.cjs → enhance.js} +1 -1
  26. package/lib/enhancement/enhance.js.map +1 -0
  27. package/lib/enhancement/{functionDefaultProps.cjs → functionDefaultProps.js} +1 -1
  28. package/lib/enhancement/functionDefaultProps.js.map +1 -0
  29. package/lib/enhancement/{hoistProps.cjs → hoistProps.js} +1 -1
  30. package/lib/enhancement/hoistProps.js.map +1 -0
  31. package/lib/enhancement/hoistProps.mjs +3 -3
  32. package/lib/enhancement/{i18n.cjs → i18n.js} +1 -1
  33. package/lib/enhancement/i18n.js.map +1 -0
  34. package/lib/enhancement/i18n.mjs +1 -1
  35. package/lib/enhancement/{inheritedName.cjs → inheritedName.js} +1 -1
  36. package/lib/enhancement/inheritedName.js.map +1 -0
  37. package/lib/enhancement/{staticChildren.cjs → staticChildren.js} +1 -1
  38. package/lib/enhancement/staticChildren.js.map +1 -0
  39. package/lib/enhancement/staticChildren.mjs +3 -3
  40. package/lib/enhancement/{style.cjs → style.js} +1 -1
  41. package/lib/enhancement/style.js.map +1 -0
  42. package/lib/enhancement/style.mjs +2 -3
  43. package/lib/enhancement/{uncontrolledProps.cjs → uncontrolledProps.js} +1 -1
  44. package/lib/enhancement/uncontrolledProps.js.map +1 -0
  45. package/lib/enhancement/uncontrolledProps.mjs +2 -2
  46. package/lib/esm/LastInteractionType.mjs +1 -1
  47. package/lib/esm/coreFactory.mjs +5 -5
  48. package/lib/esm/enhancement/Children.mjs +1 -1
  49. package/lib/esm/enhancement/Root.mjs +3 -7
  50. package/lib/esm/enhancement/hoistProps.mjs +3 -3
  51. package/lib/esm/enhancement/i18n.mjs +1 -1
  52. package/lib/esm/enhancement/staticChildren.mjs +3 -3
  53. package/lib/esm/enhancement/style.mjs +2 -3
  54. package/lib/esm/enhancement/uncontrolledProps.mjs +2 -2
  55. package/lib/esm/index.mjs +1 -0
  56. package/lib/esm/styled/index.mjs +8 -0
  57. package/lib/esm/styled/reshadow-core.mjs +219 -3
  58. package/lib/esm/utils/assignProps.mjs +86 -0
  59. package/lib/esm/utils/canUseDOM.mjs +6 -0
  60. package/lib/esm/utils/capitalizeFirstLetter.mjs +6 -0
  61. package/lib/esm/utils/createHoc.mjs +44 -0
  62. package/lib/esm/utils/enhances/WithI18n.mjs +78 -0
  63. package/lib/esm/utils/enhances/i18nEnhance.mjs +91 -0
  64. package/lib/esm/utils/getDisplayName.mjs +6 -0
  65. package/lib/esm/utils/logger.mjs +35 -0
  66. package/lib/esm/utils/pick.mjs +15 -0
  67. package/lib/esm/utils/ref.mjs +86 -0
  68. package/lib/esm/utils/use/useEnhancedEffect.mjs +6 -0
  69. package/lib/{index.cjs → index.js} +1 -1
  70. package/lib/index.js.map +1 -0
  71. package/lib/index.mjs +1 -0
  72. package/lib/{register.cjs → register.js} +1 -1
  73. package/lib/register.js.map +1 -0
  74. package/lib/styled/{index.cjs → index.js} +1 -1
  75. package/lib/styled/index.js.map +1 -0
  76. package/lib/styled/index.mjs +8 -6
  77. package/lib/styled/{reshadow-core.cjs → reshadow-core.js} +1 -1
  78. package/lib/styled/reshadow-core.js.map +1 -0
  79. package/lib/styled/reshadow-core.mjs +219 -3
  80. package/lib/styled/{sstyled.cjs → sstyled.js} +1 -1
  81. package/lib/styled/sstyled.js.map +1 -0
  82. package/lib/theme/{processor.cjs → processor.js} +1 -1
  83. package/lib/theme/processor.js.map +1 -0
  84. package/lib/theme/themes/{dark.cjs → dark.js} +1 -1
  85. package/lib/theme/themes/dark.js.map +1 -0
  86. package/lib/theme/themes/{default.cjs → default.js} +1 -1
  87. package/lib/theme/themes/default.js.map +1 -0
  88. package/lib/theme/themes/{light.cjs → light.js} +1 -1
  89. package/lib/theme/themes/light.js.map +1 -0
  90. package/lib/theme/{utils.cjs → utils.js} +1 -1
  91. package/lib/theme/utils.js.map +1 -0
  92. package/lib/utils/{CSSinJS.cjs → CSSinJS.js} +1 -1
  93. package/lib/utils/CSSinJS.js.map +1 -0
  94. package/lib/utils/{ScreenReaderOnly.cjs → ScreenReaderOnly.js} +1 -1
  95. package/lib/utils/ScreenReaderOnly.js.map +1 -0
  96. package/lib/utils/{ThemeProvider.cjs → ThemeProvider.js} +1 -1
  97. package/lib/utils/ThemeProvider.js.map +1 -0
  98. package/lib/utils/{addonText.cjs → addonText.js} +1 -1
  99. package/lib/utils/addonText.js.map +1 -0
  100. package/lib/utils/{addonTextChildren.cjs → addonTextChildren.js} +1 -1
  101. package/lib/utils/addonTextChildren.js.map +1 -0
  102. package/lib/utils/{ariaProps.cjs → ariaProps.js} +1 -1
  103. package/lib/utils/ariaProps.js.map +1 -0
  104. package/lib/utils/{assignProps.cjs → assignProps.js} +1 -1
  105. package/lib/utils/assignProps.js.map +1 -0
  106. package/lib/utils/assignProps.mjs +30 -28
  107. package/lib/utils/{canUseDOM.cjs → canUseDOM.js} +1 -1
  108. package/lib/utils/canUseDOM.js.map +1 -0
  109. package/lib/utils/canUseDOM.mjs +5 -3
  110. package/lib/utils/{capitalizeFirstLetter.cjs → capitalizeFirstLetter.js} +1 -1
  111. package/lib/utils/capitalizeFirstLetter.js.map +1 -0
  112. package/lib/utils/capitalizeFirstLetter.mjs +4 -2
  113. package/lib/utils/{color.cjs → color.js} +1 -1
  114. package/lib/utils/color.js.map +1 -0
  115. package/lib/utils/{compose.cjs → compose.js} +1 -1
  116. package/lib/utils/compose.js.map +1 -0
  117. package/lib/utils/{createHoc.cjs → createHoc.js} +1 -1
  118. package/lib/utils/createHoc.js.map +1 -0
  119. package/lib/utils/createHoc.mjs +19 -21
  120. package/lib/utils/{createUUID.cjs → createUUID.js} +1 -1
  121. package/lib/utils/createUUID.js.map +1 -0
  122. package/lib/utils/{cssToIntDefault.cjs → cssToIntDefault.js} +1 -1
  123. package/lib/utils/cssToIntDefault.js.map +1 -0
  124. package/lib/utils/enhances/{WithAutoFocus.cjs → WithAutoFocus.js} +1 -1
  125. package/lib/utils/enhances/WithAutoFocus.js.map +1 -0
  126. package/lib/utils/enhances/{WithCSS.cjs → WithCSS.js} +1 -1
  127. package/lib/utils/enhances/WithCSS.js.map +1 -0
  128. package/lib/utils/enhances/{WithI18n.cjs → WithI18n.js} +1 -1
  129. package/lib/utils/enhances/WithI18n.js.map +1 -0
  130. package/lib/utils/enhances/WithI18n.mjs +32 -37
  131. package/lib/utils/enhances/{WithKeyboardFocus.cjs → WithKeyboardFocus.js} +1 -1
  132. package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -0
  133. package/lib/utils/enhances/{WithRef.cjs → WithRef.js} +1 -1
  134. package/lib/utils/enhances/WithRef.js.map +1 -0
  135. package/lib/utils/enhances/{a11yEnhance.cjs → a11yEnhance.js} +1 -1
  136. package/lib/utils/enhances/a11yEnhance.js.map +1 -0
  137. package/lib/utils/enhances/{animatedSizeEnhance.cjs → animatedSizeEnhance.js} +1 -1
  138. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -0
  139. package/lib/utils/enhances/{autoFocusEnhance.cjs → autoFocusEnhance.js} +1 -1
  140. package/lib/utils/enhances/autoFocusEnhance.js.map +1 -0
  141. package/lib/utils/enhances/{contextEnhance.cjs → contextEnhance.js} +1 -1
  142. package/lib/utils/enhances/contextEnhance.js.map +1 -0
  143. package/lib/utils/enhances/{i18nEnhance.cjs → i18nEnhance.js} +1 -1
  144. package/lib/utils/enhances/i18nEnhance.js.map +1 -0
  145. package/lib/utils/enhances/i18nEnhance.mjs +32 -33
  146. package/lib/utils/enhances/{keyboardFocusEnhance.cjs → keyboardFocusEnhance.js} +1 -1
  147. package/lib/utils/enhances/keyboardFocusEnhance.js.map +1 -0
  148. package/lib/utils/enhances/{resolveColorEnhance.cjs → resolveColorEnhance.js} +1 -1
  149. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -0
  150. package/lib/utils/{eventEmitter.cjs → eventEmitter.js} +1 -1
  151. package/lib/utils/eventEmitter.js.map +1 -0
  152. package/lib/utils/{findComponent.cjs → findComponent.js} +1 -1
  153. package/lib/utils/findComponent.js.map +1 -0
  154. package/lib/utils/{fire.cjs → fire.js} +1 -1
  155. package/lib/utils/fire.js.map +1 -0
  156. package/lib/utils/focus-lock/{focusBorders.cjs → focusBorders.js} +1 -1
  157. package/lib/utils/focus-lock/focusBorders.js.map +1 -0
  158. package/lib/utils/focus-lock/{getFocusableIn.cjs → getFocusableIn.js} +1 -1
  159. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -0
  160. package/lib/utils/focus-lock/{isFocusInside.cjs → isFocusInside.js} +1 -1
  161. package/lib/utils/focus-lock/isFocusInside.js.map +1 -0
  162. package/lib/utils/focus-lock/{isFocusable.cjs → isFocusable.js} +1 -1
  163. package/lib/utils/focus-lock/isFocusable.js.map +1 -0
  164. package/lib/utils/focus-lock/{setFocus.cjs → setFocus.js} +1 -1
  165. package/lib/utils/focus-lock/setFocus.js.map +1 -0
  166. package/lib/utils/{getAccessibleName.cjs → getAccessibleName.js} +1 -1
  167. package/lib/utils/getAccessibleName.js.map +1 -0
  168. package/lib/utils/{getDisplayName.cjs → getDisplayName.js} +1 -1
  169. package/lib/utils/getDisplayName.js.map +1 -0
  170. package/lib/utils/getDisplayName.mjs +5 -3
  171. package/lib/utils/{getEventTarget.cjs → getEventTarget.js} +1 -1
  172. package/lib/utils/getEventTarget.js.map +1 -0
  173. package/lib/utils/{getOriginChildren.cjs → getOriginChildren.js} +1 -1
  174. package/lib/utils/getOriginChildren.js.map +1 -0
  175. package/lib/utils/{getRandomInt.cjs → getRandomInt.js} +1 -1
  176. package/lib/utils/getRandomInt.js.map +1 -0
  177. package/lib/utils/{getValue.cjs → getValue.js} +1 -1
  178. package/lib/utils/getValue.js.map +1 -0
  179. package/lib/utils/{hasLabels.cjs → hasLabels.js} +1 -1
  180. package/lib/utils/hasLabels.js.map +1 -0
  181. package/lib/utils/{hasParent.cjs → hasParent.js} +1 -1
  182. package/lib/utils/hasParent.js.map +1 -0
  183. package/lib/utils/{if.cjs → if.js} +1 -1
  184. package/lib/utils/if.js.map +1 -0
  185. package/lib/utils/{ifChildren.cjs → ifChildren.js} +1 -1
  186. package/lib/utils/ifChildren.js.map +1 -0
  187. package/lib/utils/{injectStyle.cjs → injectStyle.js} +1 -1
  188. package/lib/utils/injectStyle.js.map +1 -0
  189. package/lib/utils/{inputProps.cjs → inputProps.js} +1 -1
  190. package/lib/utils/inputProps.js.map +1 -0
  191. package/lib/utils/{isNode.cjs → isNode.js} +1 -1
  192. package/lib/utils/isNode.js.map +1 -0
  193. package/lib/utils/{isPromise.cjs → isPromise.js} +1 -1
  194. package/lib/utils/isPromise.js.map +1 -0
  195. package/lib/utils/{isRetina.cjs → isRetina.js} +1 -1
  196. package/lib/utils/isRetina.js.map +1 -0
  197. package/lib/utils/{logger.cjs → logger.js} +1 -1
  198. package/lib/utils/logger.js.map +1 -0
  199. package/lib/utils/logger.mjs +16 -13
  200. package/lib/utils/{numericChecker.cjs → numericChecker.js} +1 -1
  201. package/lib/utils/numericChecker.js.map +1 -0
  202. package/lib/utils/{ownerDocument.cjs → ownerDocument.js} +1 -1
  203. package/lib/utils/ownerDocument.js.map +1 -0
  204. package/lib/utils/{pick.cjs → pick.js} +1 -1
  205. package/lib/utils/pick.js.map +1 -0
  206. package/lib/utils/pick.mjs +4 -2
  207. package/lib/utils/{propsForElement.cjs → propsForElement.js} +1 -1
  208. package/lib/utils/propsForElement.js.map +1 -0
  209. package/lib/utils/{rafTrottle.cjs → rafTrottle.js} +1 -1
  210. package/lib/utils/rafTrottle.js.map +1 -0
  211. package/lib/utils/{reactToText.cjs → reactToText.js} +1 -1
  212. package/lib/utils/reactToText.js.map +1 -0
  213. package/lib/utils/{ref.cjs → ref.js} +1 -1
  214. package/lib/utils/ref.js.map +1 -0
  215. package/lib/utils/ref.mjs +46 -43
  216. package/lib/utils/{setRef.cjs → setRef.js} +1 -1
  217. package/lib/utils/setRef.js.map +1 -0
  218. package/lib/utils/{syncScroll.cjs → syncScroll.js} +1 -1
  219. package/lib/utils/syncScroll.js.map +1 -0
  220. package/lib/utils/{uncontroll.cjs → uncontroll.js} +1 -1
  221. package/lib/utils/uncontroll.js.map +1 -0
  222. package/lib/utils/{uniqueID.cjs → uniqueID.js} +1 -1
  223. package/lib/utils/uniqueID.js.map +1 -0
  224. package/lib/utils/use/{useColorResolver.cjs → useColorResolver.js} +1 -1
  225. package/lib/utils/use/useColorResolver.js.map +1 -0
  226. package/lib/utils/use/{useCss.cjs → useCss.js} +1 -1
  227. package/lib/utils/use/useCss.js.map +1 -0
  228. package/lib/utils/use/{useEnhancedEffect.cjs → useEnhancedEffect.js} +1 -1
  229. package/lib/utils/use/useEnhancedEffect.js.map +1 -0
  230. package/lib/utils/use/useEnhancedEffect.mjs +4 -3
  231. package/lib/utils/use/{useEventCallback.cjs → useEventCallback.js} +1 -1
  232. package/lib/utils/use/useEventCallback.js.map +1 -0
  233. package/lib/utils/use/{useEventListener.cjs → useEventListener.js} +1 -1
  234. package/lib/utils/use/useEventListener.js.map +1 -0
  235. package/lib/utils/use/{useFocusLock.cjs → useFocusLock.js} +1 -1
  236. package/lib/utils/use/useFocusLock.js.map +1 -0
  237. package/lib/utils/use/{usePreventScroll.cjs → usePreventScroll.js} +1 -1
  238. package/lib/utils/use/usePreventScroll.js.map +1 -0
  239. package/lib/utils/{useCssVariable.cjs → useCssVariable.js} +1 -1
  240. package/lib/utils/useCssVariable.js.map +1 -0
  241. package/lib/utils/{zIndexStacking.cjs → zIndexStacking.js} +1 -1
  242. package/lib/utils/zIndexStacking.js.map +1 -0
  243. package/package.json +3 -3
  244. package/vite.config.ts +1 -2
  245. package/lib/LastInteractionType.cjs.map +0 -1
  246. package/lib/core-types/Component.cjs.map +0 -1
  247. package/lib/core-types/UnknownProperties.cjs +0 -2
  248. package/lib/core-types/UnknownProperties.cjs.map +0 -1
  249. package/lib/core-types/reshadow.d.cjs +0 -2
  250. package/lib/core-types/reshadow.d.cjs.map +0 -1
  251. package/lib/core-types/symbols.cjs.map +0 -1
  252. package/lib/coreFactory.cjs.map +0 -1
  253. package/lib/enhancement/Children.cjs.map +0 -1
  254. package/lib/enhancement/Root.cjs.map +0 -1
  255. package/lib/enhancement/bindHandler.cjs.map +0 -1
  256. package/lib/enhancement/dataName.cjs.map +0 -1
  257. package/lib/enhancement/enhance.cjs.map +0 -1
  258. package/lib/enhancement/functionDefaultProps.cjs.map +0 -1
  259. package/lib/enhancement/hoistProps.cjs.map +0 -1
  260. package/lib/enhancement/i18n.cjs.map +0 -1
  261. package/lib/enhancement/inheritedName.cjs.map +0 -1
  262. package/lib/enhancement/staticChildren.cjs.map +0 -1
  263. package/lib/enhancement/style.cjs.map +0 -1
  264. package/lib/enhancement/uncontrolledProps.cjs.map +0 -1
  265. package/lib/index.cjs.map +0 -1
  266. package/lib/register.cjs.map +0 -1
  267. package/lib/styled/index.cjs.map +0 -1
  268. package/lib/styled/reshadow-core.cjs.map +0 -1
  269. package/lib/styled/sstyled.cjs.map +0 -1
  270. package/lib/theme/processor.cjs.map +0 -1
  271. package/lib/theme/themes/dark.cjs.map +0 -1
  272. package/lib/theme/themes/default.cjs.map +0 -1
  273. package/lib/theme/themes/light.cjs.map +0 -1
  274. package/lib/theme/utils.cjs.map +0 -1
  275. package/lib/utils/CSSinJS.cjs.map +0 -1
  276. package/lib/utils/ScreenReaderOnly.cjs.map +0 -1
  277. package/lib/utils/ThemeProvider.cjs.map +0 -1
  278. package/lib/utils/addonText.cjs.map +0 -1
  279. package/lib/utils/addonTextChildren.cjs.map +0 -1
  280. package/lib/utils/ariaProps.cjs.map +0 -1
  281. package/lib/utils/assignProps.cjs.map +0 -1
  282. package/lib/utils/canUseDOM.cjs.map +0 -1
  283. package/lib/utils/capitalizeFirstLetter.cjs.map +0 -1
  284. package/lib/utils/color.cjs.map +0 -1
  285. package/lib/utils/compose.cjs.map +0 -1
  286. package/lib/utils/createHoc.cjs.map +0 -1
  287. package/lib/utils/createUUID.cjs.map +0 -1
  288. package/lib/utils/cssToIntDefault.cjs.map +0 -1
  289. package/lib/utils/enhances/WithAutoFocus.cjs.map +0 -1
  290. package/lib/utils/enhances/WithCSS.cjs.map +0 -1
  291. package/lib/utils/enhances/WithI18n.cjs.map +0 -1
  292. package/lib/utils/enhances/WithKeyboardFocus.cjs.map +0 -1
  293. package/lib/utils/enhances/WithRef.cjs.map +0 -1
  294. package/lib/utils/enhances/a11yEnhance.cjs.map +0 -1
  295. package/lib/utils/enhances/animatedSizeEnhance.cjs.map +0 -1
  296. package/lib/utils/enhances/autoFocusEnhance.cjs.map +0 -1
  297. package/lib/utils/enhances/contextEnhance.cjs.map +0 -1
  298. package/lib/utils/enhances/i18nEnhance.cjs.map +0 -1
  299. package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +0 -1
  300. package/lib/utils/enhances/resolveColorEnhance.cjs.map +0 -1
  301. package/lib/utils/eventEmitter.cjs.map +0 -1
  302. package/lib/utils/findComponent.cjs.map +0 -1
  303. package/lib/utils/fire.cjs.map +0 -1
  304. package/lib/utils/focus-lock/focusBorders.cjs.map +0 -1
  305. package/lib/utils/focus-lock/getFocusableIn.cjs.map +0 -1
  306. package/lib/utils/focus-lock/isFocusInside.cjs.map +0 -1
  307. package/lib/utils/focus-lock/isFocusable.cjs.map +0 -1
  308. package/lib/utils/focus-lock/setFocus.cjs.map +0 -1
  309. package/lib/utils/getAccessibleName.cjs.map +0 -1
  310. package/lib/utils/getDisplayName.cjs.map +0 -1
  311. package/lib/utils/getEventTarget.cjs.map +0 -1
  312. package/lib/utils/getOriginChildren.cjs.map +0 -1
  313. package/lib/utils/getRandomInt.cjs.map +0 -1
  314. package/lib/utils/getValue.cjs.map +0 -1
  315. package/lib/utils/hasLabels.cjs.map +0 -1
  316. package/lib/utils/hasParent.cjs.map +0 -1
  317. package/lib/utils/if.cjs.map +0 -1
  318. package/lib/utils/ifChildren.cjs.map +0 -1
  319. package/lib/utils/injectStyle.cjs.map +0 -1
  320. package/lib/utils/inputProps.cjs.map +0 -1
  321. package/lib/utils/isNode.cjs.map +0 -1
  322. package/lib/utils/isPromise.cjs.map +0 -1
  323. package/lib/utils/isRetina.cjs.map +0 -1
  324. package/lib/utils/logger.cjs.map +0 -1
  325. package/lib/utils/numericChecker.cjs.map +0 -1
  326. package/lib/utils/ownerDocument.cjs.map +0 -1
  327. package/lib/utils/pick.cjs.map +0 -1
  328. package/lib/utils/propsForElement.cjs.map +0 -1
  329. package/lib/utils/rafTrottle.cjs.map +0 -1
  330. package/lib/utils/reactToText.cjs.map +0 -1
  331. package/lib/utils/ref.cjs.map +0 -1
  332. package/lib/utils/setRef.cjs.map +0 -1
  333. package/lib/utils/syncScroll.cjs.map +0 -1
  334. package/lib/utils/uncontroll.cjs.map +0 -1
  335. package/lib/utils/uniqueID.cjs.map +0 -1
  336. package/lib/utils/use/useColorResolver.cjs.map +0 -1
  337. package/lib/utils/use/useCss.cjs.map +0 -1
  338. package/lib/utils/use/useEnhancedEffect.cjs.map +0 -1
  339. package/lib/utils/use/useEventCallback.cjs.map +0 -1
  340. package/lib/utils/use/useEventListener.cjs.map +0 -1
  341. package/lib/utils/use/useFocusLock.cjs.map +0 -1
  342. package/lib/utils/use/usePreventScroll.cjs.map +0 -1
  343. package/lib/utils/useCssVariable.cjs.map +0 -1
  344. package/lib/utils/zIndexStacking.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import canUseDOM from "../utils/canUseDOM.ts";
4
+ import canUseDOM from "./utils/canUseDOM.mjs";
5
5
  var LastInteractionType = /* @__PURE__ */ function() {
6
6
  function LastInteractionType2() {
7
7
  _classCallCheck(this, LastInteractionType2);
@@ -12,9 +12,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
12
12
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
13
13
  import React from "react";
14
14
  import hoistNonReactStatics from "hoist-non-react-statics";
15
- import { useForkRef } from "../utils/ref.ts";
16
- import useEnhancedEffect from "../utils/use/useEnhancedEffect.ts";
17
- import _assignProps from "../utils/assignProps.ts";
15
+ import { useForkRef } from "./utils/ref.mjs";
16
+ import useEnhancedEffect from "./utils/use/useEnhancedEffect.mjs";
17
+ import assignProps$1 from "./utils/assignProps.mjs";
18
18
  import { Component } from "./core-types/Component.mjs";
19
19
  import Enhancement$1 from "./enhancement/Children.mjs";
20
20
  import Enhancement$2 from "./enhancement/Root.mjs";
@@ -28,7 +28,7 @@ import Enhancement$8 from "./enhancement/enhance.mjs";
28
28
  import Enhancement$9 from "./enhancement/style.mjs";
29
29
  import Enhancement from "./enhancement/bindHandler.mjs";
30
30
  import i18nAppLocaleEnhance from "./enhancement/i18n.mjs";
31
- import { PARENT_COMPONENTS, CORE_COMPONENT, CONTEXT_COMPONENT, CREATE_COMPONENT, CORE_AS_PROPS, CORE_INSTANCE, CORE_INIT } from "./core-types/symbols.mjs";
31
+ import { CORE_AS_PROPS, CORE_INSTANCE, CORE_INIT, CORE_COMPONENT, PARENT_COMPONENTS, CONTEXT_COMPONENT, CREATE_COMPONENT } from "./core-types/symbols.mjs";
32
32
  var _excluded = ["forwardRef"], _excluded2 = ["forwardRef", "__WRAPPER_PROPS_BIND__"], _excluded3 = ["ref"];
33
33
  function isEmptyObject(obj) {
34
34
  return Object.getOwnPropertyNames(obj).length === 0 && Object.getOwnPropertySymbols && // For IE 11
@@ -246,7 +246,7 @@ function createComposeComponent(OriginComponent, Context, enhancements) {
246
246
  }
247
247
  }
248
248
  function assignProps(p1, p2) {
249
- return _assignProps(p2, p1);
249
+ return assignProps$1(p2, p1);
250
250
  }
251
251
  function createComponent(OriginComponent) {
252
252
  var childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import React from "react";
6
- import { CONTEXT_COMPONENT, CHILDREN_COMPONENT } from "../core-types/symbols.mjs";
6
+ import { CHILDREN_COMPONENT, CONTEXT_COMPONENT } from "../core-types/symbols.mjs";
7
7
  var _excluded = ["handlers", "getters"], _excluded2 = ["handlers"];
8
8
  var CHILDREN_SELF = Symbol("CHILDREN_SELF");
9
9
  var GETTER_REG = /^get[\w]+Props$/;
@@ -2,17 +2,13 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  import React from "react";
5
- import assignProps from "../../utils/assignProps";
6
- import { useForkRef } from "../../utils/ref";
5
+ import assignProps from "../utils/assignProps.mjs";
6
+ import { useForkRef } from "../utils/ref.mjs";
7
7
  var _excluded = ["render"], _excluded2 = ["Root", "styles", "children", "Children", "forwardRef"];
8
8
  function createRootRender() {
9
9
  var Root = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
10
10
  var Tag = _ref.render, source = _objectWithoutProperties(_ref, _excluded);
11
- var _Root$props = Root.props;
12
- _Root$props.Root;
13
- _Root$props.styles;
14
- _Root$props.children;
15
- var Children = _Root$props.Children, _Root$props$forwardRe = _Root$props.forwardRef, forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe, props = _objectWithoutProperties(_Root$props, _excluded2);
11
+ var _Root$props = Root.props, _Root = _Root$props.Root, styles = _Root$props.styles, children = _Root$props.children, Children = _Root$props.Children, _Root$props$forwardRe = _Root$props.forwardRef, forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe, props = _objectWithoutProperties(_Root$props, _excluded2);
16
12
  var clearProps = Object.entries(props).reduce(function(props2, _ref2) {
17
13
  var _ref3 = _slicedToArray(_ref2, 2), name = _ref3[0], value = _ref3[1];
18
14
  if (value !== void 0) {
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
5
  import React from "react";
6
- import assignProps from "../../utils/assignProps";
7
- import useEnhancedEffect from "../../utils/use/useEnhancedEffect";
8
- import pick from "../../utils/pick";
6
+ import assignProps from "../utils/assignProps.mjs";
7
+ import useEnhancedEffect from "../utils/use/useEnhancedEffect.mjs";
8
+ import pick from "../utils/pick.mjs";
9
9
  var HOIST_CONTEXT = Symbol("HOIST_CONTEXT");
10
10
  var HOIST_SELF = Symbol("HOIST_SELF");
11
11
  var HOIST_SET = Symbol("HOIST_SET");
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import React from "react";
4
- import { Context } from "../../utils/enhances/WithI18n";
4
+ import { Context } from "../utils/enhances/WithI18n.mjs";
5
5
  var _excluded = ["locale"];
6
6
  function i18nAppLocaleEnhance() {
7
7
  return {
@@ -2,9 +2,9 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import React from "react";
5
- import assignProps from "../../utils/assignProps";
6
- import pick from "../../utils/pick";
7
- import logger from "../../utils/logger";
5
+ import assignProps from "../utils/assignProps.mjs";
6
+ import pick from "../utils/pick.mjs";
7
+ import logger from "../utils/logger.mjs";
8
8
  function assign(target, source) {
9
9
  return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
10
10
  descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
@@ -2,6 +2,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import React from "react";
5
+ import "../styled/index.mjs";
5
6
  import { STATIC_COMPONENT } from "./staticChildren.mjs";
6
7
  import { sstyled } from "../styled/sstyled.mjs";
7
8
  var _excluded = ["_styles", "styles"], _excluded2 = ["styles"];
@@ -27,9 +28,7 @@ function Enhancement(childComponents, Context) {
27
28
  return _objectSpread(_objectSpread({}, _context), {}, _defineProperty({}, STYLES_CONTEXT, this[STYLES_SELF]));
28
29
  },
29
30
  asProps: function asProps(_ref) {
30
- _ref._styles;
31
- _ref.styles;
32
- var props = _objectWithoutProperties(_ref, _excluded);
31
+ var _styles = _ref._styles, styles = _ref.styles, props = _objectWithoutProperties(_ref, _excluded);
33
32
  return _objectSpread(_objectSpread({}, props), {}, {
34
33
  styles: this[STYLES_SELF]
35
34
  });
@@ -5,8 +5,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
5
5
  import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
6
6
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
7
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
- import { callAllEventHandlers } from "../../utils/assignProps";
9
- import capitalizeFirstLetter from "../../utils/capitalizeFirstLetter";
8
+ import { callAllEventHandlers } from "../utils/assignProps.mjs";
9
+ import capitalizeFirstLetter from "../utils/capitalizeFirstLetter.mjs";
10
10
  function assign(target, source) {
11
11
  return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
12
12
  descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
package/lib/esm/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { assignProps, createBaseComponent, createComponent } from "./coreFactory.mjs";
2
+ import "./styled/index.mjs";
2
3
  import { Component, Intergalactic, Root, wrapIntergalacticComponent } from "./core-types/Component.mjs";
3
4
  import { CHILDREN_COMPONENT, CONTEXT_COMPONENT, CORE_INSTANCE, CREATE_COMPONENT, INHERITED_NAME } from "./core-types/symbols.mjs";
4
5
  import { default as default2 } from "./register.mjs";
@@ -0,0 +1,8 @@
1
+ import { css, styled, use } from "./reshadow-core.mjs";
2
+ import { sstyled } from "./sstyled.mjs";
3
+ export {
4
+ css,
5
+ sstyled,
6
+ styled,
7
+ use
8
+ };
@@ -1,5 +1,70 @@
1
- import "@babel/runtime/helpers/esm/typeof";
2
- import "@babel/runtime/helpers/esm/defineProperty";
1
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ var _Symbol = function _Symbol2(key) {
4
+ return typeof Symbol !== "undefined" ? Symbol(key) : key;
5
+ };
6
+ var KEYS = {
7
+ __id__: _Symbol("__id__"),
8
+ __store__: _Symbol("__store__"),
9
+ __prev__: _Symbol("__prev__"),
10
+ __use__: _Symbol("__use__"),
11
+ __elements__: "__elements__",
12
+ __style__: "$$style",
13
+ __styles__: "styles",
14
+ __css__: "__css__",
15
+ __hash__: "__hash__",
16
+ /**
17
+ * This prop is needed for the interop between different component frameworks
18
+ */
19
+ __classProp__: "className"
20
+ };
21
+ var index = 0;
22
+ var use = function use2(obj) {
23
+ var result = {};
24
+ result[KEYS.__use__] = obj;
25
+ return result;
26
+ };
27
+ var create = function create2(args) {
28
+ var len = args.length;
29
+ var newStyle = {};
30
+ var id = "";
31
+ var vars = null;
32
+ var uses = null;
33
+ for (var i = 0; i < len; i++) {
34
+ var _style = args[i];
35
+ if (!_style) continue;
36
+ if (!_style[KEYS.__id__]) {
37
+ _style[KEYS.__id__] = ++index;
38
+ _style[KEYS.__store__] = _defineProperty({}, "_" + _style[KEYS.__id__], _style);
39
+ }
40
+ id += "_" + _style[KEYS.__id__];
41
+ if (_style[KEYS.__style__]) {
42
+ vars = Object.assign(vars || {}, _style[KEYS.__style__]);
43
+ }
44
+ if (_style[KEYS.__use__]) {
45
+ uses = Object.assign(uses || {}, _style[KEYS.__use__]);
46
+ }
47
+ if (_style[KEYS.__store__][id]) {
48
+ newStyle = _style[KEYS.__store__][id];
49
+ continue;
50
+ }
51
+ newStyle = Object.create(newStyle);
52
+ for (var key in _style) {
53
+ if (key in KEYS) continue;
54
+ newStyle[key] = appendClassName(_style[key], newStyle[key]);
55
+ }
56
+ _style[KEYS.__store__][id] = newStyle;
57
+ newStyle[KEYS.__id__] = index;
58
+ newStyle[KEYS.__store__] = _defineProperty({}, "_" + _style[KEYS.__id__], newStyle);
59
+ }
60
+ if (vars || use) {
61
+ newStyle = Object.create(newStyle);
62
+ newStyle[KEYS.__style__] = vars;
63
+ newStyle[KEYS.__use__] = uses;
64
+ }
65
+ return newStyle;
66
+ };
67
+ var isSSR = !(typeof window !== "undefined" && window.document && window.document.createElement);
3
68
  var serverMap = {};
4
69
  var getStyles = function getStyles2() {
5
70
  return {
@@ -13,6 +78,157 @@ var getStyles = function getStyles2() {
13
78
  }
14
79
  };
15
80
  };
81
+ var clearStyles = function clearStyles2() {
82
+ serverStyles = "";
83
+ };
84
+ var RESHADOW_ID = "__reshadow__";
85
+ var appendChildToDocumentHead = function appendChildToDocumentHead2(element) {
86
+ return document.head.appendChild(element);
87
+ };
88
+ var css = function css2(code, hash) {
89
+ var id = "reshadow-".concat(hash);
90
+ if (isSSR) {
91
+ serverMap[id] = code;
92
+ return;
93
+ }
94
+ var container = document.getElementById(RESHADOW_ID);
95
+ if (!container) {
96
+ container = document.createElement("object");
97
+ container.id = RESHADOW_ID;
98
+ if (document.head) {
99
+ appendChildToDocumentHead(container);
100
+ } else {
101
+ document.addEventListener("DOMContentLoaded", function() {
102
+ appendChildToDocumentHead(container);
103
+ });
104
+ }
105
+ }
106
+ var css3 = document.getElementById(id);
107
+ if (!css3) {
108
+ css3 = document.createElement("style");
109
+ css3.id = id;
110
+ css3.type = "text/css";
111
+ container.appendChild(css3);
112
+ }
113
+ css3.innerHTML = code;
114
+ };
115
+ var styles = {};
116
+ var style;
117
+ var stack = [];
118
+ var styled = function styled2(elem) {
119
+ var curr = stack.pop() || [];
120
+ styles = curr[0] || styles;
121
+ style = curr[1] || style;
122
+ styled2[KEYS.__styles__] = styles;
123
+ styled2[KEYS.__style__] = style;
124
+ return elem;
125
+ };
126
+ styled[KEYS.__styles__] = styles;
127
+ var set = function set2(args, newStyle) {
128
+ var newStyles = create(args);
129
+ stack.push([styles, style]);
130
+ styles = newStyles;
131
+ style = newStyle;
132
+ if (styles[KEYS.__style__]) {
133
+ style = style ? Object.assign({}, style, styles[KEYS.__style__]) : styles[KEYS.__style__];
134
+ }
135
+ styled[KEYS.__styles__] = styles;
136
+ styled[KEYS.__style__] = style;
137
+ };
138
+ var USE_PREFIX = "use--";
139
+ var ELEMENT_PREFIX = "__";
140
+ var MOD_PREFIX = "_";
141
+ var MOD_SEPARATOR = "_";
142
+ var parseElement = function parseElement2(name) {
143
+ return name.replace(ELEMENT_PREFIX, "");
144
+ };
145
+ var parseAttribute = function parseAttribute2(name) {
146
+ return name.replace(MOD_PREFIX, "").split(MOD_SEPARATOR);
147
+ };
148
+ var appendClassName = function appendClassName2(className) {
149
+ var cn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
150
+ if (className) {
151
+ cn += (cn ? " " : "") + className;
152
+ }
153
+ return cn;
154
+ };
155
+ var appendElement = function appendElement2(styles2, key) {
156
+ var cn = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
157
+ return appendClassName(styles2[ELEMENT_PREFIX + key], cn);
158
+ };
159
+ var appendModifier = function appendModifier2(styles2, key, value) {
160
+ var cn = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
161
+ if (value === void 0 || value === null || value === false || value === "") return cn;
162
+ cn = appendClassName(styles2[MOD_PREFIX + key], cn);
163
+ if (typeof value === "boolean" || _typeof(value) === "object" || typeof value === "function") return cn;
164
+ cn = appendClassName(styles2[MOD_SEPARATOR + key + MOD_SEPARATOR + value], cn);
165
+ return cn;
166
+ };
167
+ function map(element) {
168
+ var currStyles = styled[KEYS.__styles__];
169
+ var nextProps = {};
170
+ var cn = appendElement(currStyles, element);
171
+ var vars = null;
172
+ var uses = currStyles[KEYS.__use__] || {};
173
+ var len = arguments.length;
174
+ var useProps;
175
+ for (var i = len - 1; i > 0; i--) {
176
+ var currProps = arguments[i];
177
+ if (!currProps) continue;
178
+ useProps = useProps || currProps[KEYS.__use__];
179
+ if (!vars && KEYS.__style__ in currProps) {
180
+ vars = styled[KEYS.__style__];
181
+ }
182
+ for (var key in currProps) {
183
+ if (key === KEYS.__use__ || key === KEYS.__style__ || key in nextProps) {
184
+ continue;
185
+ }
186
+ var value = currProps[key];
187
+ cn = appendModifier(currStyles, key, value, cn);
188
+ var valueType = _typeof(value);
189
+ if (valueType === "string" || valueType === "boolean" || valueType === "number") {
190
+ var useKey = key + "_" + value;
191
+ if (key + "_true" in uses || useKey in uses) {
192
+ cn = appendModifier(currStyles, USE_PREFIX + key, value, cn);
193
+ if (uses[useKey]) {
194
+ continue;
195
+ }
196
+ }
197
+ }
198
+ nextProps[key] = value;
199
+ }
200
+ }
201
+ if (useProps) {
202
+ for (var _key in useProps) {
203
+ var _value = useProps[_key];
204
+ cn = appendModifier(currStyles, USE_PREFIX + _key, _value, cn);
205
+ }
206
+ }
207
+ cn = appendClassName(nextProps[KEYS.__classProp__], cn);
208
+ if (cn) nextProps[KEYS.__classProp__] = cn;
209
+ if (vars) {
210
+ nextProps.style = typeof style === "string" ? vars + (nextProps.style || "") : Object.assign({}, vars, nextProps.style || {});
211
+ }
212
+ return nextProps;
213
+ }
16
214
  export {
17
- getStyles
215
+ ELEMENT_PREFIX,
216
+ KEYS,
217
+ MOD_PREFIX,
218
+ MOD_SEPARATOR,
219
+ RESHADOW_ID,
220
+ USE_PREFIX,
221
+ appendClassName,
222
+ appendElement,
223
+ appendModifier,
224
+ clearStyles,
225
+ create,
226
+ css,
227
+ getStyles,
228
+ map,
229
+ parseAttribute,
230
+ parseElement,
231
+ set,
232
+ styled,
233
+ use
18
234
  };
@@ -0,0 +1,86 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _cn from "classnames";
3
+ import "../styled/index.mjs";
4
+ import { forkRef } from "./ref.mjs";
5
+ import { sstyled } from "../styled/sstyled.mjs";
6
+ function callAllEventHandlers() {
7
+ for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
8
+ fns[_key] = arguments[_key];
9
+ }
10
+ return function() {
11
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
12
+ args[_key2] = arguments[_key2];
13
+ }
14
+ return !fns.some(function(fn) {
15
+ var result;
16
+ if (fn) {
17
+ result = fn.apply(void 0, args);
18
+ }
19
+ return typeof result === "boolean" && !result;
20
+ });
21
+ };
22
+ }
23
+ function assignHandlers(props, source) {
24
+ return Object.keys(source).reduce(function(proxySource, propName) {
25
+ if (typeof source[propName] === "function" && propName.startsWith("on")) {
26
+ proxySource[propName] = callAllEventHandlers(props[propName], source[propName]);
27
+ }
28
+ return proxySource;
29
+ }, {});
30
+ }
31
+ function assignHandlersInner(props, source) {
32
+ return Object.keys(source).reduce(function(proxySource, propName) {
33
+ if (propName !== "ref" && propName.startsWith("on")) {
34
+ if (typeof source[propName] === "function" && typeof props[propName] === "function") {
35
+ proxySource[propName] = callAllEventHandlers(props[propName], source[propName]);
36
+ } else if (typeof source[propName] === "function") {
37
+ proxySource[propName] = source[propName];
38
+ } else if (typeof props[propName] === "function") {
39
+ proxySource[propName] = props[propName];
40
+ }
41
+ }
42
+ return proxySource;
43
+ }, {});
44
+ }
45
+ function assignProps() {
46
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
47
+ var source = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
48
+ if (props === source) return props;
49
+ var newProps = _objectSpread(_objectSpread(_objectSpread({}, source), props), assignHandlersInner(props, source));
50
+ for (var _key3 in source) {
51
+ if (_key3.startsWith("use:")) {
52
+ var originalKey = _key3.slice("use:".length);
53
+ newProps[originalKey] = source[_key3];
54
+ }
55
+ }
56
+ for (var _key4 in props) {
57
+ if (_key4.startsWith("use:")) {
58
+ var _originalKey = _key4.slice("use:".length);
59
+ newProps[_originalKey] = props[_key4];
60
+ }
61
+ }
62
+ var sourceDescriptorRef = Object.getOwnPropertyDescriptor(source, "ref");
63
+ var propsDescriptorRef = Object.getOwnPropertyDescriptor(props, "ref");
64
+ if (sourceDescriptorRef !== null && sourceDescriptorRef !== void 0 && sourceDescriptorRef.configurable && propsDescriptorRef !== null && propsDescriptorRef !== void 0 && propsDescriptorRef.configurable) {
65
+ newProps.ref = forkRef(source.ref, props.ref);
66
+ }
67
+ if (props.forwardRef) {
68
+ newProps.ref = forkRef(newProps.ref, props.forwardRef);
69
+ newProps.forwardRef = newProps.ref;
70
+ }
71
+ if (source.style && props.style) {
72
+ newProps.style = _objectSpread(_objectSpread({}, source.style), props.style);
73
+ }
74
+ if (source.className) {
75
+ newProps.className = _cn(props.className, source.className);
76
+ }
77
+ if (source.styles && props.styles) {
78
+ newProps.styles = sstyled.merge(source.styles, props.styles);
79
+ }
80
+ return newProps;
81
+ }
82
+ export {
83
+ assignHandlers,
84
+ callAllEventHandlers,
85
+ assignProps as default
86
+ };
@@ -0,0 +1,6 @@
1
+ function canUseDOM() {
2
+ return !!(typeof window !== "undefined" && window.document && window.document.createElement);
3
+ }
4
+ export {
5
+ canUseDOM as default
6
+ };
@@ -0,0 +1,6 @@
1
+ function capitalizeFirstLetter(input) {
2
+ return input.charAt(0).toUpperCase() + input.slice(1);
3
+ }
4
+ export {
5
+ capitalizeFirstLetter as default
6
+ };
@@ -0,0 +1,44 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
6
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
7
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+ import React, { PureComponent } from "react";
10
+ import hoistNonReactStatics from "hoist-non-react-statics";
11
+ import getDisplayName from "./getDisplayName.mjs";
12
+ var _excluded = ["forwardedRef"];
13
+ function createHoc(EnhancedComponent) {
14
+ return function createWrapper() {
15
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
16
+ return function(WrappedComponent) {
17
+ var Component = /* @__PURE__ */ function(_PureComponent) {
18
+ _inherits(Component2, _PureComponent);
19
+ var _super = _createSuper(Component2);
20
+ function Component2() {
21
+ _classCallCheck(this, Component2);
22
+ return _super.apply(this, arguments);
23
+ }
24
+ _createClass(Component2, [{
25
+ key: "render",
26
+ value: function render() {
27
+ var _WrappedComponent$def = _objectSpread(_objectSpread({}, WrappedComponent.defaultProps), this.props), forwardedRef = _WrappedComponent$def.forwardedRef, others = _objectWithoutProperties(_WrappedComponent$def, _excluded);
28
+ return /* @__PURE__ */ React.createElement(EnhancedComponent, _extends({}, options, this.props), function(enhancedComponentProps) {
29
+ return /* @__PURE__ */ React.createElement(WrappedComponent, _extends({
30
+ forwardedRef
31
+ }, others, enhancedComponentProps));
32
+ });
33
+ }
34
+ }]);
35
+ return Component2;
36
+ }(PureComponent);
37
+ _defineProperty(Component, "displayName", getDisplayName(WrappedComponent));
38
+ return hoistNonReactStatics(Component, WrappedComponent);
39
+ };
40
+ };
41
+ }
42
+ export {
43
+ createHoc as default
44
+ };
@@ -0,0 +1,78 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
4
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
+ import React, { createContext, Component } from "react";
8
+ import createHoc from "../createHoc.mjs";
9
+ import { useAsyncI18nMessages } from "./i18nEnhance.mjs";
10
+ import { createIntlCache, createIntl } from "@formatjs/intl";
11
+ var Context = /* @__PURE__ */ createContext(void 0);
12
+ var I18nProvider = Context.Provider, I18nConsumer = Context.Consumer;
13
+ var messagesCache = createIntlCache();
14
+ function getText(dictionaries, locale) {
15
+ return function(key) {
16
+ var dictionary = dictionaries[locale];
17
+ return dictionary ? dictionary[key] : dictionaries["en"][key];
18
+ };
19
+ }
20
+ var WithI18n = /* @__PURE__ */ function(_Component) {
21
+ _inherits(WithI18n2, _Component);
22
+ var _super = _createSuper(WithI18n2);
23
+ function WithI18n2() {
24
+ var _this;
25
+ _classCallCheck(this, WithI18n2);
26
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
+ args[_key] = arguments[_key];
28
+ }
29
+ _this = _super.call.apply(_super, [this].concat(args));
30
+ _defineProperty(_assertThisInitialized(_this), "context", void 0);
31
+ _defineProperty(_assertThisInitialized(_this), "getText", function(dictionary, selfLocale) {
32
+ var _this$props = _this.props, locale = _this$props.locale, getText2 = _this$props.getText;
33
+ var contextLocale = _this.context;
34
+ return getText2(dictionary, selfLocale || locale || contextLocale);
35
+ });
36
+ return _this;
37
+ }
38
+ _createClass(WithI18n2, [{
39
+ key: "render",
40
+ value: function render() {
41
+ var _ref = this.props, children = _ref.children;
42
+ return children({
43
+ getText: this.getText
44
+ });
45
+ }
46
+ }]);
47
+ return WithI18n2;
48
+ }(Component);
49
+ _defineProperty(WithI18n, "contextType", Context);
50
+ _defineProperty(WithI18n, "defaultProps", {
51
+ getText
52
+ });
53
+ var useI18n = function useI18n2(dictionary) {
54
+ var _React$useContext;
55
+ var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en";
56
+ var fallbackDictionary = arguments.length > 2 ? arguments[2] : void 0;
57
+ var lang = (_React$useContext = React.useContext(Context)) !== null && _React$useContext !== void 0 ? _React$useContext : locale;
58
+ var resolvedDictionary = useAsyncI18nMessages(dictionary, lang, fallbackDictionary);
59
+ var intl = React.useMemo(function() {
60
+ return createIntl({
61
+ locale: lang,
62
+ messages: resolvedDictionary
63
+ }, messagesCache);
64
+ }, [resolvedDictionary, lang]);
65
+ return React.useCallback(function(messageId, variables) {
66
+ return intl.formatMessage({
67
+ id: messageId !== null && messageId !== void 0 ? messageId : ""
68
+ }, variables);
69
+ }, [intl]);
70
+ };
71
+ const WithI18n$1 = createHoc(WithI18n);
72
+ export {
73
+ Context,
74
+ I18nConsumer,
75
+ I18nProvider,
76
+ WithI18n$1 as default,
77
+ useI18n
78
+ };