@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,90 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["ref", "__animatedEnhanceInstanceId", "duration"];
5
- import React from 'react';
6
- import { useForkRef } from "../ref.mjs";
7
- import useEnhancedEffect from "../use/useEnhancedEffect.mjs";
8
- var uniqueId = 0;
9
- function animatedSizeEnhance(_ref) {
10
- var _ref$animateProps = _ref.animateProps,
11
- animateProps = _ref$animateProps === void 0 ? [] : _ref$animateProps,
12
- _ref$onChangeOf = _ref.onChangeOf,
13
- onChangeOf = _ref$onChangeOf === void 0 ? [] : _ref$onChangeOf;
14
- return function (props) {
15
- var ref = props.ref,
16
- __animatedEnhanceInstanceId = props.__animatedEnhanceInstanceId,
17
- duration = props.duration,
18
- other = _objectWithoutProperties(props, _excluded);
19
- var nodeRef = /*#__PURE__*/React.createRef();
20
- var lastSizesRef = React.useRef([]);
21
- var prevPropsRef = React.useRef(props);
22
- var animatedSizeInstanceIdRef = React.useRef(uniqueId++);
23
- prevPropsRef.current = props;
24
- useEnhancedEffect(function () {
25
- if (props.animationsDisabled) return;
26
- if (__animatedEnhanceInstanceId !== undefined && __animatedEnhanceInstanceId !== animatedSizeInstanceIdRef.current) return;
27
- if (!nodeRef.current) {
28
- return;
29
- }
30
- var node = nodeRef.current;
31
- if (lastSizesRef.current.every(function (value) {
32
- return value === undefined;
33
- })) {
34
- for (var i = 0; i < animateProps.length; i++) {
35
- lastSizesRef.current[i] = node.getBoundingClientRect()[animateProps[i]];
36
- }
37
- return;
38
- }
39
- var sizes = [];
40
- for (var _i2 = 0; _i2 < animateProps.length; _i2++) {
41
- sizes[_i2] = node.getBoundingClientRect()[animateProps[_i2]];
42
- if (Math.abs(lastSizesRef.current[_i2] - sizes[_i2]) < 3 || node.style.getPropertyValue(animateProps[_i2]).endsWith('%')) {
43
- lastSizesRef.current[_i2] = sizes[_i2];
44
- sizes[_i2] = undefined;
45
- }
46
- }
47
- if (sizes.every(function (value) {
48
- return value === undefined;
49
- })) return;
50
- node.style.transition = 'none';
51
- for (var _i4 = 0; _i4 < animateProps.length; _i4++) {
52
- node.style[animateProps[_i4]] = "".concat(lastSizesRef.current[_i4], "px");
53
- }
54
- var timeout = -1;
55
- var handleTransitionEnd = function handleTransitionEnd() {
56
- clearTimeout(timeout);
57
- if (!node) return;
58
- node.style.transition = null;
59
- for (var _i6 = 0; _i6 < animateProps.length; _i6++) {
60
- node.style[animateProps[_i6]] = null;
61
- }
62
- node.removeEventListener('transitionend', handleTransitionEnd);
63
- node.removeEventListener('transitioncancel', handleTransitionEnd);
64
- };
65
- var animationFrame = requestAnimationFrame(function () {
66
- if (!node) return;
67
- node.addEventListener('transitionend', handleTransitionEnd);
68
- node.addEventListener('transitioncancel', handleTransitionEnd);
69
- node.style.transition = "".concat(duration, "ms all ease-in-out");
70
- for (var _i8 = 0; _i8 < animateProps.length; _i8++) {
71
- lastSizesRef.current[_i8] = sizes[_i8];
72
- node.style[animateProps[_i8]] = "".concat(sizes[_i8], "px");
73
- }
74
- });
75
- timeout = setTimeout(handleTransitionEnd, 500);
76
- return function () {
77
- cancelAnimationFrame(animationFrame);
78
- handleTransitionEnd();
79
- };
80
- }, [__animatedEnhanceInstanceId, props.animationsDisabled, duration].concat(_toConsumableArray(onChangeOf.map(function (propName) {
81
- return props[propName];
82
- }))));
83
- return _objectSpread({
84
- ref: useForkRef(ref, nodeRef),
85
- __animatedEnhanceInstanceId: __animatedEnhanceInstanceId !== null && __animatedEnhanceInstanceId !== void 0 ? __animatedEnhanceInstanceId : animatedSizeInstanceIdRef.current
86
- }, other);
87
- };
88
- }
89
- export default animatedSizeEnhance;
90
- //# sourceMappingURL=animatedSizeEnhance.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animatedSizeEnhance.mjs","names":["React","useForkRef","useEnhancedEffect","uniqueId","animatedSizeEnhance","_ref","_ref$animateProps","animateProps","_ref$onChangeOf","onChangeOf","props","ref","__animatedEnhanceInstanceId","duration","other","_objectWithoutProperties","_excluded","nodeRef","createRef","lastSizesRef","useRef","prevPropsRef","animatedSizeInstanceIdRef","current","animationsDisabled","undefined","node","every","value","i","length","getBoundingClientRect","sizes","Math","abs","style","getPropertyValue","endsWith","transition","concat","timeout","handleTransitionEnd","clearTimeout","removeEventListener","animationFrame","requestAnimationFrame","addEventListener","setTimeout","cancelAnimationFrame","_toConsumableArray","map","propName","_objectSpread"],"sources":["../../../src/utils/enhances/animatedSizeEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport { useForkRef } from '../ref';\nimport useEnhancedEffect from '../use/useEnhancedEffect';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IWithAnimatedSizeEnhanceProps\n extends WithAnimatedSizeEnhanceProps,\n UnknownProperties {}\nexport type WithAnimatedSizeEnhanceProps = {\n animationsDisabled?: boolean;\n};\n\nlet uniqueId = 0;\n\nfunction animatedSizeEnhance({\n animateProps = [],\n onChangeOf = [],\n}: {\n animateProps: ('width' | 'height')[];\n onChangeOf: string[];\n}) {\n return (props: any) => {\n const { ref, __animatedEnhanceInstanceId, duration, ...other } = props;\n const nodeRef = React.createRef<HTMLElement>();\n const lastSizesRef = React.useRef<(number | undefined)[]>([]);\n const prevPropsRef = React.useRef(props);\n const animatedSizeInstanceIdRef = React.useRef(uniqueId++);\n\n prevPropsRef.current = props;\n\n useEnhancedEffect(() => {\n if (props.animationsDisabled) return;\n if (\n __animatedEnhanceInstanceId !== undefined &&\n __animatedEnhanceInstanceId !== animatedSizeInstanceIdRef.current\n )\n return;\n if (!nodeRef.current) {\n return;\n }\n const node = nodeRef.current;\n if (lastSizesRef.current.every((value) => value === undefined)) {\n for (let i = 0; i < animateProps.length; i++) {\n lastSizesRef.current[i] = node.getBoundingClientRect()[animateProps[i]];\n }\n return;\n }\n\n const sizes: (number | undefined)[] = [];\n for (let i = 0; i < animateProps.length; i++) {\n sizes[i] = node.getBoundingClientRect()[animateProps[i]];\n if (\n Math.abs(lastSizesRef.current[i]! - sizes[i]!) < 3 ||\n node.style.getPropertyValue(animateProps[i]).endsWith('%')\n ) {\n lastSizesRef.current[i] = sizes[i];\n sizes[i] = undefined;\n }\n }\n if (sizes.every((value) => value === undefined)) return;\n\n node.style.transition = 'none';\n for (let i = 0; i < animateProps.length; i++) {\n node.style[animateProps[i]] = `${lastSizesRef.current[i]}px`;\n }\n let timeout = -1;\n const handleTransitionEnd = () => {\n clearTimeout(timeout);\n if (!node) return;\n node.style.transition = null as any;\n for (let i = 0; i < animateProps.length; i++) {\n node.style[animateProps[i]] = null as any;\n }\n node.removeEventListener('transitionend', handleTransitionEnd);\n node.removeEventListener('transitioncancel', handleTransitionEnd);\n };\n const animationFrame = requestAnimationFrame(() => {\n if (!node) return;\n node.addEventListener('transitionend', handleTransitionEnd);\n node.addEventListener('transitioncancel', handleTransitionEnd);\n node.style.transition = `${duration}ms all ease-in-out`;\n for (let i = 0; i < animateProps.length; i++) {\n lastSizesRef.current[i] = sizes[i];\n node.style[animateProps[i]] = `${sizes[i]}px`;\n }\n });\n timeout = setTimeout(handleTransitionEnd, 500) as any;\n return () => {\n cancelAnimationFrame(animationFrame);\n handleTransitionEnd();\n };\n }, [\n __animatedEnhanceInstanceId,\n props.animationsDisabled,\n duration,\n ...onChangeOf.map((propName) => props[propName]),\n ]);\n\n return {\n ref: useForkRef(ref, nodeRef),\n __animatedEnhanceInstanceId: __animatedEnhanceInstanceId ?? animatedSizeInstanceIdRef.current,\n ...other,\n };\n };\n}\n\nexport default animatedSizeEnhance;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,YAAQ;AACnC,OAAOC,iBAAiB,MAAM,8BAA0B;AAWxD,IAAIC,QAAQ,GAAG,CAAC;AAEhB,SAASC,mBAAmBA,CAAAC,IAAA,EAMzB;EAAA,IAAAC,iBAAA,GAAAD,IAAA,CALDE,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,EAAE,GAAAA,iBAAA;IAAAE,eAAA,GAAAH,IAAA,CACjBI,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,EAAE,GAAAA,eAAA;EAKf,OAAO,UAACE,KAAU,EAAK;IACrB,IAAQC,GAAG,GAAsDD,KAAK,CAA9DC,GAAG;MAAEC,2BAA2B,GAAyBF,KAAK,CAAzDE,2BAA2B;MAAEC,QAAQ,GAAeH,KAAK,CAA5BG,QAAQ;MAAKC,KAAK,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA;IACtE,IAAMC,OAAO,gBAAGjB,KAAK,CAACkB,SAAS,EAAe;IAC9C,IAAMC,YAAY,GAAGnB,KAAK,CAACoB,MAAM,CAAyB,EAAE,CAAC;IAC7D,IAAMC,YAAY,GAAGrB,KAAK,CAACoB,MAAM,CAACV,KAAK,CAAC;IACxC,IAAMY,yBAAyB,GAAGtB,KAAK,CAACoB,MAAM,CAACjB,QAAQ,EAAE,CAAC;IAE1DkB,YAAY,CAACE,OAAO,GAAGb,KAAK;IAE5BR,iBAAiB,CAAC,YAAM;MACtB,IAAIQ,KAAK,CAACc,kBAAk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AAY,CAACI,OAAO,CAACM,GAAC,CAAC,GAAGG,KAAK,CAACH,GAAC,CAAC;UAClCH,IAAI,CAACS,KAAK,CAAC5B,YAAY,CAACsB,GAAC,CAAC,CAAC,MAAAU,MAAA,CAAMP,KAAK,CAACH,GAAC,CAAC,OAAI;QAC/C;MACF,CAAC,CAAC;MACFW,OAAO,GAAGO,UAAU,CAACN,mBAAmB,EAAE,GAAG,CAAQ;MACrD,OAAO,YAAM;QACXO,oBAAoB,CAACJ,cAAc,CAAC;QACpCH,mBAAmB,EAAE;MACvB,CAAC;IACH,CAAC,GACC7B,2BAA2B,EAC3BF,KAAK,CAACc,kBAAkB,EACxBX,QAAQ,EAAA0B,MAAA,CAAAU,kBAAA,CACLxC,UAAU,CAACyC,GAAG,CAAC,UAACC,QAAQ;MAAA,OAAKzC,KAAK,CAACyC,QAAQ,CAAC;IAAA,EAAC,GAChD;IAEF,OAAAC,aAAA;MACEzC,GAAG,EAAEV,UAAU,CAACU,GAAG,EAAEM,OAAO,CAAC;MAC7BL,2BAA2B,EAAEA,2BAA2B,aAA3BA,2BAA2B,cAA3BA,2BAA2B,GAAIU,yBAAyB,CAACC;IAAO,GAC1FT,KAAK;EAEZ,CAAC;AACH;AAEA,eAAeV,mBAAmB"}
@@ -1,46 +0,0 @@
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 _ref = require("../ref");
12
- var _excluded = ["autoFocus", "ref"];
13
- function notUsingNativeAutoFocus(autoFocus) {
14
- return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';
15
- }
16
-
17
- /** @deprecated */
18
-
19
- function autoFocusEnhance() {
20
- return function (props) {
21
- var autoFocus = props.autoFocus,
22
- ref = props.ref,
23
- other = (0, _objectWithoutProperties2["default"])(props, _excluded);
24
- if (!notUsingNativeAutoFocus(autoFocus)) {
25
- return props;
26
- }
27
- var nodeRef = /*#__PURE__*/_react["default"].createRef();
28
- _react["default"].useEffect(function () {
29
- if (autoFocus === false) return;
30
- var inputNode = nodeRef.current;
31
- if (!inputNode || !inputNode.focus) return;
32
- var timer = setTimeout(function () {
33
- return inputNode === null || inputNode === void 0 ? void 0 : inputNode.focus();
34
- }, autoFocus || 0);
35
- return function () {
36
- clearTimeout(timer);
37
- };
38
- }, [autoFocus]);
39
- return (0, _objectSpread2["default"])({
40
- ref: (0, _ref.useForkRef)(ref, nodeRef)
41
- }, other);
42
- };
43
- }
44
- var _default = autoFocusEnhance;
45
- exports["default"] = _default;
46
- //# sourceMappingURL=autoFocusEnhance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoFocusEnhance.js","names":["_react","_interopRequireDefault","require","_ref","_excluded","notUsingNativeAutoFocus","autoFocus","autoFocusEnhance","props","ref","other","_objectWithoutProperties2","nodeRef","React","createRef","useEffect","inputNode","current","focus","timer","setTimeout","clearTimeout","_objectSpread2","useForkRef","_default","exports"],"sources":["../../../src/utils/enhances/autoFocusEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport { useForkRef } from '../ref';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\nfunction notUsingNativeAutoFocus(autoFocus: any) {\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n}\n\n/** @deprecated */\nexport interface IWithAutoFocusEnhanceProps extends WithAutoFocusEnhanceProps, UnknownProperties {}\nexport type WithAutoFocusEnhanceProps = {\n /** Native autofocus, but with support for working inside modals, you can also transmit the number of ms before focus is triggered */\n autoFocus?: boolean | number;\n};\n\nfunction autoFocusEnhance() {\n return (props: any) => {\n const { autoFocus, ref, ...other } = props;\n if (!notUsingNativeAutoFocus(autoFocus)) {\n return props;\n }\n const nodeRef = React.createRef<HTMLElement>();\n React.useEffect(() => {\n if (autoFocus === false) return;\n const { current: inputNode } = nodeRef;\n if (!inputNode || !inputNode.focus) return;\n const timer = setTimeout(() => inputNode?.focus(), (autoFocus as number) || 0);\n return () => {\n clearTimeout(timer);\n };\n }, [autoFocus]);\n return {\n ref: useForkRef(ref, nodeRef),\n ...other,\n };\n };\n}\n\nexport default autoFocusEnhance;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAAoC,IAAAE,SAAA;AAGpC,SAASC,uBAAuBA,CAACC,SAAc,EAAE;EAC/C,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;AACxE;;AAEA;;AAOA,SAASC,gBAAgBA,CAAA,EAAG;EAC1B,OAAO,UAACC,KAAU,EAAK;IACrB,IAAQF,SAAS,GAAoBE,KAAK,CAAlCF,SAAS;MAAEG,GAAG,GAAeD,KAAK,CAAvBC,GAAG;MAAKC,KAAK,OAAAC,yBAAA,aAAKH,KAAK,EAAAJ,SAAA;IAC1C,IAAI,CAACC,uBAAuB,CAACC,SAAS,CAAC,EAAE;MACvC,OAAOE,KAAK;IACd;IACA,IAAMI,OAAO,gBAAGC,iBAAK,CAACC,SAAS,EAAe;IAC9CD,iBAAK,CAACE,SAAS,CAAC,YAAM;MACpB,IAAIT,SAAS,KAAK,KAAK,EAAE;MACzB,IAAiBU,SAAS,GAAKJ,OAAO,CAA9BK,OAAO;MACf,IAAI,CAACD,SAAS,IAAI,CAACA,SAAS,CAACE,KAAK,EAAE;MACpC,IAAMC,KAAK,GAAGC,UAAU,CAAC;QAAA,OAAMJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEE,KAAK,EAAE;MAAA,GAAGZ,SAAS,IAAe,CAAC,CAAC;MAC9E,OAAO,YAAM;QACXe,YAAY,CAACF,KAAK,CAAC;MACrB,CAAC;IACH,CAAC,EAAE,CAACb,SAAS,CAAC,CAAC;IACf,WAAAgB,cAAA;MACEb,GAAG,EAAE,IAAAc,eAAU,EAACd,GAAG,EAAEG,OAAO;IAAC,GAC1BF,KAAK;EAEZ,CAAC;AACH;AAAC,IAAAc,QAAA,GAEcjB,gBAAgB;AAAAkB,OAAA,cAAAD,QAAA"}
@@ -1,38 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["autoFocus", "ref"];
4
- import React from 'react';
5
- import { useForkRef } from "../ref.mjs";
6
- function notUsingNativeAutoFocus(autoFocus) {
7
- return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';
8
- }
9
-
10
- /** @deprecated */
11
-
12
- function autoFocusEnhance() {
13
- return function (props) {
14
- var autoFocus = props.autoFocus,
15
- ref = props.ref,
16
- other = _objectWithoutProperties(props, _excluded);
17
- if (!notUsingNativeAutoFocus(autoFocus)) {
18
- return props;
19
- }
20
- var nodeRef = /*#__PURE__*/React.createRef();
21
- React.useEffect(function () {
22
- if (autoFocus === false) return;
23
- var inputNode = nodeRef.current;
24
- if (!inputNode || !inputNode.focus) return;
25
- var timer = setTimeout(function () {
26
- return inputNode === null || inputNode === void 0 ? void 0 : inputNode.focus();
27
- }, autoFocus || 0);
28
- return function () {
29
- clearTimeout(timer);
30
- };
31
- }, [autoFocus]);
32
- return _objectSpread({
33
- ref: useForkRef(ref, nodeRef)
34
- }, other);
35
- };
36
- }
37
- export default autoFocusEnhance;
38
- //# sourceMappingURL=autoFocusEnhance.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoFocusEnhance.mjs","names":["React","useForkRef","notUsingNativeAutoFocus","autoFocus","autoFocusEnhance","props","ref","other","_objectWithoutProperties","_excluded","nodeRef","createRef","useEffect","inputNode","current","focus","timer","setTimeout","clearTimeout","_objectSpread"],"sources":["../../../src/utils/enhances/autoFocusEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport { useForkRef } from '../ref';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\nfunction notUsingNativeAutoFocus(autoFocus: any) {\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n}\n\n/** @deprecated */\nexport interface IWithAutoFocusEnhanceProps extends WithAutoFocusEnhanceProps, UnknownProperties {}\nexport type WithAutoFocusEnhanceProps = {\n /** Native autofocus, but with support for working inside modals, you can also transmit the number of ms before focus is triggered */\n autoFocus?: boolean | number;\n};\n\nfunction autoFocusEnhance() {\n return (props: any) => {\n const { autoFocus, ref, ...other } = props;\n if (!notUsingNativeAutoFocus(autoFocus)) {\n return props;\n }\n const nodeRef = React.createRef<HTMLElement>();\n React.useEffect(() => {\n if (autoFocus === false) return;\n const { current: inputNode } = nodeRef;\n if (!inputNode || !inputNode.focus) return;\n const timer = setTimeout(() => inputNode?.focus(), (autoFocus as number) || 0);\n return () => {\n clearTimeout(timer);\n };\n }, [autoFocus]);\n return {\n ref: useForkRef(ref, nodeRef),\n ...other,\n };\n };\n}\n\nexport default autoFocusEnhance;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,YAAQ;AAGnC,SAASC,uBAAuBA,CAACC,SAAc,EAAE;EAC/C,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;AACxE;;AAEA;;AAOA,SAASC,gBAAgBA,CAAA,EAAG;EAC1B,OAAO,UAACC,KAAU,EAAK;IACrB,IAAQF,SAAS,GAAoBE,KAAK,CAAlCF,SAAS;MAAEG,GAAG,GAAeD,KAAK,CAAvBC,GAAG;MAAKC,KAAK,GAAAC,wBAAA,CAAKH,KAAK,EAAAI,SAAA;IAC1C,IAAI,CAACP,uBAAuB,CAACC,SAAS,CAAC,EAAE;MACvC,OAAOE,KAAK;IACd;IACA,IAAMK,OAAO,gBAAGV,KAAK,CAACW,SAAS,EAAe;IAC9CX,KAAK,CAACY,SAAS,CAAC,YAAM;MACpB,IAAIT,SAAS,KAAK,KAAK,EAAE;MACzB,IAAiBU,SAAS,GAAKH,OAAO,CAA9BI,OAAO;MACf,IAAI,CAACD,SAAS,IAAI,CAACA,SAAS,CAACE,KAAK,EAAE;MACpC,IAAMC,KAAK,GAAGC,UAAU,CAAC;QAAA,OAAMJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEE,KAAK,EAAE;MAAA,GAAGZ,SAAS,IAAe,CAAC,CAAC;MAC9E,OAAO,YAAM;QACXe,YAAY,CAACF,KAAK,CAAC;MACrB,CAAC;IACH,CAAC,EAAE,CAACb,SAAS,CAAC,CAAC;IACf,OAAAgB,aAAA;MACEb,GAAG,EAAEL,UAAU,CAACK,GAAG,EAAEI,OAAO;IAAC,GAC1BH,KAAK;EAEZ,CAAC;AACH;AAEA,eAAeH,gBAAgB"}
@@ -1,22 +0,0 @@
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 _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
11
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
- var _react = _interopRequireDefault(require("react"));
13
- function contextEnhance(context, setOnProp) {
14
- return function (props) {
15
- var other = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(props), props));
16
- var value = _react["default"].useContext(context);
17
- return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, other), {}, (0, _defineProperty2["default"])({}, setOnProp, value));
18
- };
19
- }
20
- var _default = contextEnhance;
21
- exports["default"] = _default;
22
- //# sourceMappingURL=contextEnhance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contextEnhance.js","names":["_react","_interopRequireDefault","require","contextEnhance","context","setOnProp","props","other","_extends2","_objectDestructuringEmpty2","value","React","useContext","_objectSpread3","_defineProperty2","_default","exports"],"sources":["../../../src/utils/enhances/contextEnhance.tsx"],"sourcesContent":["import React from 'react';\n\nfunction contextEnhance(context: React.Context<any>, setOnProp: string) {\n return (props: any) => {\n const { ...other } = props;\n const value = React.useContext(context);\n return {\n ...other,\n [setOnProp]: value,\n };\n };\n}\n\nexport default contextEnhance;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,SAASC,cAAcA,CAACC,OAA2B,EAAEC,SAAiB,EAAE;EACtE,OAAO,UAACC,KAAU,EAAK;IACrB,IAAWC,KAAK,OAAAC,SAAA,sBAAAC,0BAAA,aAAKH,KAAK,GAALA,KAAK;IAC1B,IAAMI,KAAK,GAAGC,iBAAK,CAACC,UAAU,CAACR,OAAO,CAAC;IACvC,WAAAS,cAAA,iBAAAA,cAAA,iBACKN,KAAK,WAAAO,gBAAA,iBACPT,SAAS,EAAGK,KAAK;EAEtB,CAAC;AACH;AAAC,IAAAK,QAAA,GAEcZ,cAAc;AAAAa,OAAA,cAAAD,QAAA"}
@@ -1,14 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
- import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
4
- import _extends from "@babel/runtime/helpers/extends";
5
- import React from 'react';
6
- function contextEnhance(context, setOnProp) {
7
- return function (props) {
8
- var other = _extends({}, (_objectDestructuringEmpty(props), props));
9
- var value = React.useContext(context);
10
- return _objectSpread(_objectSpread({}, other), {}, _defineProperty({}, setOnProp, value));
11
- };
12
- }
13
- export default contextEnhance;
14
- //# sourceMappingURL=contextEnhance.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contextEnhance.mjs","names":["React","contextEnhance","context","setOnProp","props","other","_extends","_objectDestructuringEmpty","value","useContext","_objectSpread","_defineProperty"],"sources":["../../../src/utils/enhances/contextEnhance.tsx"],"sourcesContent":["import React from 'react';\n\nfunction contextEnhance(context: React.Context<any>, setOnProp: string) {\n return (props: any) => {\n const { ...other } = props;\n const value = React.useContext(context);\n return {\n ...other,\n [setOnProp]: value,\n };\n };\n}\n\nexport default contextEnhance;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,cAAcA,CAACC,OAA2B,EAAEC,SAAiB,EAAE;EACtE,OAAO,UAACC,KAAU,EAAK;IACrB,IAAWC,KAAK,GAAAC,QAAA,MAAAC,yBAAA,CAAKH,KAAK,GAALA,KAAK;IAC1B,IAAMI,KAAK,GAAGR,KAAK,CAACS,UAAU,CAACP,OAAO,CAAC;IACvC,OAAAQ,aAAA,CAAAA,aAAA,KACKL,KAAK,OAAAM,eAAA,KACPR,SAAS,EAAGK,KAAK;EAEtB,CAAC;AACH;AAEA,eAAeP,cAAc"}
@@ -1,101 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.useAsyncI18nMessages = exports["default"] = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
10
- var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
11
- var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
14
- var _react = _interopRequireDefault(require("react"));
15
- var _WithI18n = require("./WithI18n");
16
- var useAsyncI18nMessages = function useAsyncI18nMessages(primaryContainer, locale, fallbackContainer) {
17
- var _store$locale;
18
- var container = _react["default"].useMemo(function () {
19
- if (!fallbackContainer) return primaryContainer;
20
- if (!primaryContainer) return fallbackContainer;
21
- if (primaryContainer === fallbackContainer) return primaryContainer;
22
- var container = {};
23
- var _loop = function _loop(_locale) {
24
- if (typeof primaryContainer[_locale] === 'function' || typeof fallbackContainer[_locale] === 'function') {
25
- container[_locale] = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
26
- var _yield$Promise$all, _yield$Promise$all2, primary, fallback;
27
- return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
28
- while (1) switch (_context.prev = _context.next) {
29
- case 0:
30
- _context.next = 2;
31
- return Promise.all([primaryContainer[_locale], fallbackContainer[_locale]]);
32
- case 2:
33
- _yield$Promise$all = _context.sent;
34
- _yield$Promise$all2 = (0, _slicedToArray2["default"])(_yield$Promise$all, 2);
35
- primary = _yield$Promise$all2[0];
36
- fallback = _yield$Promise$all2[1];
37
- return _context.abrupt("return", (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, primary), fallback));
38
- case 7:
39
- case "end":
40
- return _context.stop();
41
- }
42
- }, _callee);
43
- }));
44
- } else {
45
- var _primaryContainer$_lo, _fallbackContainer$_l;
46
- container[_locale] = (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, (_primaryContainer$_lo = primaryContainer[_locale]) !== null && _primaryContainer$_lo !== void 0 ? _primaryContainer$_lo : {}), (_fallbackContainer$_l = fallbackContainer[_locale]) !== null && _fallbackContainer$_l !== void 0 ? _fallbackContainer$_l : {});
47
- }
48
- };
49
- for (var _locale in primaryContainer) {
50
- _loop(_locale);
51
- }
52
- return container;
53
- }, [primaryContainer, fallbackContainer]);
54
- var initStore = _react["default"].useMemo(function () {
55
- var store = {};
56
- for (var _locale2 in container) {
57
- if ((0, _typeof2["default"])(container[_locale2]) === 'object') {
58
- store[_locale2] = container[_locale2];
59
- }
60
- }
61
- return store;
62
- }, [container]);
63
- var _React$useState = _react["default"].useState(initStore),
64
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
65
- store = _React$useState2[0],
66
- setStore = _React$useState2[1];
67
- var lastLoadedLocaleRef = _react["default"].useRef(null);
68
- if (store[locale]) lastLoadedLocaleRef.current = locale;
69
- var fallbackMessages = _react["default"].useMemo(function () {
70
- return Object.values(store)[0];
71
- }, [store]);
72
- var loadingLocaleRef = _react["default"].useRef(null);
73
- _react["default"].useEffect(function () {
74
- loadingLocaleRef.current = locale;
75
- var asyncMessages = container[locale];
76
- if (typeof asyncMessages === 'function') {
77
- asyncMessages().then(function (module) {
78
- if (loadingLocaleRef.current !== locale) return;
79
- var messages = module;
80
- if ('default' in module && (0, _typeof2["default"])(module["default"]) === 'object') messages = module["default"];
81
- setStore(function (store) {
82
- return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, store), {}, (0, _defineProperty2["default"])({}, locale, messages));
83
- });
84
- })["catch"](console.error);
85
- }
86
- }, [container, locale]);
87
- return (_store$locale = store[locale]) !== null && _store$locale !== void 0 ? _store$locale : fallbackMessages;
88
- };
89
- exports.useAsyncI18nMessages = useAsyncI18nMessages;
90
- var _default = function _default(container) {
91
- return function (props) {
92
- var i18n = props.i18n,
93
- locale = props.locale;
94
- var getI18nText = (0, _WithI18n.useI18n)(i18n, locale, container);
95
- return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, props), {}, {
96
- getI18nText: getI18nText
97
- });
98
- };
99
- };
100
- exports["default"] = _default;
101
- //# sourceMappingURL=i18nEnhance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18nEnhance.js","names":["_react","_interopRequireDefault","require","_WithI18n","useAsyncI18nMessages","primaryContainer","locale","fallbackContainer","_store$locale","container","React","useMemo","_loop","_locale","_asyncToGenerator2","_regeneratorRuntime2","mark","_callee","_yield$Promise$all","_yield$Promise$all2","primary","fallback","wrap","_callee$","_context","prev","next","Promise","all","sent","_slicedToArray2","abrupt","_objectSpread3","stop","_primaryContainer$_lo","_fallbackContainer$_l","initStore","store","_typeof2","_React$useState","useState","_React$useState2","setStore","lastLoadedLocaleRef","useRef","current","fallbackMessages","Object","values","loadingLocaleRef","useEffect","asyncMessages","then","module","messages","_defineProperty2","console","error","exports","_default","props","i18n","getI18nText","useI18n"],"sources":["../../../src/utils/enhances/i18nEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleKeys, useI18n } from './WithI18n';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IWithI18nEnhanceProps extends WithI18nEnhanceProps, UnknownProperties {}\nexport type WithI18nEnhanceProps = {\n /* Function for getting the required field from the translation dictionary */\n getI18nText?: (key?: string, variables?: {}) => any;\n /* Object with translations */\n i18n?: {\n [locale: string]: {\n [key: string]: string;\n };\n };\n /* Locale for translations */\n locale?: LocaleKeys;\n};\n\ntype Messages = { [messageId: string]: string };\ntype MessagesContainer = { [locale: string]: Messages | (() => Promise<Messages>) };\ntype MessagesStore = { [locale: string]: Messages };\nexport const useAsyncI18nMessages = (\n primaryContainer: MessagesContainer,\n locale: string,\n fallbackContainer?: MessagesContainer,\n) => {\n const container = React.useMemo(() => {\n if (!fallbackContainer) return primaryContainer;\n if (!primaryContainer) return fallbackContainer;\n if (primaryContainer === fallbackContainer) return primaryContainer;\n const container: MessagesContainer = {};\n for (const locale in primaryContainer) {\n if (\n typeof primaryContainer[locale] === 'function' ||\n typeof fallbackContainer[locale] === 'function'\n ) {\n container[locale] = async () => {\n const [primary, fallback] = await Promise.all([\n primaryContainer[locale],\n fallbackContainer[locale],\n ]);\n return { ...primary, ...fallback };\n };\n } else {\n container[locale] = {\n ...(primaryContainer[locale] ?? {}),\n ...(fallbackContainer[locale] ?? {}),\n };\n }\n }\n return container;\n }, [primaryContainer, fallbackContainer]);\n const initStore = React.useMemo(() => {\n const store: MessagesStore = {};\n for (const locale in container) {\n if (typeof container[locale] === 'object') {\n store[locale] = container[locale] as Messages;\n }\n }\n return store;\n }, [container]);\n const [store, setStore] = React.useState(initStore);\n const lastLoadedLocaleRef = React.useRef<string | null>(null);\n if (store[locale]) lastLoadedLocaleRef.current = locale;\n const fallbackMessages = React.useMemo(() => Object.values(store)[0], [store]);\n\n const loadingLocaleRef = React.useRef<string | null>(null);\n React.useEffect(() => {\n loadingLocaleRef.current = locale;\n const asyncMessages = container[locale];\n if (typeof asyncMessages === 'function') {\n asyncMessages()\n .then((module) => {\n if (loadingLocaleRef.current !== locale) return;\n let messages = module;\n if ('default' in module && typeof module.default === 'object') messages = module.default;\n setStore((store) => ({\n ...store,\n [locale]: messages,\n }));\n })\n\n .catch(console.error);\n }\n }, [container, locale]);\n\n return store[locale] ?? fallbackMessages;\n};\nexport default (container?: MessagesContainer) => {\n return (props: any): { getI18nText: ReturnType<typeof useI18n> } => {\n const { i18n, locale } = props;\n const getI18nText = useI18n(i18n, locale, container);\n\n return { ...props, getI18nText };\n };\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAqBO,IAAME,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAC/BC,gBAAmC,EACnCC,MAAc,EACdC,iBAAqC,EAClC;EAAA,IAAAC,aAAA;EACH,IAAMC,SAAS,GAAGC,iBAAK,CAACC,OAAO,CAAC,YAAM;IACpC,IAAI,CAACJ,iBAAiB,EAAE,OAAOF,gBAAgB;IAC/C,IAAI,CAACA,gBAAgB,EAAE,OAAOE,iBAAiB;IAC/C,IAAIF,gBAAgB,KAAKE,iBAAiB,EAAE,OAAOF,gBAAgB;IACnE,IAAMI,SAA4B,GAAG,CAAC,CAAC;IAAC,IAAAG,KAAA,YAAAA,MAAAC,OAAA,EACD;MACrC,IACE,OAAOR,gBAAgB,CAACC,OAAM,CAAC,KAAK,UAAU,IAC9C,OAAOC,iBAAiB,CAACD,OAAM,CAAC,KAAK,UAAU,EAC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ACzC,IAAIgD,QAAQ,GAAGD,MAAM;QACrB,IAAI,SAAS,IAAIA,MAAM,IAAI,IAAAf,QAAA,aAAOe,MAAM,WAAQ,MAAK,QAAQ,EAAEC,QAAQ,GAAGD,MAAM,WAAQ;QACxFX,QAAQ,CAAC,UAACL,KAAK;UAAA,WAAAL,cAAA,iBAAAA,cAAA,iBACVK,KAAK,WAAAkB,gBAAA,iBACPjD,MAAM,EAAGgD,QAAQ;QAAA,CAClB,CAAC;MACL,CAAC,CAAC,SAEI,CAACE,OAAO,CAACC,KAAK,CAAC;IACzB;EACF,CAAC,EAAE,CAAChD,SAAS,EAAEH,MAAM,CAAC,CAAC;EAEvB,QAAAE,aAAA,GAAO6B,KAAK,CAAC/B,MAAM,CAAC,cAAAE,aAAA,cAAAA,aAAA,GAAIsC,gBAAgB;AAC1C,CAAC;AAACY,OAAA,CAAAtD,oBAAA,GAAAA,oBAAA;AAAA,IAAAuD,QAAA,GACa,SAAAA,SAAClD,SAA6B,EAAK;EAChD,OAAO,UAACmD,KAAU,EAAkD;IAClE,IAAQC,IAAI,GAAaD,KAAK,CAAtBC,IAAI;MAAEvD,MAAM,GAAKsD,KAAK,CAAhBtD,MAAM;IACpB,IAAMwD,WAAW,GAAG,IAAAC,iBAAO,EAACF,IAAI,EAAEvD,MAAM,EAAEG,SAAS,CAAC;IAEpD,WAAAuB,cAAA,iBAAAA,cAAA,iBAAY4B,KAAK;MAAEE,WAAW,EAAXA;IAAW;EAChC,CAAC;AACH,CAAC;AAAAJ,OAAA,cAAAC,QAAA"}
@@ -1,92 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _typeof from "@babel/runtime/helpers/typeof";
3
- import _regeneratorRuntime from "@babel/runtime/helpers/regeneratorRuntime";
4
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
5
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
7
- import React from 'react';
8
- import { useI18n } from "./WithI18n.mjs";
9
- export var useAsyncI18nMessages = function useAsyncI18nMessages(primaryContainer, locale, fallbackContainer) {
10
- var _store$locale;
11
- var container = React.useMemo(function () {
12
- if (!fallbackContainer) return primaryContainer;
13
- if (!primaryContainer) return fallbackContainer;
14
- if (primaryContainer === fallbackContainer) return primaryContainer;
15
- var container = {};
16
- var _loop = function _loop(_locale) {
17
- if (typeof primaryContainer[_locale] === 'function' || typeof fallbackContainer[_locale] === 'function') {
18
- container[_locale] = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19
- var _yield$Promise$all, _yield$Promise$all2, primary, fallback;
20
- return _regeneratorRuntime().wrap(function _callee$(_context) {
21
- while (1) switch (_context.prev = _context.next) {
22
- case 0:
23
- _context.next = 2;
24
- return Promise.all([primaryContainer[_locale], fallbackContainer[_locale]]);
25
- case 2:
26
- _yield$Promise$all = _context.sent;
27
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
28
- primary = _yield$Promise$all2[0];
29
- fallback = _yield$Promise$all2[1];
30
- return _context.abrupt("return", _objectSpread(_objectSpread({}, primary), fallback));
31
- case 7:
32
- case "end":
33
- return _context.stop();
34
- }
35
- }, _callee);
36
- }));
37
- } else {
38
- var _primaryContainer$_lo, _fallbackContainer$_l;
39
- container[_locale] = _objectSpread(_objectSpread({}, (_primaryContainer$_lo = primaryContainer[_locale]) !== null && _primaryContainer$_lo !== void 0 ? _primaryContainer$_lo : {}), (_fallbackContainer$_l = fallbackContainer[_locale]) !== null && _fallbackContainer$_l !== void 0 ? _fallbackContainer$_l : {});
40
- }
41
- };
42
- for (var _locale in primaryContainer) {
43
- _loop(_locale);
44
- }
45
- return container;
46
- }, [primaryContainer, fallbackContainer]);
47
- var initStore = React.useMemo(function () {
48
- var store = {};
49
- for (var _locale3 in container) {
50
- if (_typeof(container[_locale3]) === 'object') {
51
- store[_locale3] = container[_locale3];
52
- }
53
- }
54
- return store;
55
- }, [container]);
56
- var _React$useState = React.useState(initStore),
57
- _React$useState2 = _slicedToArray(_React$useState, 2),
58
- store = _React$useState2[0],
59
- setStore = _React$useState2[1];
60
- var lastLoadedLocaleRef = React.useRef(null);
61
- if (store[locale]) lastLoadedLocaleRef.current = locale;
62
- var fallbackMessages = React.useMemo(function () {
63
- return Object.values(store)[0];
64
- }, [store]);
65
- var loadingLocaleRef = React.useRef(null);
66
- React.useEffect(function () {
67
- loadingLocaleRef.current = locale;
68
- var asyncMessages = container[locale];
69
- if (typeof asyncMessages === 'function') {
70
- asyncMessages().then(function (module) {
71
- if (loadingLocaleRef.current !== locale) return;
72
- var messages = module;
73
- if ('default' in module && _typeof(module["default"]) === 'object') messages = module["default"];
74
- setStore(function (store) {
75
- return _objectSpread(_objectSpread({}, store), {}, _defineProperty({}, locale, messages));
76
- });
77
- })["catch"](console.error);
78
- }
79
- }, [container, locale]);
80
- return (_store$locale = store[locale]) !== null && _store$locale !== void 0 ? _store$locale : fallbackMessages;
81
- };
82
- export default (function (container) {
83
- return function (props) {
84
- var i18n = props.i18n,
85
- locale = props.locale;
86
- var getI18nText = useI18n(i18n, locale, container);
87
- return _objectSpread(_objectSpread({}, props), {}, {
88
- getI18nText: getI18nText
89
- });
90
- };
91
- });
92
- //# sourceMappingURL=i18nEnhance.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18nEnhance.mjs","names":["React","useI18n","useAsyncI18nMessages","primaryContainer","locale","fallbackContainer","_store$locale","container","useMemo","_loop","_locale","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_yield$Promise$all","_yield$Promise$all2","primary","fallback","wrap","_callee$","_context","prev","next","Promise","all","sent","_slicedToArray","abrupt","_objectSpread","stop","_primaryContainer$_lo","_fallbackContainer$_l","initStore","store","_typeof","_React$useState","useState","_React$useState2","setStore","lastLoadedLocaleRef","useRef","current","fallbackMessages","Object","values","loadingLocaleRef","useEffect","asyncMessages","then","module","messages","_defineProperty","console","error","props","i18n","getI18nText"],"sources":["../../../src/utils/enhances/i18nEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport { LocaleKeys, useI18n } from './WithI18n';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IWithI18nEnhanceProps extends WithI18nEnhanceProps, UnknownProperties {}\nexport type WithI18nEnhanceProps = {\n /* Function for getting the required field from the translation dictionary */\n getI18nText?: (key?: string, variables?: {}) => any;\n /* Object with translations */\n i18n?: {\n [locale: string]: {\n [key: string]: string;\n };\n };\n /* Locale for translations */\n locale?: LocaleKeys;\n};\n\ntype Messages = { [messageId: string]: string };\ntype MessagesContainer = { [locale: string]: Messages | (() => Promise<Messages>) };\ntype MessagesStore = { [locale: string]: Messages };\nexport const useAsyncI18nMessages = (\n primaryContainer: MessagesContainer,\n locale: string,\n fallbackContainer?: MessagesContainer,\n) => {\n const container = React.useMemo(() => {\n if (!fallbackContainer) return primaryContainer;\n if (!primaryContainer) return fallbackContainer;\n if (primaryContainer === fallbackContainer) return primaryContainer;\n const container: MessagesContainer = {};\n for (const locale in primaryContainer) {\n if (\n typeof primaryContainer[locale] === 'function' ||\n typeof fallbackContainer[locale] === 'function'\n ) {\n container[locale] = async () => {\n const [primary, fallback] = await Promise.all([\n primaryContainer[locale],\n fallbackContainer[locale],\n ]);\n return { ...primary, ...fallback };\n };\n } else {\n container[locale] = {\n ...(primaryContainer[locale] ?? {}),\n ...(fallbackContainer[locale] ?? {}),\n };\n }\n }\n return container;\n }, [primaryContainer, fallbackContainer]);\n const initStore = React.useMemo(() => {\n const store: MessagesStore = {};\n for (const locale in container) {\n if (typeof container[locale] === 'object') {\n store[locale] = container[locale] as Messages;\n }\n }\n return store;\n }, [container]);\n const [store, setStore] = React.useState(initStore);\n const lastLoadedLocaleRef = React.useRef<string | null>(null);\n if (store[locale]) lastLoadedLocaleRef.current = locale;\n const fallbackMessages = React.useMemo(() => Object.values(store)[0], [store]);\n\n const loadingLocaleRef = React.useRef<string | null>(null);\n React.useEffect(() => {\n loadingLocaleRef.current = locale;\n const asyncMessages = container[locale];\n if (typeof asyncMessages === 'function') {\n asyncMessages()\n .then((module) => {\n if (loadingLocaleRef.current !== locale) return;\n let messages = module;\n if ('default' in module && typeof module.default === 'object') messages = module.default;\n setStore((store) => ({\n ...store,\n [locale]: messages,\n }));\n })\n\n .catch(console.error);\n }\n }, [container, locale]);\n\n return store[locale] ?? fallbackMessages;\n};\nexport default (container?: MessagesContainer) => {\n return (props: any): { getI18nText: ReturnType<typeof useI18n> } => {\n const { i18n, locale } = props;\n const getI18nText = useI18n(i18n, locale, container);\n\n return { ...props, getI18nText };\n };\n};\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,OAAO,QAAQ,gBAAY;AAqBhD,OAAO,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAC/BC,gBAAmC,EACnCC,MAAc,EACdC,iBAAqC,EAClC;EAAA,IAAAC,aAAA;EACH,IAAMC,SAAS,GAAGP,KAAK,CAACQ,OAAO,CAAC,YAAM;IACpC,IAAI,CAACH,iBAAiB,EAAE,OAAOF,gBAAgB;IAC/C,IAAI,CAACA,gBAAgB,EAAE,OAAOE,iBAAiB;IAC/C,IAAIF,gBAAgB,KAAKE,iBAAiB,EAAE,OAAOF,gBAAgB;IACnE,IAAMI,SAA4B,GAAG,CAAC,CAAC;IAAC,IAAAE,KAAA,YAAAA,MAAAC,OAAA,EACD;MACrC,IACE,OAAOP,gBAAgB,CAACC,OAAM,CAAC,KAAK,UAAU,IAC9C,OAAOC,iBAAiB,CAACD,OAAM,CAAC,KAAK,UAAU,EAC/C;QACAG,SAAS,CAACH,OAAM,CAAC,gBAAAO,iBAAA,eAAAC,mBAAA,GAAAC,IAAA,CAAG,SAAAC,QAAA;UAAA,IAAAC,kBAAA,EAAAC,mBAAA,EAAAC,OAAA,EAAAC,QAAA;UAAA,OAAAN,mBAAA,GAAAO,IAAA,UAAAC,SAAAC,QAAA;YAAA,kBAAAA,QAAA,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EAAG+C,QAAQ;QAAA,CAClB,CAAC;MACL,CAAC,CAAC,SAEI,CAACE,OAAO,CAACC,KAAK,CAAC;IACzB;EACF,CAAC,EAAE,CAAC/C,SAAS,EAAEH,MAAM,CAAC,CAAC;EAEvB,QAAAE,aAAA,GAAO4B,KAAK,CAAC9B,MAAM,CAAC,cAAAE,aAAA,cAAAA,aAAA,GAAIqC,gBAAgB;AAC1C,CAAC;AACD,gBAAe,UAACpC,SAA6B,EAAK;EAChD,OAAO,UAACgD,KAAU,EAAkD;IAClE,IAAQC,IAAI,GAAaD,KAAK,CAAtBC,IAAI;MAAEpD,MAAM,GAAKmD,KAAK,CAAhBnD,MAAM;IACpB,IAAMqD,WAAW,GAAGxD,OAAO,CAACuD,IAAI,EAAEpD,MAAM,EAAEG,SAAS,CAAC;IAEpD,OAAAsB,aAAA,CAAAA,aAAA,KAAY0B,KAAK;MAAEE,WAAW,EAAXA;IAAW;EAChC,CAAC;AACH,CAAC"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.enforcedKeyboardFocusEnhanceContext = exports["default"] = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _assignProps = _interopRequireDefault(require("../assignProps"));
11
- var _LastInteractionType = require("../../LastInteractionType");
12
- var enforcedKeyboardFocusEnhanceContext = /*#__PURE__*/_react["default"].createContext(false);
13
- exports.enforcedKeyboardFocusEnhanceContext = enforcedKeyboardFocusEnhanceContext;
14
- var keyboardFocusEnhance = function keyboardFocusEnhance() {
15
- var makeFocusable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
16
- return function (props) {
17
- var _props$tabIndex;
18
- var autoFocus = props.autoFocus;
19
- var disabled = props.disabled || props.loading;
20
- var tabIndex = (_props$tabIndex = props.tabIndex) !== null && _props$tabIndex !== void 0 ? _props$tabIndex : makeFocusable ? 0 : undefined;
21
- var _React$useState = _react["default"].useState(false),
22
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
23
- keyboardFocused = _React$useState2[0],
24
- setKeyboardFocused = _React$useState2[1];
25
- var ref = _react["default"].useRef(null);
26
- var handleFocus = _react["default"].useCallback(function (event) {
27
- if (event.isTrusted === true) {
28
- if (!_LastInteractionType.lastInteraction.isKeyboard()) return;
29
- }
30
- setKeyboardFocused(true);
31
- }, []);
32
- var handlerBlur = _react["default"].useCallback(function () {
33
- return setKeyboardFocused(false);
34
- }, []);
35
- _react["default"].useEffect(function () {
36
- if (typeof autoFocus !== 'number' && !autoFocus) return;
37
- var timer = setTimeout(function () {
38
- var _ref$current;
39
- (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focus();
40
- setKeyboardFocused(true);
41
- }, 0);
42
- return function () {
43
- clearTimeout(timer);
44
- };
45
- }, [autoFocus]);
46
- _react["default"].useEffect(function () {
47
- if (disabled) {
48
- setKeyboardFocused(false);
49
- }
50
- }, [disabled]);
51
- var enforcedKeyboardFocus = _react["default"].useContext(enforcedKeyboardFocusEnhanceContext);
52
- return (0, _assignProps["default"])(props, {
53
- tabIndex: disabled ? -1 : tabIndex,
54
- keyboardFocused: (keyboardFocused || enforcedKeyboardFocus) && !disabled,
55
- onFocus: handleFocus,
56
- onBlur: handlerBlur,
57
- ref: ref
58
- });
59
- };
60
- };
61
- var _default = keyboardFocusEnhance;
62
- exports["default"] = _default;
63
- //# sourceMappingURL=keyboardFocusEnhance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyboardFocusEnhance.js","names":["_react","_interopRequireDefault","require","_assignProps","_LastInteractionType","enforcedKeyboardFocusEnhanceContext","React","createContext","exports","keyboardFocusEnhance","makeFocusable","arguments","length","undefined","props","_props$tabIndex","autoFocus","disabled","loading","tabIndex","_React$useState","useState","_React$useState2","_slicedToArray2","keyboardFocused","setKeyboardFocused","ref","useRef","handleFocus","useCallback","event","isTrusted","lastInteraction","isKeyboard","handlerBlur","useEffect","timer","setTimeout","_ref$current","current","focus","clearTimeout","enforcedKeyboardFocus","useContext","assignProps","onFocus","onBlur","_default"],"sources":["../../../src/utils/enhances/keyboardFocusEnhance.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../assignProps';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\nimport { lastInteraction } from '../../LastInteractionType';\n\n/** @deprecated */\nexport interface IKeyboardFocusProps extends KeyboardFocusProps, UnknownProperties {}\nexport type KeyboardFocusProps = {\n /* Property responsible for displaying \"keyboard\" focus */\n keyboardFocused?: boolean;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n};\n\nexport const enforcedKeyboardFocusEnhanceContext = React.createContext(false);\n\nexport type KeyboardFocusEnhanceHook = (props: {\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n autoFocus?: boolean;\n}) => {\n tabIndex: number;\n keyboardFocused: boolean;\n onFocus: (e: React.FocusEvent) => void;\n onBlur: () => void;\n};\n\nconst keyboardFocusEnhance = (makeFocusable = true): KeyboardFocusEnhanceHook => {\n return (props) => {\n const { autoFocus } = props;\n const disabled = props.disabled || props.loading;\n const tabIndex = props.tabIndex ?? (makeFocusable ? 0 : undefined);\n const [keyboardFocused, setKeyboardFocused] = React.useState(false);\n const ref = React.useRef<HTMLElement>(null);\n\n const handleFocus = React.useCallback((event: React.FocusEvent) => {\n if (event.isTrusted === true) {\n if (!lastInteraction.isKeyboard()) return;\n }\n setKeyboardFocused(true);\n }, []);\n const handlerBlur = React.useCallback(() => setKeyboardFocused(false), []);\n React.useEffect(() => {\n if (typeof autoFocus !== 'number' && !autoFocus) return;\n const timer = setTimeout(() => {\n ref.current?.focus();\n setKeyboardFocused(true);\n }, 0);\n return () => {\n clearTimeout(timer);\n };\n }, [autoFocus]);\n React.useEffect(() => {\n if (disabled) {\n setKeyboardFocused(false);\n }\n }, [disabled]);\n\n const enforcedKeyboardFocus = React.useContext(enforcedKeyboardFocusEnhanceContext);\n\n return assignProps(props, {\n tabIndex: disabled ? -1 : tabIndex,\n keyboardFocused: (keyboardFocused || enforcedKeyboardFocus) && !disabled,\n onFocus: handleFocus,\n onBlur: handlerBlur,\n ref,\n });\n };\n};\n\nexport default keyboardFocusEnhance;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAcO,IAAMG,mCAAmC,gBAAGC,iBAAK,CAACC,aAAa,CAAC,KAAK,CAAC;AAACC,OAAA,CAAAH,mCAAA,GAAAA,mCAAA;AAc9E,IAAMI,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA,EAAuD;EAAA,IAAnDC,aAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAChD,OAAO,UAACG,KAAK,EAAK;IAAA,IAAAC,eAAA;IAChB,IAAQC,SAAS,GAAKF,KAAK,CAAnBE,SAAS;IACjB,IAAMC,QAAQ,GAAGH,KAAK,CAACG,QAAQ,IAAIH,KAAK,CAACI,OAAO;IAChD,IAAMC,QAAQ,IAAAJ,eAAA,GAAGD,KAAK,CAACK,QAAQ,cAAAJ,eAAA,cAAAA,eAAA,GAAKL,aAAa,GAAG,CAAC,GAAGG,SAAU;IAClE,IAAAO,eAAA,GAA8Cd,iBAAK,CAACe,QAAQ,CAAC,KAAK,CAAC;MAAAC,gBAAA,OAAAC,eAAA,aAAAH,eAAA;MAA5DI,eAAe,GAAAF,gBAAA;MAAEG,kBAAkB,GAAAH,gBAAA;IAC1C,IAAMI,GAAG,GAAGpB,iBAAK,CAACqB,MAAM,CAAc,IAAI,CAAC;IAE3C,IAAMC,WAAW,GAAGtB,iBAAK,CAACuB,WAAW,CAAC,UAACC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;EACJ,CAAC;AACH,CAAC;AAAC,IAAAqB,QAAA,GAEatC,oBAAoB;AAAAD,OAAA,cAAAuC,QAAA"}
@@ -1,57 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React from 'react';
3
- import assignProps from "../assignProps.mjs";
4
- import { lastInteraction } from "../../LastInteractionType.mjs";
5
-
6
- /** @deprecated */
7
-
8
- export var enforcedKeyboardFocusEnhanceContext = /*#__PURE__*/React.createContext(false);
9
- var keyboardFocusEnhance = function keyboardFocusEnhance() {
10
- var makeFocusable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
11
- return function (props) {
12
- var _props$tabIndex;
13
- var autoFocus = props.autoFocus;
14
- var disabled = props.disabled || props.loading;
15
- var tabIndex = (_props$tabIndex = props.tabIndex) !== null && _props$tabIndex !== void 0 ? _props$tabIndex : makeFocusable ? 0 : undefined;
16
- var _React$useState = React.useState(false),
17
- _React$useState2 = _slicedToArray(_React$useState, 2),
18
- keyboardFocused = _React$useState2[0],
19
- setKeyboardFocused = _React$useState2[1];
20
- var ref = React.useRef(null);
21
- var handleFocus = React.useCallback(function (event) {
22
- if (event.isTrusted === true) {
23
- if (!lastInteraction.isKeyboard()) return;
24
- }
25
- setKeyboardFocused(true);
26
- }, []);
27
- var handlerBlur = React.useCallback(function () {
28
- return setKeyboardFocused(false);
29
- }, []);
30
- React.useEffect(function () {
31
- if (typeof autoFocus !== 'number' && !autoFocus) return;
32
- var timer = setTimeout(function () {
33
- var _ref$current;
34
- (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focus();
35
- setKeyboardFocused(true);
36
- }, 0);
37
- return function () {
38
- clearTimeout(timer);
39
- };
40
- }, [autoFocus]);
41
- React.useEffect(function () {
42
- if (disabled) {
43
- setKeyboardFocused(false);
44
- }
45
- }, [disabled]);
46
- var enforcedKeyboardFocus = React.useContext(enforcedKeyboardFocusEnhanceContext);
47
- return assignProps(props, {
48
- tabIndex: disabled ? -1 : tabIndex,
49
- keyboardFocused: (keyboardFocused || enforcedKeyboardFocus) && !disabled,
50
- onFocus: handleFocus,
51
- onBlur: handlerBlur,
52
- ref: ref
53
- });
54
- };
55
- };
56
- export default keyboardFocusEnhance;
57
- //# sourceMappingURL=keyboardFocusEnhance.mjs.map