@basic-ui/core 0.0.40 → 0.0.43

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 (348) hide show
  1. package/build/cjs/index.js +1312 -464
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Accordion/Accordion.d.ts +7 -7
  4. package/build/esm/Accordion/Accordion.js +4 -4
  5. package/build/esm/Accordion/Accordion.js.map +1 -1
  6. package/build/esm/Accordion/AccordionBody.d.ts +5 -5
  7. package/build/esm/Accordion/AccordionBody.js +4 -4
  8. package/build/esm/Accordion/AccordionBody.js.map +1 -1
  9. package/build/esm/Accordion/AccordionHeader.d.ts +6 -6
  10. package/build/esm/Accordion/AccordionHeader.js +4 -4
  11. package/build/esm/Accordion/AccordionHeader.js.map +1 -1
  12. package/build/esm/Accordion/AccordionItem.d.ts +7 -7
  13. package/build/esm/Accordion/AccordionItem.js +2 -2
  14. package/build/esm/Accordion/AccordionItem.js.map +1 -1
  15. package/build/esm/Accordion/context.d.ts +3 -3
  16. package/build/esm/Accordion/context.js.map +1 -1
  17. package/build/esm/Accordion/index.d.ts +0 -0
  18. package/build/esm/Accordion/index.js.map +1 -1
  19. package/build/esm/Accordion/scopeQuery.d.ts +0 -0
  20. package/build/esm/Accordion/scopeQuery.js.map +1 -1
  21. package/build/esm/CheckBox/CheckBox.d.ts +6 -6
  22. package/build/esm/CheckBox/CheckBox.js +2 -2
  23. package/build/esm/CheckBox/CheckBox.js.map +1 -1
  24. package/build/esm/CheckBox/index.d.ts +0 -0
  25. package/build/esm/CheckBox/index.js.map +1 -1
  26. package/build/esm/ComboBox/Combobox.d.ts +10 -10
  27. package/build/esm/ComboBox/Combobox.js +3 -3
  28. package/build/esm/ComboBox/Combobox.js.map +1 -1
  29. package/build/esm/ComboBox/ComboboxButton.d.ts +8 -8
  30. package/build/esm/ComboBox/ComboboxButton.js +4 -4
  31. package/build/esm/ComboBox/ComboboxButton.js.map +1 -1
  32. package/build/esm/ComboBox/ComboboxInput.d.ts +10 -10
  33. package/build/esm/ComboBox/ComboboxInput.js +3 -3
  34. package/build/esm/ComboBox/ComboboxInput.js.map +1 -1
  35. package/build/esm/ComboBox/ComboboxLabel.d.ts +5 -5
  36. package/build/esm/ComboBox/ComboboxLabel.js +2 -2
  37. package/build/esm/ComboBox/ComboboxLabel.js.map +1 -1
  38. package/build/esm/ComboBox/ComboboxList.d.ts +6 -6
  39. package/build/esm/ComboBox/ComboboxList.js +3 -3
  40. package/build/esm/ComboBox/ComboboxList.js.map +1 -1
  41. package/build/esm/ComboBox/ComboboxOption.d.ts +7 -7
  42. package/build/esm/ComboBox/ComboboxOption.js +4 -4
  43. package/build/esm/ComboBox/ComboboxOption.js.map +1 -1
  44. package/build/esm/ComboBox/ComboboxPopover.d.ts +8 -8
  45. package/build/esm/ComboBox/ComboboxPopover.js +5 -5
  46. package/build/esm/ComboBox/ComboboxPopover.js.map +1 -1
  47. package/build/esm/ComboBox/cities.d.ts +0 -0
  48. package/build/esm/ComboBox/cities.js.map +1 -1
  49. package/build/esm/ComboBox/context.d.ts +10 -10
  50. package/build/esm/ComboBox/context.js.map +1 -1
  51. package/build/esm/ComboBox/hooks.d.ts +3 -3
  52. package/build/esm/ComboBox/hooks.js +11 -11
  53. package/build/esm/ComboBox/hooks.js.map +1 -1
  54. package/build/esm/ComboBox/index.d.ts +0 -0
  55. package/build/esm/ComboBox/index.js.map +1 -1
  56. package/build/esm/ComboBox/makeHash.d.ts +0 -0
  57. package/build/esm/ComboBox/makeHash.js.map +1 -1
  58. package/build/esm/ComboBox/scopeQuery.d.ts +0 -0
  59. package/build/esm/ComboBox/scopeQuery.js.map +1 -1
  60. package/build/esm/FocusLock/FocusLock.d.ts +7 -7
  61. package/build/esm/FocusLock/FocusLock.js +2 -2
  62. package/build/esm/FocusLock/FocusLock.js.map +1 -1
  63. package/build/esm/FocusLock/index.d.ts +0 -0
  64. package/build/esm/FocusLock/index.js.map +1 -1
  65. package/build/esm/FocusLock/tabUtils.d.ts +0 -0
  66. package/build/esm/FocusLock/tabUtils.js.map +1 -1
  67. package/build/esm/FocusLock/useFocusLock.d.ts +4 -4
  68. package/build/esm/FocusLock/useFocusLock.js.map +1 -1
  69. package/build/esm/List/List.d.ts +6 -6
  70. package/build/esm/List/List.js +2 -2
  71. package/build/esm/List/List.js.map +1 -1
  72. package/build/esm/List/ListItem.d.ts +6 -6
  73. package/build/esm/List/ListItem.js +2 -2
  74. package/build/esm/List/ListItem.js.map +1 -1
  75. package/build/esm/List/context.d.ts +0 -0
  76. package/build/esm/List/context.js.map +1 -1
  77. package/build/esm/List/index.d.ts +0 -0
  78. package/build/esm/List/index.js.map +1 -1
  79. package/build/esm/Menu/Menu.d.ts +6 -6
  80. package/build/esm/Menu/Menu.js +2 -2
  81. package/build/esm/Menu/Menu.js.map +1 -1
  82. package/build/esm/Menu/MenuButton.d.ts +10 -10
  83. package/build/esm/Menu/MenuButton.js +3 -3
  84. package/build/esm/Menu/MenuButton.js.map +1 -1
  85. package/build/esm/Menu/MenuItem.d.ts +6 -6
  86. package/build/esm/Menu/MenuItem.js +4 -4
  87. package/build/esm/Menu/MenuItem.js.map +1 -1
  88. package/build/esm/Menu/MenuList.d.ts +5 -5
  89. package/build/esm/Menu/MenuList.js +6 -6
  90. package/build/esm/Menu/MenuList.js.map +1 -1
  91. package/build/esm/Menu/MenuPopover.d.ts +5 -5
  92. package/build/esm/Menu/MenuPopover.js +2 -2
  93. package/build/esm/Menu/MenuPopover.js.map +1 -1
  94. package/build/esm/Menu/context.d.ts +2 -2
  95. package/build/esm/Menu/context.js.map +1 -1
  96. package/build/esm/Menu/index.d.ts +0 -0
  97. package/build/esm/Menu/index.js.map +1 -1
  98. package/build/esm/Menu/scope.d.ts +0 -0
  99. package/build/esm/Menu/scope.js.map +1 -1
  100. package/build/esm/Modal/Modal.d.ts +6 -7
  101. package/build/esm/Modal/Modal.js +5 -5
  102. package/build/esm/Modal/Modal.js.map +1 -1
  103. package/build/esm/Modal/ModalBackdrop.d.ts +6 -6
  104. package/build/esm/Modal/ModalBackdrop.js +6 -6
  105. package/build/esm/Modal/ModalBackdrop.js.map +1 -1
  106. package/build/esm/Modal/index.d.ts +0 -0
  107. package/build/esm/Modal/index.js.map +1 -1
  108. package/build/esm/Popper/Popper.d.ts +7 -7
  109. package/build/esm/Popper/Popper.js +6 -6
  110. package/build/esm/Popper/Popper.js.map +1 -1
  111. package/build/esm/Popper/PopperArrow.d.ts +5 -5
  112. package/build/esm/Popper/PopperArrow.js +5 -6
  113. package/build/esm/Popper/PopperArrow.js.map +1 -1
  114. package/build/esm/Popper/context.d.ts +0 -0
  115. package/build/esm/Popper/context.js.map +1 -1
  116. package/build/esm/Popper/index.d.ts +0 -0
  117. package/build/esm/Popper/index.js.map +1 -1
  118. package/build/esm/Portal/Portal.d.ts +0 -0
  119. package/build/esm/Portal/Portal.js.map +1 -1
  120. package/build/esm/Portal/index.d.ts +0 -0
  121. package/build/esm/Portal/index.js.map +1 -1
  122. package/build/esm/RadioButton/RadioButton.d.ts +6 -6
  123. package/build/esm/RadioButton/RadioButton.js +5 -3
  124. package/build/esm/RadioButton/RadioButton.js.map +1 -1
  125. package/build/esm/RadioButton/RadioGroup.d.ts +7 -7
  126. package/build/esm/RadioButton/RadioGroup.js +2 -2
  127. package/build/esm/RadioButton/RadioGroup.js.map +1 -1
  128. package/build/esm/RadioButton/context.d.ts +2 -2
  129. package/build/esm/RadioButton/context.js.map +1 -1
  130. package/build/esm/RadioButton/index.d.ts +0 -0
  131. package/build/esm/RadioButton/index.js.map +1 -1
  132. package/build/esm/SkipNav/SkipNav.d.ts +6 -6
  133. package/build/esm/SkipNav/SkipNav.js +2 -2
  134. package/build/esm/SkipNav/SkipNav.js.map +1 -1
  135. package/build/esm/SkipNav/index.d.ts +0 -0
  136. package/build/esm/SkipNav/index.js.map +1 -1
  137. package/build/esm/Slider/Slider.d.ts +218 -0
  138. package/build/esm/Slider/Slider.js +842 -0
  139. package/build/esm/Slider/Slider.js.map +1 -0
  140. package/build/esm/Slider/index.d.ts +1 -0
  141. package/build/esm/Slider/index.js +2 -0
  142. package/build/esm/Slider/index.js.map +1 -0
  143. package/build/esm/Spinner/Spinner.d.ts +7 -7
  144. package/build/esm/Spinner/Spinner.js +2 -2
  145. package/build/esm/Spinner/Spinner.js.map +1 -1
  146. package/build/esm/Spinner/SpinnerButton.d.ts +6 -6
  147. package/build/esm/Spinner/SpinnerButton.js +3 -3
  148. package/build/esm/Spinner/SpinnerButton.js.map +1 -1
  149. package/build/esm/Spinner/context.d.ts +2 -2
  150. package/build/esm/Spinner/context.js.map +1 -1
  151. package/build/esm/Spinner/index.d.ts +0 -0
  152. package/build/esm/Spinner/index.js.map +1 -1
  153. package/build/esm/Tabs/Tab.d.ts +6 -6
  154. package/build/esm/Tabs/Tab.js +3 -3
  155. package/build/esm/Tabs/Tab.js.map +1 -1
  156. package/build/esm/Tabs/TabList.d.ts +6 -6
  157. package/build/esm/Tabs/TabList.js +4 -4
  158. package/build/esm/Tabs/TabList.js.map +1 -1
  159. package/build/esm/Tabs/TabPanel.d.ts +6 -6
  160. package/build/esm/Tabs/TabPanel.js +4 -4
  161. package/build/esm/Tabs/TabPanel.js.map +1 -1
  162. package/build/esm/Tabs/TabPanels.d.ts +5 -5
  163. package/build/esm/Tabs/TabPanels.js +4 -4
  164. package/build/esm/Tabs/TabPanels.js.map +1 -1
  165. package/build/esm/Tabs/Tabs.d.ts +6 -6
  166. package/build/esm/Tabs/Tabs.js +2 -2
  167. package/build/esm/Tabs/Tabs.js.map +1 -1
  168. package/build/esm/Tabs/context.d.ts +2 -2
  169. package/build/esm/Tabs/context.js.map +1 -1
  170. package/build/esm/Tabs/index.d.ts +0 -0
  171. package/build/esm/Tabs/index.js.map +1 -1
  172. package/build/esm/Tabs/scopeQuery.d.ts +0 -0
  173. package/build/esm/Tabs/scopeQuery.js.map +1 -1
  174. package/build/esm/Tooltip/Tooltip.d.ts +7 -8
  175. package/build/esm/Tooltip/Tooltip.js +5 -3
  176. package/build/esm/Tooltip/Tooltip.js.map +1 -1
  177. package/build/esm/Tooltip/index.d.ts +0 -0
  178. package/build/esm/Tooltip/index.js.map +1 -1
  179. package/build/esm/Tooltip/stateMachine.d.ts +0 -0
  180. package/build/esm/Tooltip/stateMachine.js +9 -9
  181. package/build/esm/Tooltip/stateMachine.js.map +1 -1
  182. package/build/esm/Tooltip/useTooltip.d.ts +7 -7
  183. package/build/esm/Tooltip/useTooltip.js +6 -5
  184. package/build/esm/Tooltip/useTooltip.js.map +1 -1
  185. package/build/esm/hooks/index.d.ts +0 -0
  186. package/build/esm/hooks/index.js.map +1 -1
  187. package/build/esm/hooks/useAutoFocus.d.ts +2 -2
  188. package/build/esm/hooks/useAutoFocus.js.map +1 -1
  189. package/build/esm/hooks/useChildrenCounter.d.ts +0 -0
  190. package/build/esm/hooks/useChildrenCounter.js.map +1 -1
  191. package/build/esm/hooks/useControlledState.d.ts +2 -6
  192. package/build/esm/hooks/useControlledState.js +8 -7
  193. package/build/esm/hooks/useControlledState.js.map +1 -1
  194. package/build/esm/hooks/useFocusReturn.d.ts +0 -0
  195. package/build/esm/hooks/useFocusReturn.js +2 -2
  196. package/build/esm/hooks/useFocusReturn.js.map +1 -1
  197. package/build/esm/hooks/useFocusState.d.ts +5 -5
  198. package/build/esm/hooks/useFocusState.js +1 -1
  199. package/build/esm/hooks/useFocusState.js.map +1 -1
  200. package/build/esm/hooks/useGestureHandlers.d.ts +5 -5
  201. package/build/esm/hooks/useGestureHandlers.js +23 -15
  202. package/build/esm/hooks/useGestureHandlers.js.map +1 -1
  203. package/build/esm/hooks/useMeasure.d.ts +2 -2
  204. package/build/esm/hooks/useMeasure.js +0 -1
  205. package/build/esm/hooks/useMeasure.js.map +1 -1
  206. package/build/esm/hooks/useOnClickOutside.d.ts +2 -2
  207. package/build/esm/hooks/useOnClickOutside.js.map +1 -1
  208. package/build/esm/hooks/useOnKeyDown.d.ts +1 -1
  209. package/build/esm/hooks/useOnKeyDown.js +5 -5
  210. package/build/esm/hooks/useOnKeyDown.js.map +1 -1
  211. package/build/esm/hooks/useReducerMachine.d.ts +0 -0
  212. package/build/esm/hooks/useReducerMachine.js +2 -1
  213. package/build/esm/hooks/useReducerMachine.js.map +1 -1
  214. package/build/esm/hooks/useRemoveBodyScroll.d.ts +2 -1
  215. package/build/esm/hooks/useRemoveBodyScroll.js +12 -8
  216. package/build/esm/hooks/useRemoveBodyScroll.js.map +1 -1
  217. package/build/esm/hooks/useScope.d.ts +0 -0
  218. package/build/esm/hooks/useScope.js.map +1 -1
  219. package/build/esm/hooks/useThrottle.d.ts +0 -0
  220. package/build/esm/hooks/useThrottle.js.map +1 -1
  221. package/build/esm/index.d.ts +1 -0
  222. package/build/esm/index.js +1 -0
  223. package/build/esm/index.js.map +1 -1
  224. package/build/esm/utils/assign-ref.d.ts +3 -0
  225. package/build/esm/utils/{assignRef.js → assign-ref.js} +1 -1
  226. package/build/esm/utils/assign-ref.js.map +1 -0
  227. package/build/esm/utils/can-use-dom.d.ts +1 -0
  228. package/build/esm/utils/can-use-dom.js +4 -0
  229. package/build/esm/utils/can-use-dom.js.map +1 -0
  230. package/build/esm/utils/clamp.d.ts +0 -0
  231. package/build/esm/utils/clamp.js.map +1 -1
  232. package/build/esm/utils/context.d.ts +7 -0
  233. package/build/esm/utils/context.js +41 -0
  234. package/build/esm/utils/context.js.map +1 -0
  235. package/build/esm/utils/{createSubscription.d.ts → create-subscription.d.ts} +0 -0
  236. package/build/esm/utils/{createSubscription.js → create-subscription.js} +1 -1
  237. package/build/esm/utils/create-subscription.js.map +1 -0
  238. package/build/esm/utils/{getCircularIndex.d.ts → get-circular-index.d.ts} +0 -0
  239. package/build/esm/utils/{getCircularIndex.js → get-circular-index.js} +1 -1
  240. package/build/esm/utils/get-circular-index.js.map +1 -0
  241. package/build/esm/utils/index.d.ts +10 -4
  242. package/build/esm/utils/index.js +10 -4
  243. package/build/esm/utils/index.js.map +1 -1
  244. package/build/esm/utils/is-right-click.d.ts +6 -0
  245. package/build/esm/utils/is-right-click.js +9 -0
  246. package/build/esm/utils/is-right-click.js.map +1 -0
  247. package/build/esm/utils/owner-document.d.ts +7 -0
  248. package/build/esm/utils/owner-document.js +12 -0
  249. package/build/esm/utils/owner-document.js.map +1 -0
  250. package/build/esm/utils/polymorphic.d.ts +32 -0
  251. package/build/esm/utils/polymorphic.js +2 -0
  252. package/build/esm/utils/polymorphic.js.map +1 -0
  253. package/build/esm/utils/{rubberBandClamp.d.ts → rubber-band-clamp.d.ts} +0 -0
  254. package/build/esm/utils/{rubberBandClamp.js → rubber-band-clamp.js} +1 -1
  255. package/build/esm/utils/rubber-band-clamp.js.map +1 -0
  256. package/build/esm/utils/use-stable-callback.d.ts +16 -0
  257. package/build/esm/utils/use-stable-callback.js +43 -0
  258. package/build/esm/utils/use-stable-callback.js.map +1 -0
  259. package/build/esm/utils/wrap-event.d.ts +3 -0
  260. package/build/esm/utils/{wrapEvent.js → wrap-event.js} +1 -1
  261. package/build/esm/utils/wrap-event.js.map +1 -0
  262. package/build/tsconfig-build.tsbuildinfo +1 -0
  263. package/package.json +5 -6
  264. package/src/Accordion/Accordion.tsx +12 -6
  265. package/src/Accordion/AccordionBody.tsx +4 -5
  266. package/src/Accordion/AccordionHeader.tsx +30 -27
  267. package/src/Accordion/AccordionItem.tsx +12 -6
  268. package/src/Accordion/context.ts +3 -2
  269. package/src/CheckBox/CheckBox.tsx +5 -6
  270. package/src/ComboBox/ComboBox.story.tsx +3 -3
  271. package/src/ComboBox/Combobox.tsx +5 -8
  272. package/src/ComboBox/ComboboxButton.tsx +15 -9
  273. package/src/ComboBox/ComboboxInput.tsx +18 -10
  274. package/src/ComboBox/ComboboxLabel.tsx +4 -4
  275. package/src/ComboBox/ComboboxList.tsx +5 -6
  276. package/src/ComboBox/ComboboxOption.tsx +12 -8
  277. package/src/ComboBox/ComboboxPopover.tsx +15 -10
  278. package/src/ComboBox/context.ts +10 -9
  279. package/src/ComboBox/hooks.tsx +4 -3
  280. package/src/FocusLock/FocusLock.tsx +13 -7
  281. package/src/FocusLock/useFocusLock.ts +4 -3
  282. package/src/List/List.tsx +5 -5
  283. package/src/List/ListItem.tsx +5 -5
  284. package/src/Menu/Menu.story.tsx +2 -2
  285. package/src/Menu/Menu.tsx +13 -7
  286. package/src/Menu/MenuButton.tsx +13 -10
  287. package/src/Menu/MenuItem.tsx +15 -11
  288. package/src/Menu/MenuList.tsx +6 -6
  289. package/src/Menu/MenuPopover.tsx +4 -4
  290. package/src/Menu/context.ts +9 -4
  291. package/src/Modal/Modal.tsx +11 -7
  292. package/src/Modal/ModalBackdrop.tsx +16 -11
  293. package/src/Popper/Popper.tsx +7 -7
  294. package/src/Popper/PopperArrow.tsx +6 -8
  295. package/src/RadioButton/RadioButton.tsx +11 -6
  296. package/src/RadioButton/RadioGroup.tsx +11 -9
  297. package/src/RadioButton/context.ts +2 -4
  298. package/src/SkipNav/SkipNav.tsx +5 -5
  299. package/src/Slider/Slider.story.tsx +45 -0
  300. package/src/Slider/Slider.tsx +1106 -0
  301. package/src/Slider/index.ts +1 -0
  302. package/src/Slider/styles.css +131 -0
  303. package/src/Spinner/Spinner.tsx +13 -9
  304. package/src/Spinner/SpinnerButton.tsx +11 -6
  305. package/src/Spinner/context.ts +2 -3
  306. package/src/Tabs/Tab.tsx +13 -8
  307. package/src/Tabs/TabList.tsx +5 -5
  308. package/src/Tabs/TabPanel.tsx +5 -5
  309. package/src/Tabs/TabPanels.tsx +4 -4
  310. package/src/Tabs/Tabs.tsx +5 -7
  311. package/src/Tabs/context.ts +2 -3
  312. package/src/Tooltip/Tooltip.story.tsx +3 -3
  313. package/src/Tooltip/Tooltip.tsx +13 -7
  314. package/src/Tooltip/stateMachine.ts +9 -13
  315. package/src/Tooltip/useTooltip.ts +17 -11
  316. package/src/hooks/useAutoFocus.ts +2 -1
  317. package/src/hooks/useControlledState.ts +14 -14
  318. package/src/hooks/useFocusState.ts +4 -3
  319. package/src/hooks/useGestureHandlers.ts +33 -19
  320. package/src/hooks/useMeasure.ts +2 -2
  321. package/src/hooks/useOnClickOutside.ts +2 -2
  322. package/src/hooks/useOnKeyDown.ts +4 -3
  323. package/src/hooks/useRemoveBodyScroll.ts +18 -8
  324. package/src/index.ts +1 -0
  325. package/src/utils/{assignRef.ts → assign-ref.ts} +4 -4
  326. package/src/utils/can-use-dom.ts +7 -0
  327. package/src/utils/context.tsx +48 -0
  328. package/src/utils/{createSubscription.ts → create-subscription.ts} +0 -0
  329. package/src/utils/{getCircularIndex.ts → get-circular-index.ts} +0 -0
  330. package/src/utils/index.ts +10 -4
  331. package/src/utils/is-right-click.ts +14 -0
  332. package/src/utils/owner-document.ts +13 -0
  333. package/src/utils/polymorphic.ts +72 -0
  334. package/src/utils/{rubberBandClamp.ts → rubber-band-clamp.ts} +0 -0
  335. package/src/utils/use-stable-callback.ts +58 -0
  336. package/src/utils/wrap-event.ts +22 -0
  337. package/build/esm/hooks/useId.d.ts +0 -3
  338. package/build/esm/hooks/useId.js +0 -16
  339. package/build/esm/hooks/useId.js.map +0 -1
  340. package/build/esm/utils/assignRef.d.ts +0 -3
  341. package/build/esm/utils/assignRef.js.map +0 -1
  342. package/build/esm/utils/createSubscription.js.map +0 -1
  343. package/build/esm/utils/getCircularIndex.js.map +0 -1
  344. package/build/esm/utils/rubberBandClamp.js.map +0 -1
  345. package/build/esm/utils/wrapEvent.d.ts +0 -3
  346. package/build/esm/utils/wrapEvent.js.map +0 -1
  347. package/build/tsconfig.tsbuildinfo +0 -1
  348. package/src/utils/wrapEvent.ts +0 -20
@@ -0,0 +1 @@
1
+ export * from './Slider';
@@ -0,0 +1,131 @@
1
+ :root {
2
+ --reach-slider: 1;
3
+ }
4
+
5
+ [data-reach-slider-input] {
6
+ max-width: 100%;
7
+ }
8
+
9
+ [data-reach-slider-input][data-orientation="horizontal"] {
10
+ height: 0.5rem;
11
+ }
12
+
13
+ [data-reach-slider-input][data-orientation="vertical"] {
14
+ width: 0.5rem;
15
+ /* the height is somewhat arbitrary but necessary for vertical sliders for
16
+ basic functionality */
17
+ height: 250px;
18
+ max-height: 100%;
19
+ }
20
+
21
+ [data-reach-slider-input][data-disabled] {
22
+ opacity: 0.5;
23
+ pointer-events: none;
24
+ }
25
+
26
+ [data-reach-slider-track] {
27
+ position: relative;
28
+ border-radius: 0.25rem;
29
+ background: hsl(0, 0%, 95%);
30
+ }
31
+
32
+ [data-reach-slider-track][data-orientation="horizontal"] {
33
+ width: 100%;
34
+ height: inherit;
35
+ }
36
+
37
+ [data-reach-slider-track][data-orientation="vertical"] {
38
+ width: inherit;
39
+ height: 100%;
40
+ }
41
+
42
+ /* This pseudo element provides an invisible area that increases the touch
43
+ target size of the track */
44
+ [data-reach-slider-track]::before {
45
+ content: "";
46
+ position: absolute;
47
+ }
48
+
49
+ [data-reach-slider-track][data-orientation="horizontal"]::before {
50
+ width: 100%;
51
+ height: 1.5rem;
52
+ top: calc(-0.5rem - 1px);
53
+ left: 0;
54
+ }
55
+
56
+ [data-reach-slider-track][data-orientation="vertical"]::before {
57
+ width: 1.5rem;
58
+ height: 100%;
59
+ top: 0;
60
+ left: calc(-0.5rem - 1px);
61
+ }
62
+
63
+ [data-reach-slider-handle] {
64
+ width: 16px;
65
+ height: 16px;
66
+ background: #1159a6;
67
+ border-radius: 10px;
68
+ z-index: 1;
69
+ transform-origin: center;
70
+ }
71
+
72
+ [data-reach-slider-handle][aria-orientation="horizontal"] {
73
+ top: 50%;
74
+ transform: translateY(-50%);
75
+ }
76
+
77
+ [data-reach-slider-handle][aria-orientation="horizontal"]:focus {
78
+ transform: translateY(-50%);
79
+ }
80
+
81
+ [data-reach-slider-handle][aria-orientation="vertical"] {
82
+ left: 50%;
83
+ transform: translateX(-50%);
84
+ }
85
+
86
+ [data-reach-slider-range] {
87
+ border-radius: inherit;
88
+ background: #1159a6;
89
+ left: 0;
90
+ bottom: 0;
91
+ }
92
+
93
+ [data-reach-slider-range][data-orientation="horizontal"] {
94
+ height: 100%;
95
+ }
96
+
97
+ [data-reach-slider-range][data-orientation="vertical"] {
98
+ width: 100%;
99
+ }
100
+
101
+ [data-reach-slider-marker] {
102
+ background: hsl(0, 0%, 50%);
103
+ transform-origin: center;
104
+ }
105
+
106
+ [data-reach-slider-marker][data-orientation="horizontal"] {
107
+ top: 50%;
108
+ transform: translate(-50%, -50%);
109
+ width: 3px;
110
+ height: 0.75rem;
111
+ }
112
+
113
+ [data-reach-slider-marker][data-orientation="vertical"] {
114
+ left: 50%;
115
+ transform: translate(-50%, -50%);
116
+ width: 0.75rem;
117
+ height: 3px;
118
+ }
119
+
120
+ [data-reach-slider-marker][data-state="at-value"],
121
+ [data-reach-slider-marker][data-state="under-value"] {
122
+ /* */
123
+ }
124
+
125
+ [data-reach-slider-track-highlight][data-orientation="horizontal"] {
126
+ height: 100%;
127
+ }
128
+
129
+ [data-reach-slider-track-highlight][data-orientation="vertical"] {
130
+ width: 100%;
131
+ }
@@ -1,23 +1,27 @@
1
+ import type {
2
+ HTMLAttributes,
3
+ ElementType,
4
+ ReactNode,
5
+ MouseEvent,
6
+ KeyboardEvent,
7
+ } from 'react';
1
8
  import { forwardRef, useState, useRef } from 'react';
2
- import * as React from 'react';
3
9
 
4
10
  import { SpinnerProvider } from './context';
5
11
  import { clamp as clampFunc } from '../utils/clamp';
6
12
  import { wrapEvent, assignMultipleRefs } from '../utils';
7
13
 
8
14
  export interface SpinnerProps
9
- extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
10
- as?: React.ElementType<any>;
11
- innerAs?: React.ElementType<any>;
12
- children?: React.ReactNode;
15
+ extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
16
+ as?: ElementType<any>;
17
+ innerAs?: ElementType<any>;
18
+ children?: ReactNode;
13
19
  value?: number;
14
20
  minValue?: number;
15
21
  maxValue?: number;
16
22
  stepSize?: number;
17
23
  onChange?: (
18
- e:
19
- | React.MouseEvent<HTMLButtonElement>
20
- | React.KeyboardEvent<HTMLDivElement>,
24
+ e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLDivElement>,
21
25
  value: number
22
26
  ) => void;
23
27
  }
@@ -41,7 +45,7 @@ export const Spinner = forwardRef<HTMLDivElement, SpinnerProps>(
41
45
 
42
46
  const clamp = (value: number) => clampFunc(value, minValue, maxValue);
43
47
 
44
- const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
48
+ const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {
45
49
  let nextValue = value;
46
50
  switch (e.key) {
47
51
  case 'ArrowUp':
@@ -1,14 +1,19 @@
1
+ import type {
2
+ ButtonHTMLAttributes,
3
+ ElementType,
4
+ MouseEvent,
5
+ ReactNode,
6
+ } from 'react';
1
7
  import { forwardRef } from 'react';
2
- import * as React from 'react';
3
8
 
4
9
  import { useSpinnerContext } from './context';
5
10
  import { wrapEvent } from '../utils';
6
11
 
7
12
  export interface SpinnerButtonProps
8
- extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
9
- as?: React.ElementType<any>;
10
- innerAs?: React.ElementType<any>;
11
- children?: React.ReactNode;
13
+ extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
14
+ as?: ElementType<any>;
15
+ innerAs?: ElementType<any>;
16
+ children?: ReactNode;
12
17
  type: 'next' | 'previous';
13
18
  }
14
19
 
@@ -21,7 +26,7 @@ export const SpinnerButton = forwardRef<HTMLButtonElement, SpinnerButtonProps>(
21
26
  throw new Error('Missing <Spinner /> in component tree');
22
27
  }
23
28
 
24
- const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
29
+ const handleClick = (e: MouseEvent<HTMLButtonElement>) => {
25
30
  const delta = type === 'next' ? 1 : -1;
26
31
 
27
32
  spinnerContext.onChange &&
@@ -1,3 +1,4 @@
1
+ import type { KeyboardEvent, MouseEvent } from 'react';
1
2
  import { createContext, useContext } from 'react';
2
3
 
3
4
  // Spinner Component
@@ -7,9 +8,7 @@ export interface SpinnerContextProps {
7
8
  maxValue: number;
8
9
  stepSize: number;
9
10
  onChange?: (
10
- e:
11
- | React.MouseEvent<HTMLButtonElement>
12
- | React.KeyboardEvent<HTMLDivElement>,
11
+ e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLDivElement>,
13
12
  value: number
14
13
  ) => void;
15
14
  clamp: (value: number) => number;
package/src/Tabs/Tab.tsx CHANGED
@@ -1,5 +1,11 @@
1
+ import type {
2
+ ButtonHTMLAttributes,
3
+ ElementType,
4
+ KeyboardEvent,
5
+ MouseEvent,
6
+ ReactNode,
7
+ } from 'react';
1
8
  import { forwardRef, useRef } from 'react';
2
- import * as React from 'react';
3
9
 
4
10
  import { useTabsContext, useTabListContext } from './context';
5
11
  import { assignMultipleRefs, getCircularIndex, wrapEvent } from '../utils';
@@ -24,11 +30,10 @@ function getNextIndex(
24
30
  return null;
25
31
  }
26
32
 
27
- export interface TabProps
28
- extends React.ButtonHTMLAttributes<HTMLButtonElement> {
29
- as?: React.ElementType<any>;
30
- innerAs?: React.ElementType<any>;
31
- children?: React.ReactNode;
33
+ export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
34
+ as?: ElementType<any>;
35
+ innerAs?: ElementType<any>;
36
+ children?: ReactNode;
32
37
  }
33
38
 
34
39
  export const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(
@@ -51,7 +56,7 @@ export const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(
51
56
  throw new Error('Missing <Tabs /> or <TabList /> in the component tree');
52
57
  }
53
58
 
54
- const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {
59
+ const handleKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {
55
60
  const right = tabListContext.vertical ? 'ArrowDown' : 'ArrowRight';
56
61
  const left = tabListContext.vertical ? 'ArrowUp' : 'ArrowLeft';
57
62
  const first = 'Home';
@@ -94,7 +99,7 @@ export const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(
94
99
  }
95
100
  };
96
101
 
97
- const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
102
+ const handleClick = (e: MouseEvent<HTMLButtonElement>) => {
98
103
  const allTabs = tabListContext.tabsScope.current.queryAllNodes(scopeQuery);
99
104
  const currentIndex = ref.current ? allTabs.indexOf(ref.current) : -1;
100
105
 
@@ -1,3 +1,4 @@
1
+ import type { HTMLAttributes, ElementType, ReactNode } from 'react';
1
2
  import {
2
3
  forwardRef,
3
4
  useRef,
@@ -6,18 +7,17 @@ import {
6
7
  cloneElement,
7
8
  useId,
8
9
  } from 'react';
9
- import * as React from 'react';
10
10
 
11
11
  import { TabListProvider, useTabsContext } from './context';
12
12
  import { useScope } from '../hooks';
13
13
  import { assignMultipleRefs } from '../utils';
14
14
 
15
- export interface TabListProps extends React.HTMLAttributes<HTMLDivElement> {
16
- as?: React.ElementType<any>;
17
- innerAs?: React.ElementType<any>;
15
+ export interface TabListProps extends HTMLAttributes<HTMLDivElement> {
16
+ as?: ElementType<any>;
17
+ innerAs?: ElementType<any>;
18
18
  manualActivation?: boolean;
19
19
  vertical?: boolean;
20
- children?: React.ReactNode;
20
+ children?: ReactNode;
21
21
  }
22
22
 
23
23
  export const TabList = forwardRef<HTMLDivElement, TabListProps>(
@@ -1,12 +1,12 @@
1
+ import type { ElementType, HTMLAttributes, ReactNode } from 'react';
1
2
  import { forwardRef } from 'react';
2
- import * as React from 'react';
3
3
 
4
4
  import { useTabsContext } from './context';
5
5
 
6
- export interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement> {
7
- as?: React.ElementType<any>;
8
- innerAs?: React.ElementType<any>;
9
- children?: React.ReactNode;
6
+ export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
7
+ as?: ElementType<any>;
8
+ innerAs?: ElementType<any>;
9
+ children?: ReactNode;
10
10
  lazy?: boolean;
11
11
  }
12
12
 
@@ -1,11 +1,11 @@
1
+ import type { ElementType, ReactNode } from 'react';
1
2
  import { forwardRef, Fragment, Children, cloneElement } from 'react';
2
- import * as React from 'react';
3
3
 
4
4
  export interface TabPanelsProps {
5
- as?: React.ElementType<any>;
6
- innerAs?: React.ElementType<any>;
5
+ as?: ElementType<any>;
6
+ innerAs?: ElementType<any>;
7
7
  lazy?: boolean;
8
- children?: React.ReactNode;
8
+ children?: ReactNode;
9
9
  }
10
10
 
11
11
  export const TabPanels = forwardRef<HTMLDivElement, TabPanelsProps>(
package/src/Tabs/Tabs.tsx CHANGED
@@ -1,17 +1,15 @@
1
+ import type { ElementType, KeyboardEvent, MouseEvent, ReactNode } from 'react';
1
2
  import { forwardRef, Fragment, useState } from 'react';
2
- import * as React from 'react';
3
3
 
4
4
  import { TabsProvider } from './context';
5
5
  import { useControlledState } from '../hooks';
6
6
 
7
7
  export interface TabsProps {
8
- as?: React.ElementType<any>;
9
- innerAs?: React.ElementType<any>;
10
- children?: React.ReactNode;
8
+ as?: ElementType<any>;
9
+ innerAs?: ElementType<any>;
10
+ children?: ReactNode;
11
11
  onChange?: (
12
- e:
13
- | React.MouseEvent<HTMLButtonElement>
14
- | React.KeyboardEvent<HTMLButtonElement>,
12
+ e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>,
15
13
  value: number
16
14
  ) => void;
17
15
  index?: number;
@@ -1,3 +1,4 @@
1
+ import type { KeyboardEvent, MouseEvent } from 'react';
1
2
  import { createContext, useContext } from 'react';
2
3
 
3
4
  import type { Scope } from '../hooks/useScope';
@@ -6,9 +7,7 @@ import type { Scope } from '../hooks/useScope';
6
7
  export interface TabsContextProps {
7
8
  currentIndex: number;
8
9
  onChange?: (
9
- e:
10
- | React.MouseEvent<HTMLButtonElement>
11
- | React.KeyboardEvent<HTMLButtonElement>,
10
+ e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>,
12
11
  value: number
13
12
  ) => void;
14
13
  tabListId: string | null;
@@ -1,4 +1,4 @@
1
- import React, { useRef, forwardRef } from 'react';
1
+ import { useRef, forwardRef } from 'react';
2
2
 
3
3
  import { Tooltip } from './';
4
4
  import { Popper } from '../Popper/Popper';
@@ -29,7 +29,7 @@ const StyledTooltip = forwardRef<HTMLDivElement, InjectedTooltipProps>(
29
29
  );
30
30
 
31
31
  const Example = () => {
32
- const buttonRef = useRef();
32
+ const buttonRef = useRef<HTMLButtonElement | null>(null);
33
33
  return (
34
34
  <div style={{ margin: 100, display: 'flex' }}>
35
35
  <Tooltip label={'Im groot'} as={StyledTooltip}>
@@ -43,7 +43,7 @@ const Example = () => {
43
43
  };
44
44
 
45
45
  const ExampleWithHidingButton = () => {
46
- const buttonRef = useRef();
46
+ const buttonRef = useRef<HTMLButtonElement | null>(null);
47
47
  return (
48
48
  <ul style={{ margin: 100 }}>
49
49
  {Array.from({ length: 20 }).map((_, index) => (
@@ -1,14 +1,20 @@
1
- import type { ReactElement, RefAttributes } from 'react';
2
- import React, { forwardRef, cloneElement, Children } from 'react';
1
+ import type {
2
+ ElementType,
3
+ HTMLAttributes,
4
+ ReactElement,
5
+ ReactNode,
6
+ RefAttributes,
7
+ } from 'react';
8
+ import { forwardRef, cloneElement, Children } from 'react';
3
9
 
4
10
  import { useTooltip } from './useTooltip';
5
11
  export type { InjectedTooltipProps } from './useTooltip';
6
12
 
7
- export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
8
- as?: React.ElementType<any>;
9
- innerAs?: React.ElementType<any>;
10
- children?: React.ReactNode;
11
- label: React.ReactNode;
13
+ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
14
+ as?: ElementType<any>;
15
+ innerAs?: ElementType<any>;
16
+ children?: ReactNode;
17
+ label: ReactNode;
12
18
  disabled?: boolean;
13
19
  }
14
20
 
@@ -1,4 +1,4 @@
1
- import { createSubscription } from '../utils/createSubscription';
1
+ import { createSubscription } from '../utils/create-subscription';
2
2
  import type { StateChart as GenericStateChart } from '../hooks/useReducerMachine';
3
3
 
4
4
  ////////////////////////////////////////////////////////////////////////////////
@@ -6,31 +6,27 @@ import type { StateChart as GenericStateChart } from '../hooks/useReducerMachine
6
6
 
7
7
  // Manages when the user "rests" on an element. Keeps the interface from being
8
8
  // flashing tooltips all the time as the user moves the mouse around the screen.
9
- let restTimeout: number;
9
+ let restTimeout: NodeJS.Timeout;
10
10
  function startRestTimer() {
11
- window.clearTimeout(restTimeout);
12
- restTimeout = window.setTimeout(() => {
11
+ clearTimeout(restTimeout);
12
+ restTimeout = setTimeout(() => {
13
13
  send(Rest, undefined);
14
14
  }, 200);
15
15
  }
16
16
 
17
17
  function clearRestTimer() {
18
- window.clearTimeout(restTimeout);
18
+ clearTimeout(restTimeout);
19
19
  }
20
20
 
21
21
  // Manages the delay to hide the tooltip after rest leaves.
22
- let leavingVisibleTimer: number;
23
-
22
+ let leavingVisibleTimer: NodeJS.Timeout;
24
23
  function startLeavingVisibleTimer() {
25
- window.clearTimeout(leavingVisibleTimer);
26
- leavingVisibleTimer = window.setTimeout(
27
- () => send(TimeComplete, undefined),
28
- 100
29
- );
24
+ clearTimeout(leavingVisibleTimer);
25
+ leavingVisibleTimer = setTimeout(() => send(TimeComplete, undefined), 100);
30
26
  }
31
27
 
32
28
  function clearLeavingVisibleTimer() {
33
- window.clearTimeout(leavingVisibleTimer);
29
+ clearTimeout(leavingVisibleTimer);
34
30
  }
35
31
 
36
32
  ////////////////////////////////////////////////////////////////////////////////
@@ -1,8 +1,15 @@
1
- import type { RefAttributes } from 'react';
1
+ import type {
2
+ HTMLAttributes,
3
+ KeyboardEvent,
4
+ ReactNode,
5
+ Ref,
6
+ RefAttributes,
7
+ RefObject,
8
+ } from 'react';
2
9
  import { useRef, useEffect, useState, useId } from 'react';
3
10
 
4
- import { assignMultipleRefs } from '../utils/assignRef';
5
- import { wrapEvent } from '../utils/wrapEvent';
11
+ import { assignMultipleRefs } from '../utils/assign-ref';
12
+ import { wrapEvent } from '../utils/wrap-event';
6
13
  import {
7
14
  send,
8
15
  state,
@@ -18,20 +25,19 @@ import {
18
25
  Visible,
19
26
  } from './stateMachine';
20
27
 
21
- export type ChildProps = React.HTMLAttributes<HTMLElement> &
28
+ export type ChildProps = HTMLAttributes<HTMLElement> &
22
29
  RefAttributes<HTMLElement>;
23
30
 
24
- export interface InjectedTooltipProps
25
- extends React.HTMLAttributes<HTMLElement> {
26
- anchorEl: React.RefObject<HTMLElement>;
31
+ export interface InjectedTooltipProps extends HTMLAttributes<HTMLElement> {
32
+ anchorEl: RefObject<HTMLElement>;
27
33
  visible: boolean;
28
- children?: React.ReactNode;
34
+ children?: ReactNode;
29
35
  }
30
36
 
31
37
  export function useTooltip(
32
38
  childProps: ChildProps,
33
- childRef: React.Ref<HTMLElement> | undefined,
34
- tooltipProps: React.HTMLAttributes<HTMLElement> & { label?: React.ReactNode }
39
+ childRef: Ref<HTMLElement> | undefined,
40
+ tooltipProps: HTMLAttributes<HTMLElement> & { label?: ReactNode }
35
41
  ): [ChildProps, InjectedTooltipProps] {
36
42
  const {
37
43
  onMouseEnter,
@@ -86,7 +92,7 @@ export function useTooltip(
86
92
  }
87
93
  }
88
94
 
89
- function handleKeyDown(event: React.KeyboardEvent<HTMLElement>) {
95
+ function handleKeyDown(event: KeyboardEvent<HTMLElement>) {
90
96
  if (event.key === 'Enter' || event.key === ' ') {
91
97
  send(SelectWithKeyboard);
92
98
  }
@@ -1,10 +1,11 @@
1
+ import type { MutableRefObject } from 'react';
1
2
  import { useEffect } from 'react';
2
3
 
3
4
  import { focusOnChildNode } from '../FocusLock/tabUtils';
4
5
 
5
6
  export function useAutoFocus(
6
7
  open: boolean,
7
- elementRef: React.MutableRefObject<HTMLElement | null>
8
+ elementRef: MutableRefObject<HTMLElement | null>
8
9
  ) {
9
10
  useEffect(() => {
10
11
  if (open) {
@@ -1,3 +1,4 @@
1
+ import type { Dispatch, SetStateAction, SyntheticEvent } from 'react';
1
2
  import { useRef, useState } from 'react';
2
3
 
3
4
  import type { CustomEventHandler } from '../utils';
@@ -5,35 +6,34 @@ import { wrapEvent } from '../utils';
5
6
 
6
7
  export function useControlledState<
7
8
  V,
8
- E extends React.SyntheticEvent<any>,
9
+ E extends SyntheticEvent<any> | Event,
9
10
  H extends unknown[]
10
11
  >(
11
12
  valueProp: V | undefined,
12
13
  onChangeProp: CustomEventHandler<E, H> | undefined,
13
- defaultValue: V,
14
+ defaultValue: V | (() => V),
14
15
  defaultOnChange: (
15
- setValue: React.Dispatch<React.SetStateAction<V>>
16
+ setValue: Dispatch<SetStateAction<V>>
16
17
  ) => CustomEventHandler<E, H>
17
- ): [
18
- V,
19
- CustomEventHandler<E, H> | undefined,
20
- React.Dispatch<React.SetStateAction<V>>
21
- ] {
22
- const isControlled = useRef(valueProp !== undefined);
18
+ ): [V, CustomEventHandler<E, H>] {
19
+ const isControlled = valueProp !== undefined;
20
+ const wasControlled = useRef(isControlled);
23
21
  const [valueState, setValueState] = useState<V>(defaultValue);
24
22
 
25
- if (isControlled.current) {
26
- if (valueProp === undefined) {
23
+ if (isControlled) {
24
+ if (wasControlled.current && process.env.NODE_ENV !== 'production') {
27
25
  console.warn('Trying to change from controlled to uncontrolled.');
28
26
  }
29
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
30
- return [valueProp!, onChangeProp, setValueState];
27
+ return [
28
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
29
+ valueProp!,
30
+ wrapEvent(onChangeProp, defaultOnChange(setValueState)),
31
+ ];
31
32
  }
32
33
 
33
34
  return [
34
35
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
35
36
  valueState!,
36
37
  wrapEvent(onChangeProp, defaultOnChange(setValueState)),
37
- setValueState,
38
38
  ];
39
39
  }
@@ -1,11 +1,12 @@
1
+ import type { FocusEventHandler } from 'react';
1
2
  import { useState } from 'react';
2
3
 
3
- import { wrapEvent } from '../utils/wrapEvent';
4
+ import { wrapEvent } from '../utils/wrap-event';
4
5
 
5
6
  export function useFocusState<T>(
6
7
  props: {
7
- onFocus?: React.FocusEventHandler<T>;
8
- onBlur?: React.FocusEventHandler<T>;
8
+ onFocus?: FocusEventHandler<T>;
9
+ onBlur?: FocusEventHandler<T>;
9
10
  } = {}
10
11
  ) {
11
12
  const { onFocus, onBlur } = props;