@oneplatformdev/ui 0.1.0-8 → 0.1.9-2

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 (672) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/package.json +6 -3
  3. package/.babelrc +0 -12
  4. package/.storybook/main.ts +0 -48
  5. package/.storybook/manager.ts +0 -6
  6. package/.storybook/preview.ts +0 -29
  7. package/dist/CHANGELOG.md +0 -31
  8. package/dist/LICENSE +0 -21
  9. package/dist/README.md +0 -7
  10. package/dist/package.json +0 -77
  11. package/external.ts +0 -78
  12. package/kit/MultiSelectCombobox/MultiSelectCombobox.tsx +0 -211
  13. package/kit/MultiSelectCombobox/index.tsx +0 -2
  14. package/kit/MultiSelectCombobox/types.ts +0 -22
  15. package/kit/NLTDateRangePicker/index.tsx +0 -85
  16. package/kit/NLTFilesDropZone/imageList/index.tsx +0 -86
  17. package/kit/NLTFilesDropZone/index.tsx +0 -52
  18. package/kit/NLTFormDateRangePicker/index.tsx +0 -29
  19. package/kit/NLTFormFilesDropZone/index.tsx +0 -73
  20. package/kit/NLTFormPhoneField/index.tsx +0 -36
  21. package/kit/NLTFormPhoneInput/index.tsx +0 -32
  22. package/kit/NLTImageDropZone/index.tsx +0 -105
  23. package/kit/NLTModal/index.tsx +0 -36
  24. package/kit/NLTModal/useModal.ts +0 -10
  25. package/kit/NLTModalHeader/index.tsx +0 -48
  26. package/kit/NLTModalHeader/useModal.ts +0 -10
  27. package/kit/NLTMonthYearPicker/index.tsx +0 -66
  28. package/kit/NLTMonthYearPicker/useMonthYearPicker.ts +0 -37
  29. package/kit/NLTPhoneInput/index.tsx +0 -153
  30. package/kit/NLTPieChart/index.tsx +0 -62
  31. package/kit/NLTSidebar/app-sidebar.tsx +0 -39
  32. package/kit/NLTSidebar/nav-main.tsx +0 -68
  33. package/kit/NLTSidebar/nav-projects.tsx +0 -89
  34. package/kit/NLTSidebar/nav-user.tsx +0 -114
  35. package/kit/NLTSidebar/team-switcher.tsx +0 -89
  36. package/kit/NLTTable/NLTTable.tsx +0 -50
  37. package/kit/NLTTable/index.tsx +0 -1
  38. package/kit/NLTTablePagination/index.tsx +0 -75
  39. package/kit/Sidebar/SidebarNav/SidebarNavGroup.tsx +0 -27
  40. package/kit/Sidebar/SidebarNav/SidebarNavGroupItem.tsx +0 -120
  41. package/kit/Sidebar/SidebarNav/index.ts +0 -3
  42. package/kit/Sidebar/SidebarNav/types.ts +0 -19
  43. package/kit/Sidebar/index.ts +0 -1
  44. package/kit/Stepper/LinearStepper.tsx +0 -91
  45. package/kit/Stepper/Stepper.tsx +0 -17
  46. package/kit/Stepper/VerticalStepper.tsx +0 -91
  47. package/kit/Stepper/index.ts +0 -1
  48. package/kit/Stepper/types.ts +0 -21
  49. package/kit/Stepper/useStepper.ts +0 -40
  50. package/node_modules/@oneplatformdev/hooks/.babelrc +0 -12
  51. package/node_modules/@oneplatformdev/hooks/CHANGELOG.md +0 -23
  52. package/node_modules/@oneplatformdev/hooks/LICENSE +0 -21
  53. package/node_modules/@oneplatformdev/hooks/README.md +0 -7
  54. package/node_modules/@oneplatformdev/hooks/dist/CHANGELOG.md +0 -19
  55. package/node_modules/@oneplatformdev/hooks/dist/LICENSE +0 -21
  56. package/node_modules/@oneplatformdev/hooks/dist/README.md +0 -7
  57. package/node_modules/@oneplatformdev/hooks/dist/index.d.ts +0 -37
  58. package/node_modules/@oneplatformdev/hooks/dist/index.d.ts.map +0 -1
  59. package/node_modules/@oneplatformdev/hooks/dist/index.js +0 -74
  60. package/node_modules/@oneplatformdev/hooks/dist/package.json +0 -68
  61. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.d.ts +0 -2
  62. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.d.ts.map +0 -1
  63. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.js +0 -4
  64. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.d.ts +0 -29
  65. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.d.ts.map +0 -1
  66. package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.js +0 -16
  67. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.d.ts +0 -2
  68. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.d.ts.map +0 -1
  69. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.js +0 -4
  70. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.d.ts +0 -17
  71. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.d.ts.map +0 -1
  72. package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.js +0 -9
  73. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.d.ts +0 -2
  74. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.d.ts.map +0 -1
  75. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.js +0 -4
  76. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.d.ts +0 -34
  77. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.d.ts.map +0 -1
  78. package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.js +0 -16
  79. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.d.ts +0 -2
  80. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.d.ts.map +0 -1
  81. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.js +0 -4
  82. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.d.ts +0 -47
  83. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.d.ts.map +0 -1
  84. package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.js +0 -33
  85. package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.d.ts +0 -2
  86. package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.d.ts.map +0 -1
  87. package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.js +0 -4
  88. package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.d.ts +0 -28
  89. package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.d.ts.map +0 -1
  90. package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.js +0 -20
  91. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.d.ts +0 -2
  92. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.d.ts.map +0 -1
  93. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.js +0 -4
  94. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.d.ts +0 -46
  95. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.d.ts.map +0 -1
  96. package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.js +0 -38
  97. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.d.ts +0 -3
  98. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.d.ts.map +0 -1
  99. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.js +0 -5
  100. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.d.ts +0 -62
  101. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.d.ts.map +0 -1
  102. package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.js +0 -21
  103. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.d.ts +0 -2
  104. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.d.ts.map +0 -1
  105. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.js +0 -4
  106. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.d.ts +0 -40
  107. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.d.ts.map +0 -1
  108. package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.js +0 -13
  109. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.d.ts +0 -2
  110. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.d.ts.map +0 -1
  111. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.js +0 -4
  112. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.d.ts +0 -19
  113. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.d.ts.map +0 -1
  114. package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.js +0 -16
  115. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.d.ts +0 -2
  116. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.d.ts.map +0 -1
  117. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.js +0 -4
  118. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.d.ts +0 -18
  119. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.d.ts.map +0 -1
  120. package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.js +0 -13
  121. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.d.ts +0 -2
  122. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.d.ts.map +0 -1
  123. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.js +0 -4
  124. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.d.ts +0 -7
  125. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.d.ts.map +0 -1
  126. package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.js +0 -20
  127. package/node_modules/@oneplatformdev/hooks/dist/useHover/index.d.ts +0 -2
  128. package/node_modules/@oneplatformdev/hooks/dist/useHover/index.d.ts.map +0 -1
  129. package/node_modules/@oneplatformdev/hooks/dist/useHover/index.js +0 -4
  130. package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.d.ts +0 -17
  131. package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.d.ts.map +0 -1
  132. package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.js +0 -13
  133. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.d.ts +0 -2
  134. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.d.ts.map +0 -1
  135. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.js +0 -4
  136. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.d.ts +0 -72
  137. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.d.ts.map +0 -1
  138. package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.js +0 -53
  139. package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.d.ts +0 -2
  140. package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.d.ts.map +0 -1
  141. package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.js +0 -4
  142. package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.d.ts +0 -16
  143. package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.d.ts.map +0 -1
  144. package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.js +0 -20
  145. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.d.ts +0 -2
  146. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.d.ts.map +0 -1
  147. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.js +0 -4
  148. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.d.ts +0 -13
  149. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.d.ts.map +0 -1
  150. package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.js +0 -10
  151. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.d.ts +0 -3
  152. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.d.ts.map +0 -1
  153. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.js +0 -4
  154. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.d.ts +0 -4
  155. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.d.ts.map +0 -1
  156. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.js +0 -1
  157. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.d.ts +0 -3
  158. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.d.ts.map +0 -1
  159. package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.js +0 -16
  160. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.d.ts +0 -2
  161. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.d.ts.map +0 -1
  162. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.js +0 -4
  163. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.d.ts +0 -2
  164. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.d.ts.map +0 -1
  165. package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.js +0 -10
  166. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.d.ts +0 -2
  167. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.d.ts.map +0 -1
  168. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.js +0 -4
  169. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +0 -16
  170. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts.map +0 -1
  171. package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +0 -5
  172. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.d.ts +0 -2
  173. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.d.ts.map +0 -1
  174. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.js +0 -4
  175. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.d.ts +0 -39
  176. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.d.ts.map +0 -1
  177. package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.js +0 -65
  178. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.d.ts +0 -2
  179. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.d.ts.map +0 -1
  180. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.js +0 -4
  181. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.d.ts +0 -2
  182. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.d.ts.map +0 -1
  183. package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.js +0 -12
  184. package/node_modules/@oneplatformdev/hooks/dist/useMap/index.d.ts +0 -2
  185. package/node_modules/@oneplatformdev/hooks/dist/useMap/index.d.ts.map +0 -1
  186. package/node_modules/@oneplatformdev/hooks/dist/useMap/index.js +0 -4
  187. package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.d.ts +0 -48
  188. package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.d.ts.map +0 -1
  189. package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.js +0 -27
  190. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.d.ts +0 -2
  191. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.d.ts.map +0 -1
  192. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.js +0 -4
  193. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.d.ts +0 -29
  194. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.d.ts.map +0 -1
  195. package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.js +0 -21
  196. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.d.ts +0 -2
  197. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.d.ts.map +0 -1
  198. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.js +0 -4
  199. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.d.ts +0 -24
  200. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.d.ts.map +0 -1
  201. package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.js +0 -17
  202. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.d.ts +0 -2
  203. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.d.ts.map +0 -1
  204. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.js +0 -4
  205. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.d.ts +0 -10
  206. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.d.ts.map +0 -1
  207. package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.js +0 -10
  208. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.d.ts +0 -2
  209. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.d.ts.map +0 -1
  210. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.js +0 -4
  211. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.d.ts +0 -14
  212. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.d.ts.map +0 -1
  213. package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.js +0 -48
  214. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.d.ts +0 -2
  215. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.d.ts.map +0 -1
  216. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.js +0 -4
  217. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.d.ts +0 -44
  218. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.d.ts.map +0 -1
  219. package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.js +0 -31
  220. package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.d.ts +0 -2
  221. package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.d.ts.map +0 -1
  222. package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.js +0 -4
  223. package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.d.ts +0 -20
  224. package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.d.ts.map +0 -1
  225. package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.js +0 -48
  226. package/node_modules/@oneplatformdev/hooks/dist/useScript/index.d.ts +0 -2
  227. package/node_modules/@oneplatformdev/hooks/dist/useScript/index.d.ts.map +0 -1
  228. package/node_modules/@oneplatformdev/hooks/dist/useScript/index.js +0 -4
  229. package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.d.ts +0 -24
  230. package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.d.ts.map +0 -1
  231. package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.js +0 -45
  232. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.d.ts +0 -2
  233. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.d.ts.map +0 -1
  234. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.js +0 -4
  235. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.d.ts +0 -54
  236. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.d.ts.map +0 -1
  237. package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.js +0 -26
  238. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.d.ts +0 -2
  239. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.d.ts.map +0 -1
  240. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.js +0 -4
  241. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.d.ts +0 -39
  242. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.d.ts.map +0 -1
  243. package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.js +0 -65
  244. package/node_modules/@oneplatformdev/hooks/dist/useStep/index.d.ts +0 -2
  245. package/node_modules/@oneplatformdev/hooks/dist/useStep/index.d.ts.map +0 -1
  246. package/node_modules/@oneplatformdev/hooks/dist/useStep/index.js +0 -4
  247. package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.d.ts +0 -31
  248. package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.d.ts.map +0 -1
  249. package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.js +0 -34
  250. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.d.ts +0 -2
  251. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.d.ts.map +0 -1
  252. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.js +0 -4
  253. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.d.ts +0 -46
  254. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.d.ts.map +0 -1
  255. package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.js +0 -27
  256. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.d.ts +0 -2
  257. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.d.ts.map +0 -1
  258. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.js +0 -4
  259. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.d.ts +0 -17
  260. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.d.ts.map +0 -1
  261. package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.js +0 -20
  262. package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.d.ts +0 -2
  263. package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.d.ts.map +0 -1
  264. package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.js +0 -4
  265. package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.d.ts +0 -18
  266. package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.d.ts.map +0 -1
  267. package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.js +0 -10
  268. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.d.ts +0 -2
  269. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.d.ts.map +0 -1
  270. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.js +0 -4
  271. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.d.ts +0 -14
  272. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.d.ts.map +0 -1
  273. package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.js +0 -13
  274. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.d.ts +0 -2
  275. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.d.ts.map +0 -1
  276. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.js +0 -4
  277. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.d.ts +0 -30
  278. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.d.ts.map +0 -1
  279. package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.js +0 -31
  280. package/node_modules/@oneplatformdev/hooks/package.json +0 -68
  281. package/node_modules/@oneplatformdev/hooks/src/index.ts +0 -36
  282. package/node_modules/@oneplatformdev/hooks/src/useBoolean/index.ts +0 -1
  283. package/node_modules/@oneplatformdev/hooks/src/useBoolean/useBoolean.ts +0 -50
  284. package/node_modules/@oneplatformdev/hooks/src/useClickAnyWhere/index.ts +0 -1
  285. package/node_modules/@oneplatformdev/hooks/src/useClickAnyWhere/useClickAnyWhere.ts +0 -22
  286. package/node_modules/@oneplatformdev/hooks/src/useCopyToClipboard/index.ts +0 -1
  287. package/node_modules/@oneplatformdev/hooks/src/useCopyToClipboard/useCopyToClipboard.ts +0 -58
  288. package/node_modules/@oneplatformdev/hooks/src/useCountdown/index.ts +0 -1
  289. package/node_modules/@oneplatformdev/hooks/src/useCountdown/useCountdown.ts +0 -102
  290. package/node_modules/@oneplatformdev/hooks/src/useCounter/index.ts +0 -1
  291. package/node_modules/@oneplatformdev/hooks/src/useCounter/useCounter.ts +0 -52
  292. package/node_modules/@oneplatformdev/hooks/src/useDarkMode/index.ts +0 -1
  293. package/node_modules/@oneplatformdev/hooks/src/useDarkMode/useDarkMode.ts +0 -92
  294. package/node_modules/@oneplatformdev/hooks/src/useDebounceCallback/index.ts +0 -2
  295. package/node_modules/@oneplatformdev/hooks/src/useDebounceCallback/useDebounceCallback.ts +0 -115
  296. package/node_modules/@oneplatformdev/hooks/src/useDebounceValue/index.ts +0 -1
  297. package/node_modules/@oneplatformdev/hooks/src/useDebounceValue/useDebounceValue.ts +0 -67
  298. package/node_modules/@oneplatformdev/hooks/src/useDocumentTitle/index.ts +0 -1
  299. package/node_modules/@oneplatformdev/hooks/src/useDocumentTitle/useDocumentTitle.ts +0 -43
  300. package/node_modules/@oneplatformdev/hooks/src/useEventCallback/index.ts +0 -1
  301. package/node_modules/@oneplatformdev/hooks/src/useEventCallback/useEventCallback.ts +0 -40
  302. package/node_modules/@oneplatformdev/hooks/src/useEventListener/index.ts +0 -1
  303. package/node_modules/@oneplatformdev/hooks/src/useEventListener/useEventListener.ts +0 -121
  304. package/node_modules/@oneplatformdev/hooks/src/useHover/index.ts +0 -1
  305. package/node_modules/@oneplatformdev/hooks/src/useHover/useHover.ts +0 -37
  306. package/node_modules/@oneplatformdev/hooks/src/useIntersectionObserver/index.ts +0 -1
  307. package/node_modules/@oneplatformdev/hooks/src/useIntersectionObserver/useIntersectionObserver.ts +0 -186
  308. package/node_modules/@oneplatformdev/hooks/src/useInterval/index.ts +0 -1
  309. package/node_modules/@oneplatformdev/hooks/src/useInterval/useInterval.ts +0 -43
  310. package/node_modules/@oneplatformdev/hooks/src/useIsClient/index.ts +0 -1
  311. package/node_modules/@oneplatformdev/hooks/src/useIsClient/useIsClient.ts +0 -22
  312. package/node_modules/@oneplatformdev/hooks/src/useIsMobile/index.ts +0 -2
  313. package/node_modules/@oneplatformdev/hooks/src/useIsMobile/types.ts +0 -3
  314. package/node_modules/@oneplatformdev/hooks/src/useIsMobile/useIsMobile.tsx +0 -23
  315. package/node_modules/@oneplatformdev/hooks/src/useIsMounted/index.ts +0 -1
  316. package/node_modules/@oneplatformdev/hooks/src/useIsMounted/useIsMounted.ts +0 -15
  317. package/node_modules/@oneplatformdev/hooks/src/useIsomorphicLayoutEffect/index.ts +0 -1
  318. package/node_modules/@oneplatformdev/hooks/src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts +0 -17
  319. package/node_modules/@oneplatformdev/hooks/src/useLocalStorage/index.ts +0 -1
  320. package/node_modules/@oneplatformdev/hooks/src/useLocalStorage/useLocalStorage.ts +0 -191
  321. package/node_modules/@oneplatformdev/hooks/src/useLockBody/index.ts +0 -1
  322. package/node_modules/@oneplatformdev/hooks/src/useLockBody/useLockBody.tsx +0 -12
  323. package/node_modules/@oneplatformdev/hooks/src/useMap/index.ts +0 -1
  324. package/node_modules/@oneplatformdev/hooks/src/useMap/useMap.ts +0 -83
  325. package/node_modules/@oneplatformdev/hooks/src/useMediaQuery/index.ts +0 -1
  326. package/node_modules/@oneplatformdev/hooks/src/useMediaQuery/useMediaQuery.ts +0 -83
  327. package/node_modules/@oneplatformdev/hooks/src/useOnClickOutside/index.ts +0 -1
  328. package/node_modules/@oneplatformdev/hooks/src/useOnClickOutside/useOnClickOutside.ts +0 -61
  329. package/node_modules/@oneplatformdev/hooks/src/useQueryString/index.ts +0 -1
  330. package/node_modules/@oneplatformdev/hooks/src/useQueryString/useQueryString.ts +0 -26
  331. package/node_modules/@oneplatformdev/hooks/src/useReadLocalStorage/index.ts +0 -1
  332. package/node_modules/@oneplatformdev/hooks/src/useReadLocalStorage/useReadLocalStorage.ts +0 -122
  333. package/node_modules/@oneplatformdev/hooks/src/useResizeObserver/index.ts +0 -1
  334. package/node_modules/@oneplatformdev/hooks/src/useResizeObserver/useResizeObserver.ts +0 -131
  335. package/node_modules/@oneplatformdev/hooks/src/useScreen/index.ts +0 -1
  336. package/node_modules/@oneplatformdev/hooks/src/useScreen/useScreen.ts +0 -106
  337. package/node_modules/@oneplatformdev/hooks/src/useScript/index.ts +0 -1
  338. package/node_modules/@oneplatformdev/hooks/src/useScript/useScript.ts +0 -142
  339. package/node_modules/@oneplatformdev/hooks/src/useScrollLock/index.ts +0 -1
  340. package/node_modules/@oneplatformdev/hooks/src/useScrollLock/useScrollLock.ts +0 -141
  341. package/node_modules/@oneplatformdev/hooks/src/useSessionStorage/index.ts +0 -1
  342. package/node_modules/@oneplatformdev/hooks/src/useSessionStorage/useSessionStorage.ts +0 -191
  343. package/node_modules/@oneplatformdev/hooks/src/useStep/index.ts +0 -1
  344. package/node_modules/@oneplatformdev/hooks/src/useStep/useStep.ts +0 -83
  345. package/node_modules/@oneplatformdev/hooks/src/useTernaryDarkMode/index.ts +0 -1
  346. package/node_modules/@oneplatformdev/hooks/src/useTernaryDarkMode/useTernaryDarkMode.ts +0 -81
  347. package/node_modules/@oneplatformdev/hooks/src/useTimeout/index.ts +0 -1
  348. package/node_modules/@oneplatformdev/hooks/src/useTimeout/useTimeout.ts +0 -44
  349. package/node_modules/@oneplatformdev/hooks/src/useToggle/index.ts +0 -1
  350. package/node_modules/@oneplatformdev/hooks/src/useToggle/useToggle.ts +0 -30
  351. package/node_modules/@oneplatformdev/hooks/src/useUnmount/index.ts +0 -1
  352. package/node_modules/@oneplatformdev/hooks/src/useUnmount/useUnmount.ts +0 -26
  353. package/node_modules/@oneplatformdev/hooks/src/useWindowSize/index.ts +0 -1
  354. package/node_modules/@oneplatformdev/hooks/src/useWindowSize/useWindowSize.ts +0 -100
  355. package/node_modules/@oneplatformdev/hooks/tsconfig.json +0 -10
  356. package/node_modules/@oneplatformdev/hooks/tsconfig.lib.json +0 -33
  357. package/node_modules/@oneplatformdev/hooks/vite.config.ts +0 -62
  358. package/node_modules/@oneplatformdev/utils/.babelrc +0 -12
  359. package/node_modules/@oneplatformdev/utils/CHANGELOG.md +0 -23
  360. package/node_modules/@oneplatformdev/utils/LICENSE +0 -21
  361. package/node_modules/@oneplatformdev/utils/README.md +0 -7
  362. package/node_modules/@oneplatformdev/utils/dist/CHANGELOG.md +0 -19
  363. package/node_modules/@oneplatformdev/utils/dist/LICENSE +0 -21
  364. package/node_modules/@oneplatformdev/utils/dist/README.md +0 -7
  365. package/node_modules/@oneplatformdev/utils/dist/cn/cn.d.ts +0 -4
  366. package/node_modules/@oneplatformdev/utils/dist/cn/cn.d.ts.map +0 -1
  367. package/node_modules/@oneplatformdev/utils/dist/cn/cn.js +0 -9
  368. package/node_modules/@oneplatformdev/utils/dist/cn/index.d.ts +0 -2
  369. package/node_modules/@oneplatformdev/utils/dist/cn/index.d.ts.map +0 -1
  370. package/node_modules/@oneplatformdev/utils/dist/cn/index.js +0 -5
  371. package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.d.ts +0 -4
  372. package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.d.ts.map +0 -1
  373. package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.js +0 -10
  374. package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.d.ts +0 -2
  375. package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.d.ts.map +0 -1
  376. package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.js +0 -5
  377. package/node_modules/@oneplatformdev/utils/dist/index.d.ts +0 -4
  378. package/node_modules/@oneplatformdev/utils/dist/index.d.ts.map +0 -1
  379. package/node_modules/@oneplatformdev/utils/dist/index.js +0 -6
  380. package/node_modules/@oneplatformdev/utils/dist/package.json +0 -64
  381. package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.d.ts +0 -2
  382. package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.d.ts.map +0 -1
  383. package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.js +0 -1
  384. package/node_modules/@oneplatformdev/utils/dist/types/index.d.ts +0 -2
  385. package/node_modules/@oneplatformdev/utils/dist/types/index.d.ts.map +0 -1
  386. package/node_modules/@oneplatformdev/utils/dist/types/index.js +0 -1
  387. package/node_modules/@oneplatformdev/utils/package.json +0 -64
  388. package/node_modules/@oneplatformdev/utils/src/cn/cn.ts +0 -7
  389. package/node_modules/@oneplatformdev/utils/src/cn/index.ts +0 -1
  390. package/node_modules/@oneplatformdev/utils/src/composeRefs/composeRefs.ts +0 -12
  391. package/node_modules/@oneplatformdev/utils/src/composeRefs/index.ts +0 -1
  392. package/node_modules/@oneplatformdev/utils/src/index.ts +0 -3
  393. package/node_modules/@oneplatformdev/utils/src/types/PartialOne.ts +0 -1
  394. package/node_modules/@oneplatformdev/utils/src/types/index.ts +0 -1
  395. package/node_modules/@oneplatformdev/utils/tsconfig.json +0 -10
  396. package/node_modules/@oneplatformdev/utils/tsconfig.lib.json +0 -34
  397. package/node_modules/@oneplatformdev/utils/vite.config.ts +0 -60
  398. package/node_modules/@radix-ui/react-slot/README.md +0 -13
  399. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +0 -13
  400. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +0 -13
  401. package/node_modules/@radix-ui/react-slot/dist/index.js +0 -118
  402. package/node_modules/@radix-ui/react-slot/dist/index.js.map +0 -7
  403. package/node_modules/@radix-ui/react-slot/dist/index.mjs +0 -85
  404. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +0 -7
  405. package/node_modules/@radix-ui/react-slot/package.json +0 -50
  406. package/node_modules/@radix-ui/react-tooltip/LICENSE +0 -21
  407. package/node_modules/@radix-ui/react-tooltip/README.md +0 -3
  408. package/node_modules/@radix-ui/react-tooltip/dist/index.d.mts +0 -101
  409. package/node_modules/@radix-ui/react-tooltip/dist/index.d.ts +0 -101
  410. package/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -540
  411. package/node_modules/@radix-ui/react-tooltip/dist/index.js.map +0 -7
  412. package/node_modules/@radix-ui/react-tooltip/dist/index.mjs +0 -508
  413. package/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +0 -7
  414. package/node_modules/@radix-ui/react-tooltip/package.json +0 -79
  415. package/src/Button/Button.stories.tsx +0 -33
  416. package/src/Button/Button.tsx +0 -33
  417. package/src/Button/Button.types.ts +0 -11
  418. package/src/Button/buttonVariants.ts +0 -38
  419. package/src/Button/index.ts +0 -3
  420. package/src/ButtonIcon/ButtonIcon.stories.tsx +0 -186
  421. package/src/ButtonIcon/ButtonIcon.tsx +0 -28
  422. package/src/ButtonIcon/ButtonIcon.types.ts +0 -10
  423. package/src/ButtonIcon/buttonIconVariants.ts +0 -137
  424. package/src/ButtonIcon/index.ts +0 -3
  425. package/src/Tooltip/Tooltip.tsx +0 -20
  426. package/src/Tooltip/Tooltip.types.tsx +0 -9
  427. package/src/Tooltip/TooltipRoot.tsx +0 -32
  428. package/src/Tooltip/index.ts +0 -3
  429. package/src/global.css +0 -123
  430. package/src/index.ts +0 -5
  431. package/src_old/Accordion/Accordion.tsx +0 -62
  432. package/src_old/Accordion/index.ts +0 -1
  433. package/src_old/Alert/Alert.tsx +0 -42
  434. package/src_old/Alert/alertVariants.ts +0 -19
  435. package/src_old/Alert/index.ts +0 -1
  436. package/src_old/AlertDialog/AlertDialog.stories.tsx +0 -131
  437. package/src_old/AlertDialog/AlertDialog.tsx +0 -257
  438. package/src_old/AlertDialog/AlertDialog.types.tsx +0 -66
  439. package/src_old/AlertDialog/AlertDialogRoot.tsx +0 -141
  440. package/src_old/AlertDialog/index.ts +0 -15
  441. package/src_old/AreaChart/AreaChart.tsx +0 -39
  442. package/src_old/AreaChart/AreaChart.types.ts +0 -18
  443. package/src_old/AreaChart/index.tsx +0 -2
  444. package/src_old/Aside/Aside.tsx +0 -26
  445. package/src_old/Aside/Aside.types.ts +0 -21
  446. package/src_old/Aside/AsideSidebar.tsx +0 -78
  447. package/src_old/Aside/index.ts +0 -3
  448. package/src_old/AspectRatio/AspectRatio.tsx +0 -5
  449. package/src_old/AspectRatio/index.ts +0 -1
  450. package/src_old/Avatar/Avatar.tsx +0 -48
  451. package/src_old/Avatar/index.ts +0 -1
  452. package/src_old/Badge/Badge.tsx +0 -13
  453. package/src_old/Badge/Badge.types.ts +0 -8
  454. package/src_old/Badge/badgeVariants.ts +0 -21
  455. package/src_old/Badge/index.ts +0 -3
  456. package/src_old/Breadcrumb/Breadcrumb.tsx +0 -115
  457. package/src_old/Breadcrumb/index.ts +0 -1
  458. package/src_old/Calendar/Calendar.tsx +0 -77
  459. package/src_old/Calendar/index.ts +0 -1
  460. package/src_old/Card/Card.tsx +0 -77
  461. package/src_old/Card/index.ts +0 -1
  462. package/src_old/Carousel/Carousel.tsx +0 -262
  463. package/src_old/Carousel/index.ts +0 -1
  464. package/src_old/Chart/Chart.tsx +0 -365
  465. package/src_old/Chart/index.ts +0 -1
  466. package/src_old/Checkbox/Checkbox.tsx +0 -62
  467. package/src_old/Checkbox/Checkbox.types.ts +0 -15
  468. package/src_old/Checkbox/index.ts +0 -2
  469. package/src_old/Collapsible/Collapsible.tsx +0 -11
  470. package/src_old/Collapsible/index.ts +0 -1
  471. package/src_old/Combobox/Combobox.tsx +0 -256
  472. package/src_old/Combobox/Combobox.types.ts +0 -55
  473. package/src_old/Combobox/ComboboxOptionItem.tsx +0 -46
  474. package/src_old/Combobox/ComboboxOptions.tsx +0 -90
  475. package/src_old/Combobox/index.tsx +0 -2
  476. package/src_old/Command/Command.tsx +0 -161
  477. package/src_old/Command/index.ts +0 -1
  478. package/src_old/DataTable/DataTable.tsx +0 -118
  479. package/src_old/DataTable/DataTable.types.tsx +0 -14
  480. package/src_old/DataTable/DataTableColumnFilter.tsx +0 -57
  481. package/src_old/DataTable/index.tsx +0 -2
  482. package/src_old/DataTable/useDataTable.ts +0 -44
  483. package/src_old/DatePicker/DatePicker.tsx +0 -56
  484. package/src_old/DatePicker/DatePicker.types.tsx +0 -7
  485. package/src_old/DatePicker/index.tsx +0 -3
  486. package/src_old/Dialog/Dialog.tsx +0 -182
  487. package/src_old/Dialog/DialogOverlayScope.tsx +0 -19
  488. package/src_old/Dialog/index.ts +0 -2
  489. package/src_old/Drawer/Drawer.tsx +0 -118
  490. package/src_old/Drawer/index.ts +0 -1
  491. package/src_old/DropdownMenu/DropdownMenu.tsx +0 -206
  492. package/src_old/DropdownMenu/index.ts +0 -1
  493. package/src_old/Dropzone/Dropzone.tsx +0 -229
  494. package/src_old/Dropzone/Dropzone.types.tsx +0 -69
  495. package/src_old/Dropzone/DropzoneFilePreview.tsx +0 -69
  496. package/src_old/Dropzone/DropzoneSinglePickPreview.tsx +0 -64
  497. package/src_old/Dropzone/DropzoneUtils.tsx +0 -31
  498. package/src_old/Dropzone/index.tsx +0 -2
  499. package/src_old/Form/Form.tsx +0 -181
  500. package/src_old/Form/FormRenderControl.tsx +0 -23
  501. package/src_old/Form/FormRenderControl.types.tsx +0 -29
  502. package/src_old/Form/index.ts +0 -4
  503. package/src_old/FormCheckbox/FormCheckbox.tsx +0 -34
  504. package/src_old/FormCheckbox/FormCheckbox.types.tsx +0 -10
  505. package/src_old/FormCheckbox/index.tsx +0 -2
  506. package/src_old/FormCombobox/FormCombobox.tsx +0 -27
  507. package/src_old/FormCombobox/FormCombobox.types.ts +0 -7
  508. package/src_old/FormCombobox/index.tsx +0 -2
  509. package/src_old/FormDatePicker/FormDatePicker.tsx +0 -33
  510. package/src_old/FormDatePicker/FormDatePicker.types.ts +0 -9
  511. package/src_old/FormDatePicker/index.tsx +0 -3
  512. package/src_old/FormDropzone/FormDropzone.tsx +0 -23
  513. package/src_old/FormDropzone/FormDropzone.types.ts +0 -7
  514. package/src_old/FormDropzone/index.tsx +0 -2
  515. package/src_old/FormInput/FormInput.tsx +0 -109
  516. package/src_old/FormInput/FormInput.types.tsx +0 -7
  517. package/src_old/FormInput/index.tsx +0 -2
  518. package/src_old/FormRadio/FormRadio.tsx +0 -54
  519. package/src_old/FormRadio/FormRadio.types.ts +0 -11
  520. package/src_old/FormRadio/index.ts +0 -2
  521. package/src_old/FormSelect/FormSelect.tsx +0 -44
  522. package/src_old/FormSelect/FormSelect.types.ts +0 -8
  523. package/src_old/FormSelect/index.tsx +0 -2
  524. package/src_old/FormTextarea/FormTextarea.tsx +0 -28
  525. package/src_old/FormTextarea/FormTextarea.types.tsx +0 -7
  526. package/src_old/FormTextarea/index.tsx +0 -2
  527. package/src_old/Header/Header.tsx +0 -34
  528. package/src_old/Header/Header.types.tsx +0 -3
  529. package/src_old/Header/index.ts +0 -2
  530. package/src_old/HoverCard/HoverCard.tsx +0 -29
  531. package/src_old/HoverCard/index.ts +0 -1
  532. package/src_old/Input/Input.tsx +0 -95
  533. package/src_old/Input/Input.types.ts +0 -26
  534. package/src_old/Input/index.ts +0 -3
  535. package/src_old/Input/inputVariants.tsx +0 -22
  536. package/src_old/InputOTP/InputOTP.tsx +0 -71
  537. package/src_old/InputOTP/index.ts +0 -1
  538. package/src_old/Label/Label.tsx +0 -23
  539. package/src_old/Label/index.ts +0 -2
  540. package/src_old/Label/labelVariants.ts +0 -8
  541. package/src_old/LazyLoader/LazyLoader.tsx +0 -30
  542. package/src_old/LazyLoader/index.ts +0 -1
  543. package/src_old/LoadedIcon/LoadedIcon.tsx +0 -36
  544. package/src_old/LoadedIcon/index.ts +0 -1
  545. package/src_old/LoadingMask/LoadingMask.tsx +0 -21
  546. package/src_old/LoadingMask/LoadingMask.types.ts +0 -5
  547. package/src_old/LoadingMask/RenderLoadingMask.tsx +0 -80
  548. package/src_old/LoadingMask/index.ts +0 -3
  549. package/src_old/LoadingProgress/LoadingProgress.tsx +0 -36
  550. package/src_old/LoadingProgress/LoadingProgress.types.tsx +0 -8
  551. package/src_old/LoadingProgress/index.ts +0 -3
  552. package/src_old/LoadingProgress/loadingProgressVariants.ts +0 -22
  553. package/src_old/Menubar/Menubar.tsx +0 -232
  554. package/src_old/Menubar/index.ts +0 -1
  555. package/src_old/NavigationMenu/NavigationMenu.tsx +0 -123
  556. package/src_old/NavigationMenu/index.ts +0 -2
  557. package/src_old/NavigationMenu/navigationMenuVariants.ts +0 -5
  558. package/src_old/Pagination/Pagination.tsx +0 -117
  559. package/src_old/Pagination/index.ts +0 -1
  560. package/src_old/Popover/Popover.tsx +0 -47
  561. package/src_old/Popover/index.ts +0 -1
  562. package/src_old/Progress/Progress.tsx +0 -28
  563. package/src_old/Progress/index.ts +0 -1
  564. package/src_old/Radio/Radio.tsx +0 -23
  565. package/src_old/Radio/Radio.types.ts +0 -17
  566. package/src_old/Radio/index.ts +0 -2
  567. package/src_old/RadioGroup/RadioGroup.tsx +0 -67
  568. package/src_old/RadioGroup/index.ts +0 -1
  569. package/src_old/Resizable/Resizable.tsx +0 -45
  570. package/src_old/Resizable/index.ts +0 -1
  571. package/src_old/ScrollArea/ScrollArea.tsx +0 -58
  572. package/src_old/ScrollArea/index.ts +0 -1
  573. package/src_old/Search/Search.tsx +0 -57
  574. package/src_old/Search/Search.types.tsx +0 -9
  575. package/src_old/Search/index.tsx +0 -3
  576. package/src_old/Select/Select.stories.tsx +0 -45
  577. package/src_old/Select/Select.tsx +0 -171
  578. package/src_old/Select/Select.types.ts +0 -46
  579. package/src_old/Select/SelectRoot.tsx +0 -164
  580. package/src_old/Select/index.ts +0 -3
  581. package/src_old/Separator/Separator.tsx +0 -31
  582. package/src_old/Separator/index.ts +0 -1
  583. package/src_old/Sheet/Sheet.tsx +0 -144
  584. package/src_old/Sheet/index.ts +0 -1
  585. package/src_old/Sidebar/Sidebar.tsx +0 -763
  586. package/src_old/Sidebar/index.ts +0 -1
  587. package/src_old/Skeleton/Skeleton.tsx +0 -17
  588. package/src_old/Skeleton/index.ts +0 -1
  589. package/src_old/Slider/Slider.tsx +0 -28
  590. package/src_old/Slider/index.ts +0 -1
  591. package/src_old/Sonner/Sonner.tsx +0 -31
  592. package/src_old/Sonner/index.ts +0 -1
  593. package/src_old/Switch/Switch.tsx +0 -29
  594. package/src_old/Switch/index.ts +0 -1
  595. package/src_old/Table/Table.tsx +0 -120
  596. package/src_old/Table/index.ts +0 -1
  597. package/src_old/TablePagination/TablePagination.tsx +0 -96
  598. package/src_old/TablePagination/index.ts +0 -1
  599. package/src_old/Tabs/Tabs.tsx +0 -35
  600. package/src_old/Tabs/Tabs.types.tsx +0 -13
  601. package/src_old/Tabs/TabsRoot.tsx +0 -55
  602. package/src_old/Tabs/index.ts +0 -2
  603. package/src_old/Textarea/Textarea.tsx +0 -78
  604. package/src_old/Textarea/Textarea.types.tsx +0 -21
  605. package/src_old/Textarea/index.ts +0 -2
  606. package/src_old/Textarea/useAutosizeTextArea.ts +0 -33
  607. package/src_old/Theme/ThemeModeToggle.tsx +0 -71
  608. package/src_old/Theme/ThemeProvider.tsx +0 -29
  609. package/src_old/Theme/index.ts +0 -2
  610. package/src_old/Toast/Toast.tsx +0 -109
  611. package/src_old/Toast/Toast.types.tsx +0 -45
  612. package/src_old/Toast/index.ts +0 -3
  613. package/src_old/Toast/toast.constants.tsx +0 -6
  614. package/src_old/Toast/toastVariants.ts +0 -20
  615. package/src_old/Toast/useToast.ts +0 -156
  616. package/src_old/Toaster/Toaster.tsx +0 -35
  617. package/src_old/Toaster/index.ts +0 -1
  618. package/src_old/Toggle/Toggle.tsx +0 -45
  619. package/src_old/Toggle/index.ts +0 -1
  620. package/src_old/ToggleGroup/ToggleGroup.tsx +0 -61
  621. package/src_old/ToggleGroup/index.ts +0 -1
  622. package/src_old/global.css +0 -275
  623. package/src_old/index.ts +0 -72
  624. package/tsconfig.json +0 -16
  625. package/tsconfig.lib.json +0 -41
  626. package/vite.config.ts +0 -67
  627. /package/{dist/Button → Button}/Button.d.ts +0 -0
  628. /package/{dist/Button → Button}/Button.d.ts.map +0 -0
  629. /package/{dist/Button → Button}/Button.js +0 -0
  630. /package/{dist/Button → Button}/Button.stories.d.ts +0 -0
  631. /package/{dist/Button → Button}/Button.stories.d.ts.map +0 -0
  632. /package/{dist/Button → Button}/Button.stories.js +0 -0
  633. /package/{dist/Button → Button}/Button.types.d.ts +0 -0
  634. /package/{dist/Button → Button}/Button.types.d.ts.map +0 -0
  635. /package/{dist/Button → Button}/Button.types.js +0 -0
  636. /package/{dist/Button → Button}/buttonVariants.d.ts +0 -0
  637. /package/{dist/Button → Button}/buttonVariants.d.ts.map +0 -0
  638. /package/{dist/Button → Button}/buttonVariants.js +0 -0
  639. /package/{dist/Button → Button}/index.d.ts +0 -0
  640. /package/{dist/Button → Button}/index.d.ts.map +0 -0
  641. /package/{dist/Button → Button}/index.js +0 -0
  642. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.d.ts +0 -0
  643. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.d.ts.map +0 -0
  644. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.js +0 -0
  645. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.stories.d.ts +0 -0
  646. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.stories.d.ts.map +0 -0
  647. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.stories.js +0 -0
  648. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.types.d.ts +0 -0
  649. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.types.d.ts.map +0 -0
  650. /package/{dist/ButtonIcon → ButtonIcon}/ButtonIcon.types.js +0 -0
  651. /package/{dist/ButtonIcon → ButtonIcon}/buttonIconVariants.d.ts +0 -0
  652. /package/{dist/ButtonIcon → ButtonIcon}/buttonIconVariants.d.ts.map +0 -0
  653. /package/{dist/ButtonIcon → ButtonIcon}/buttonIconVariants.js +0 -0
  654. /package/{dist/ButtonIcon → ButtonIcon}/index.d.ts +0 -0
  655. /package/{dist/ButtonIcon → ButtonIcon}/index.d.ts.map +0 -0
  656. /package/{dist/ButtonIcon → ButtonIcon}/index.js +0 -0
  657. /package/{dist/Tooltip → Tooltip}/Tooltip.d.ts +0 -0
  658. /package/{dist/Tooltip → Tooltip}/Tooltip.d.ts.map +0 -0
  659. /package/{dist/Tooltip → Tooltip}/Tooltip.js +0 -0
  660. /package/{dist/Tooltip → Tooltip}/Tooltip.types.d.ts +0 -0
  661. /package/{dist/Tooltip → Tooltip}/Tooltip.types.d.ts.map +0 -0
  662. /package/{dist/Tooltip → Tooltip}/Tooltip.types.js +0 -0
  663. /package/{dist/Tooltip → Tooltip}/TooltipRoot.d.ts +0 -0
  664. /package/{dist/Tooltip → Tooltip}/TooltipRoot.d.ts.map +0 -0
  665. /package/{dist/Tooltip → Tooltip}/TooltipRoot.js +0 -0
  666. /package/{dist/Tooltip → Tooltip}/index.d.ts +0 -0
  667. /package/{dist/Tooltip → Tooltip}/index.d.ts.map +0 -0
  668. /package/{dist/Tooltip → Tooltip}/index.js +0 -0
  669. /package/{dist/global.css → global.css} +0 -0
  670. /package/{dist/index.d.ts → index.d.ts} +0 -0
  671. /package/{dist/index.d.ts.map → index.d.ts.map} +0 -0
  672. /package/{dist/index.js → index.js} +0 -0
@@ -1,102 +0,0 @@
1
- import { useCallback } from 'react'
2
-
3
- import { useBoolean } from '../useBoolean'
4
- import { useCounter } from '../useCounter'
5
- import { useInterval } from '../useInterval'
6
-
7
- /** The countdown's options. */
8
- type CountdownOptions = {
9
- /** The countdown's starting number, initial value of the returned number. */
10
- countStart: number
11
-
12
- /**
13
- * The countdown's interval, in milliseconds.
14
- * @default 1000
15
- */
16
- intervalMs?: number
17
- /**
18
- * True if the countdown is increment.
19
- * @default false
20
- */
21
- isIncrement?: boolean
22
-
23
- /**
24
- * The countdown's stopping number. Pass `-Infinity` to decrease forever.
25
- * @default 0
26
- */
27
- countStop?: number
28
- }
29
-
30
- /** The countdown's controllers. */
31
- type CountdownControllers = {
32
- /** Start the countdown. */
33
- startCountdown: () => void
34
- /** Stop the countdown. */
35
- stopCountdown: () => void
36
- /** Reset the countdown. */
37
- resetCountdown: () => void
38
- }
39
-
40
- /**
41
- * Custom hook that manages countdown.
42
- * @param {CountdownOptions} countdownOptions - The countdown's options.
43
- * @returns {[number, CountdownControllers]} An array containing the countdown's count and its controllers.
44
- * @public
45
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-countdown)
46
- * @example
47
- * ```tsx
48
- * const [counter, { start, stop, reset }] = useCountdown({
49
- * countStart: 10,
50
- * intervalMs: 1000,
51
- * isIncrement: false,
52
- * });
53
- * ```
54
- */
55
- export function useCountdown({
56
- countStart,
57
- countStop = 0,
58
- intervalMs = 1000,
59
- isIncrement = false,
60
- }: CountdownOptions): [number, CountdownControllers] {
61
- const {
62
- count,
63
- increment,
64
- decrement,
65
- reset: resetCounter,
66
- } = useCounter(countStart)
67
-
68
- /*
69
- * Note: used to control the useInterval
70
- * running: If true, the interval is running
71
- * start: Should set running true to trigger interval
72
- * stop: Should set running false to remove interval.
73
- */
74
- const {
75
- value: isCountdownRunning,
76
- setTrue: startCountdown,
77
- setFalse: stopCountdown,
78
- } = useBoolean(false)
79
-
80
- // Will set running false and reset the seconds to initial value.
81
- const resetCountdown = useCallback(() => {
82
- stopCountdown()
83
- resetCounter()
84
- }, [stopCountdown, resetCounter])
85
-
86
- const countdownCallback = useCallback(() => {
87
- if (count === countStop) {
88
- stopCountdown()
89
- return
90
- }
91
-
92
- if (isIncrement) {
93
- increment()
94
- } else {
95
- decrement()
96
- }
97
- }, [count, countStop, decrement, increment, isIncrement, stopCountdown])
98
-
99
- useInterval(countdownCallback, isCountdownRunning ? intervalMs : null)
100
-
101
- return [count, { startCountdown, stopCountdown, resetCountdown }]
102
- }
@@ -1 +0,0 @@
1
- export * from './useCounter'
@@ -1,52 +0,0 @@
1
- import { useCallback, useState } from 'react'
2
-
3
- import type { Dispatch, SetStateAction } from 'react'
4
-
5
- /** The hook return type. */
6
- type UseCounterReturn = {
7
- /** The current count value. */
8
- count: number
9
- /** Function to increment the counter by 1. */
10
- increment: () => void
11
- /** Function to decrement the counter by 1. */
12
- decrement: () => void
13
- /** Function to reset the counter to its initial value. */
14
- reset: () => void
15
- /** Function to set a specific value to the counter. */
16
- setCount: Dispatch<SetStateAction<number>>
17
- }
18
-
19
- /**
20
- * Custom hook that manages a counter with increment, decrement, reset, and setCount functionalities.
21
- * @param {number} [initialValue] - The initial value for the counter.
22
- * @returns {UseCounterReturn} An object containing the current count and functions to interact with the counter.
23
- * @public
24
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-counter)
25
- * @example
26
- * ```tsx
27
- * const { count, increment, decrement, reset, setCount } = useCounter(5);
28
- * ```
29
- */
30
- export function useCounter(initialValue?: number): UseCounterReturn {
31
- const [count, setCount] = useState(initialValue ?? 0)
32
-
33
- const increment = useCallback(() => {
34
- setCount(x => x + 1)
35
- }, [])
36
-
37
- const decrement = useCallback(() => {
38
- setCount(x => x - 1)
39
- }, [])
40
-
41
- const reset = useCallback(() => {
42
- setCount(initialValue ?? 0)
43
- }, [initialValue])
44
-
45
- return {
46
- count,
47
- increment,
48
- decrement,
49
- reset,
50
- setCount,
51
- }
52
- }
@@ -1 +0,0 @@
1
- export * from './useDarkMode'
@@ -1,92 +0,0 @@
1
- import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect'
2
- import { useLocalStorage } from '../useLocalStorage'
3
- import { useMediaQuery } from '../useMediaQuery'
4
-
5
- const COLOR_SCHEME_QUERY = '(prefers-color-scheme: dark)'
6
- const LOCAL_STORAGE_KEY = 'usehooks-ts-dark-mode'
7
-
8
- /** The hook options. */
9
- type DarkModeOptions = {
10
- /**
11
- * The initial value of the dark mode.
12
- * @default false
13
- */
14
- defaultValue?: boolean
15
- /**
16
- * The key to use in the local storage.
17
- * @default 'usehooks-ts-dark-mode'
18
- */
19
- localStorageKey?: string
20
- /**
21
- * If `true` (default), the hook will initialize reading `localStorage`.
22
- * In SSR, you should set it to `false`, returning the `defaultValue` or `false` initially.
23
- * @default true
24
- */
25
- initializeWithValue?: boolean
26
- }
27
-
28
- /** The hook return type. */
29
- type DarkModeReturn = {
30
- /** The current state of the dark mode. */
31
- isDarkMode: boolean
32
- /** Function to toggle the dark mode. */
33
- toggle: () => void
34
- /** Function to enable the dark mode. */
35
- enable: () => void
36
- /** Function to disable the dark mode. */
37
- disable: () => void
38
- /** Function to set a specific value to the dark mode. */
39
- set: (value: boolean) => void
40
- }
41
-
42
- /**
43
- * Custom hook that returns the current state of the dark mode.
44
- * @param {?DarkModeOptions} [options] - The initial value of the dark mode, default `false`.
45
- * @returns {DarkModeReturn} An object containing the dark mode's state and its controllers.
46
- * @public
47
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-dark-mode)
48
- * @example
49
- * ```tsx
50
- * const { isDarkMode, toggle, enable, disable, set } = useDarkMode({ defaultValue: true });
51
- * ```
52
- */
53
- export function useDarkMode(options: DarkModeOptions = {}): DarkModeReturn {
54
- const {
55
- defaultValue,
56
- localStorageKey = LOCAL_STORAGE_KEY,
57
- initializeWithValue = true,
58
- } = options
59
-
60
- const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {
61
- initializeWithValue,
62
- defaultValue,
63
- })
64
- const [isDarkMode, setDarkMode] = useLocalStorage<boolean>(
65
- localStorageKey,
66
- defaultValue ?? isDarkOS ?? false,
67
- { initializeWithValue },
68
- )
69
-
70
- // Update darkMode if os prefers changes
71
- useIsomorphicLayoutEffect(() => {
72
- if (isDarkOS !== isDarkMode) {
73
- setDarkMode(isDarkOS)
74
- }
75
- }, [isDarkOS])
76
-
77
- return {
78
- isDarkMode,
79
- toggle: () => {
80
- setDarkMode(prev => !prev)
81
- },
82
- enable: () => {
83
- setDarkMode(true)
84
- },
85
- disable: () => {
86
- setDarkMode(false)
87
- },
88
- set: value => {
89
- setDarkMode(value)
90
- },
91
- }
92
- }
@@ -1,2 +0,0 @@
1
- export * from './useDebounceCallback'
2
- export {useDebounceCallback as default } from './useDebounceCallback'
@@ -1,115 +0,0 @@
1
- import { useEffect, useMemo, useRef } from 'react'
2
-
3
- import debounce from 'lodash.debounce'
4
-
5
- import { useUnmount } from '../useUnmount'
6
-
7
- /** Configuration options for controlling the behavior of the debounced function. */
8
- type DebounceOptions = {
9
- /**
10
- * Determines whether the function should be invoked on the leading edge of the timeout.
11
- * @default false
12
- */
13
- leading?: boolean
14
- /**
15
- * Determines whether the function should be invoked on the trailing edge of the timeout.
16
- * @default false
17
- */
18
- trailing?: boolean
19
- /**
20
- * The maximum time the specified function is allowed to be delayed before it is invoked.
21
- */
22
- maxWait?: number
23
- }
24
-
25
- /** Functions to manage a debounced callback. */
26
- type ControlFunctions = {
27
- /** Cancels pending function invocations. */
28
- cancel: () => void
29
- /** Immediately invokes pending function invocations. */
30
- flush: () => void
31
- /**
32
- * Checks if there are any pending function invocations.
33
- * @returns `true` if there are pending invocations, otherwise `false`.
34
- */
35
- isPending: () => boolean
36
- }
37
-
38
- /**
39
- * Represents the state and control functions of a debounced callback.
40
- * Subsequent calls to the debounced function return the result of the last invocation.
41
- * Note: If there are no previous invocations, the result will be undefined.
42
- * Ensure proper handling in your code.
43
- */
44
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
- export type DebouncedState<T extends (...args: any) => ReturnType<T>> = ((
46
- ...args: Parameters<T>
47
- ) => ReturnType<T> | undefined) &
48
- ControlFunctions
49
-
50
- /**
51
- * Custom hook that creates a debounced version of a callback function.
52
- * @template T - Type of the original callback function.
53
- * @param {T} func - The callback function to be debounced.
54
- * @param {number} delay - The delay in milliseconds before the callback is invoked (default is `500` milliseconds).
55
- * @param {DebounceOptions} [options] - Options to control the behavior of the debounced function.
56
- * @returns {DebouncedState<T>} A debounced version of the original callback along with control functions.
57
- * @public
58
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-debounce-callback)
59
- * @example
60
- * ```tsx
61
- * const debouncedCallback = useDebounceCallback(
62
- * (searchTerm) => {
63
- * // Perform search after user stops typing for 500 milliseconds
64
- * searchApi(searchTerm);
65
- * },
66
- * 500
67
- * );
68
- *
69
- * // Later in the component
70
- * debouncedCallback('react hooks'); // Will invoke the callback after 500 milliseconds of inactivity.
71
- * ```
72
- */
73
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
- export function useDebounceCallback<T extends (...args: any) => ReturnType<T>>(
75
- func: T,
76
- delay = 500,
77
- options?: DebounceOptions,
78
- ): DebouncedState<T> {
79
- const debouncedFunc = useRef<ReturnType<typeof debounce>>(null)
80
-
81
- useUnmount(() => {
82
- if (debouncedFunc.current) {
83
- debouncedFunc.current.cancel()
84
- }
85
- })
86
-
87
- const debounced = useMemo(() => {
88
- const debouncedFuncInstance = debounce(func, delay, options)
89
-
90
- const wrappedFunc: DebouncedState<T> = (...args: Parameters<T>) => {
91
- return debouncedFuncInstance(...args)
92
- }
93
-
94
- wrappedFunc.cancel = () => {
95
- debouncedFuncInstance.cancel()
96
- }
97
-
98
- wrappedFunc.isPending = () => {
99
- return !!debouncedFunc.current
100
- }
101
-
102
- wrappedFunc.flush = () => {
103
- return debouncedFuncInstance.flush()
104
- }
105
-
106
- return wrappedFunc
107
- }, [func, delay, options])
108
-
109
- // Update the debounced function ref whenever func, wait, or options change
110
- useEffect(() => {
111
- debouncedFunc.current = debounce(func, delay, options)
112
- }, [func, delay, options])
113
-
114
- return debounced
115
- }
@@ -1 +0,0 @@
1
- export * from './useDebounceValue'
@@ -1,67 +0,0 @@
1
- import { useRef, useState } from 'react'
2
-
3
- import type { DebouncedState } from '../useDebounceCallback'
4
- import { useDebounceCallback } from '../useDebounceCallback'
5
-
6
- /**
7
- * Hook options.
8
- * @template T - The type of the value.
9
- */
10
- type UseDebounceValueOptions<T> = {
11
- /**
12
- * Determines whether the function should be invoked on the leading edge of the timeout.
13
- * @default false
14
- */
15
- leading?: boolean
16
- /**
17
- * Determines whether the function should be invoked on the trailing edge of the timeout.
18
- * @default false
19
- */
20
- trailing?: boolean
21
- /**
22
- * The maximum time the specified function is allowed to be delayed before it is invoked.
23
- */
24
- maxWait?: number
25
- /** A function to determine if the value has changed. Defaults to a function that checks if the value is strictly equal to the previous value. */
26
- equalityFn?: (left: T, right: T) => boolean
27
- }
28
-
29
- /**
30
- * Custom hook that returns a debounced version of the provided value, along with a function to update it.
31
- * @template T - The type of the value.
32
- * @param {T | (() => T)} initialValue - The value to be debounced.
33
- * @param {number} delay - The delay in milliseconds before the value is updated (default is 500ms).
34
- * @param {object} [options] - Optional configurations for the debouncing behavior.
35
- * @returns {[T, DebouncedState<(value: T) => void>]} An array containing the debounced value and the function to update it.
36
- * @public
37
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-debounce-value)
38
- * @example
39
- * ```tsx
40
- * const [debouncedValue, updateDebouncedValue] = useDebounceValue(inputValue, 500, { leading: true });
41
- * ```
42
- */
43
- export function useDebounceValue<T>(
44
- initialValue: T | (() => T),
45
- delay: number,
46
- options?: UseDebounceValueOptions<T>,
47
- ): [T, DebouncedState<(value: T) => void>] {
48
- const eq = options?.equalityFn ?? ((left: T, right: T) => left === right)
49
- const unwrappedInitialValue =
50
- initialValue instanceof Function ? initialValue() : initialValue
51
- const [debouncedValue, setDebouncedValue] = useState<T>(unwrappedInitialValue)
52
- const previousValueRef = useRef<T | undefined>(unwrappedInitialValue)
53
-
54
- const updateDebouncedValue = useDebounceCallback(
55
- setDebouncedValue,
56
- delay,
57
- options,
58
- )
59
-
60
- // Update the debounced value if the initial value changes
61
- if (!eq(previousValueRef.current as T, unwrappedInitialValue)) {
62
- updateDebouncedValue(unwrappedInitialValue)
63
- previousValueRef.current = unwrappedInitialValue
64
- }
65
-
66
- return [debouncedValue, updateDebouncedValue]
67
- }
@@ -1 +0,0 @@
1
- export * from './useDocumentTitle'
@@ -1,43 +0,0 @@
1
- import { useRef } from 'react'
2
-
3
- import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect'
4
- import { useUnmount } from '../useUnmount'
5
-
6
- /** Hook options. */
7
- type UseDocumentTitleOptions = {
8
- /** Whether to keep the title after unmounting the component (default is `true`). */
9
- preserveTitleOnUnmount?: boolean
10
- }
11
-
12
- /**
13
- * Custom hook that sets the document title.
14
- * @param {string} title - The title to set.
15
- * @param {?UseDocumentTitleOptions} [options] - The options.
16
- * @public
17
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-document-title)
18
- * @example
19
- * ```tsx
20
- * useDocumentTitle('My new title');
21
- * ```
22
- */
23
- export function useDocumentTitle(
24
- title: string,
25
- options: UseDocumentTitleOptions = {},
26
- ): void {
27
- const { preserveTitleOnUnmount = true } = options
28
- const defaultTitle = useRef<string | null>(null)
29
-
30
- useIsomorphicLayoutEffect(() => {
31
- defaultTitle.current = window.document.title
32
- }, [])
33
-
34
- useIsomorphicLayoutEffect(() => {
35
- window.document.title = title
36
- }, [title])
37
-
38
- useUnmount(() => {
39
- if (!preserveTitleOnUnmount && defaultTitle.current) {
40
- window.document.title = defaultTitle.current
41
- }
42
- })
43
- }
@@ -1 +0,0 @@
1
- export * from './useEventCallback'
@@ -1,40 +0,0 @@
1
- import { useCallback, useRef } from 'react'
2
-
3
- import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect'
4
-
5
- /**
6
- * Custom hook that creates a memoized event callback.
7
- * @template Args - An array of argument types for the event callback.
8
- * @template R - The return type of the event callback.
9
- * @param {(...args: Args) => R} fn - The callback function.
10
- * @returns {(...args: Args) => R} A memoized event callback function.
11
- * @public
12
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-event-callback)
13
- * @example
14
- * ```tsx
15
- * const handleClick = useEventCallback((event) => {
16
- * // Handle the event here
17
- * });
18
- * ```
19
- */
20
- export function useEventCallback<Args extends unknown[], R>(
21
- fn: (...args: Args) => R,
22
- ): (...args: Args) => R
23
- export function useEventCallback<Args extends unknown[], R>(
24
- fn: ((...args: Args) => R) | undefined,
25
- ): ((...args: Args) => R) | undefined
26
- export function useEventCallback<Args extends unknown[], R>(
27
- fn: ((...args: Args) => R) | undefined,
28
- ): ((...args: Args) => R) | undefined {
29
- const ref = useRef<typeof fn>(() => {
30
- throw new Error('Cannot call an event handler while rendering.')
31
- })
32
-
33
- useIsomorphicLayoutEffect(() => {
34
- ref.current = fn
35
- }, [fn])
36
-
37
- return useCallback((...args: Args) => ref.current?.(...args), [ref]) as (
38
- ...args: Args
39
- ) => R
40
- }
@@ -1 +0,0 @@
1
- export * from './useEventListener'
@@ -1,121 +0,0 @@
1
- import { useEffect, useRef } from 'react'
2
-
3
- import type { RefObject } from 'react'
4
-
5
- import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect'
6
-
7
- // MediaQueryList Event based useEventListener interface
8
- function useEventListener<K extends keyof MediaQueryListEventMap>(
9
- eventName: K,
10
- handler: (event: MediaQueryListEventMap[K]) => void,
11
- element: RefObject<MediaQueryList>,
12
- options?: boolean | AddEventListenerOptions,
13
- ): void
14
-
15
- // Window Event based useEventListener interface
16
- function useEventListener<K extends keyof WindowEventMap>(
17
- eventName: K,
18
- handler: (event: WindowEventMap[K]) => void,
19
- element?: undefined,
20
- options?: boolean | AddEventListenerOptions,
21
- ): void
22
-
23
- // Element Event based useEventListener interface
24
- function useEventListener<
25
- K extends keyof HTMLElementEventMap & keyof SVGElementEventMap,
26
- T extends Element = K extends keyof HTMLElementEventMap
27
- ? HTMLDivElement
28
- : SVGElement,
29
- >(
30
- eventName: K,
31
- handler:
32
- | ((event: HTMLElementEventMap[K]) => void)
33
- | ((event: SVGElementEventMap[K]) => void),
34
- element: RefObject<T>,
35
- options?: boolean | AddEventListenerOptions,
36
- ): void
37
-
38
- // Document Event based useEventListener interface
39
- function useEventListener<K extends keyof DocumentEventMap>(
40
- eventName: K,
41
- handler: (event: DocumentEventMap[K]) => void,
42
- element: RefObject<Document>,
43
- options?: boolean | AddEventListenerOptions,
44
- ): void
45
-
46
- /**
47
- * Custom hook that attaches event listeners to DOM elements, the window, or media query lists.
48
- * @template KW - The type of event for window events.
49
- * @template KH - The type of event for HTML or SVG element events.
50
- * @template KM - The type of event for media query list events.
51
- * @template T - The type of the DOM element (default is `HTMLElement`).
52
- * @param {KW | KH | KM} eventName - The name of the event to listen for.
53
- * @param {(event: WindowEventMap[KW] | HTMLElementEventMap[KH] | SVGElementEventMap[KH] | MediaQueryListEventMap[KM] | Event) => void} handler - The event handler function.
54
- * @param {RefObject<T>} [element] - The DOM element or media query list to attach the event listener to (optional).
55
- * @param {boolean | AddEventListenerOptions} [options] - An options object that specifies characteristics about the event listener (optional).
56
- * @public
57
- * @see [Documentation](https://usehooks-ts.com/react-hook/use-event-listener)
58
- * @example
59
- * ```tsx
60
- * // Example 1: Attach a window event listener
61
- * useEventListener('resize', handleResize);
62
- * ```
63
- * @example
64
- * ```tsx
65
- * // Example 2: Attach a document event listener with options
66
- * const elementRef = useRef(document);
67
- * useEventListener('click', handleClick, elementRef, { capture: true });
68
- * ```
69
- * @example
70
- * ```tsx
71
- * // Example 3: Attach an element event listener
72
- * const buttonRef = useRef<HTMLButtonElement>(null);
73
- * useEventListener('click', handleButtonClick, buttonRef);
74
- * ```
75
- */
76
- function useEventListener<
77
- KW extends keyof WindowEventMap,
78
- KH extends keyof HTMLElementEventMap & keyof SVGElementEventMap,
79
- KM extends keyof MediaQueryListEventMap,
80
- T extends HTMLElement | SVGAElement | MediaQueryList = HTMLElement,
81
- >(
82
- eventName: KW | KH | KM,
83
- handler: (
84
- event:
85
- | WindowEventMap[KW]
86
- | HTMLElementEventMap[KH]
87
- | SVGElementEventMap[KH]
88
- | MediaQueryListEventMap[KM]
89
- | Event,
90
- ) => void,
91
- element?: RefObject<T>,
92
- options?: boolean | AddEventListenerOptions,
93
- ) {
94
- // Create a ref that stores handler
95
- const savedHandler = useRef(handler)
96
-
97
- useIsomorphicLayoutEffect(() => {
98
- savedHandler.current = handler
99
- }, [handler])
100
-
101
- useEffect(() => {
102
- // Define the listening target
103
- const targetElement: T | Window = element?.current ?? window
104
-
105
- if (!(targetElement && targetElement.addEventListener)) return
106
-
107
- // Create event listener that calls handler function stored in ref
108
- const listener: typeof handler = event => {
109
- savedHandler.current(event)
110
- }
111
-
112
- targetElement.addEventListener(eventName, listener, options)
113
-
114
- // Remove event listener on cleanup
115
- return () => {
116
- targetElement.removeEventListener(eventName, listener, options)
117
- }
118
- }, [eventName, element, options])
119
- }
120
-
121
- export { useEventListener }
@@ -1 +0,0 @@
1
- export * from './useHover'