@oneplatformdev/ui 0.1.0-5 → 0.1.0-8
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.
- package/.babelrc +12 -0
- package/.storybook/main.ts +48 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview.ts +29 -0
- package/CHANGELOG.md +38 -0
- package/dist/CHANGELOG.md +14 -0
- package/dist/index.js +14 -13
- package/dist/package.json +2 -1
- package/external.ts +78 -0
- package/kit/MultiSelectCombobox/MultiSelectCombobox.tsx +211 -0
- package/kit/MultiSelectCombobox/index.tsx +2 -0
- package/kit/MultiSelectCombobox/types.ts +22 -0
- package/kit/NLTDateRangePicker/index.tsx +85 -0
- package/kit/NLTFilesDropZone/imageList/index.tsx +86 -0
- package/kit/NLTFilesDropZone/index.tsx +52 -0
- package/kit/NLTFormDateRangePicker/index.tsx +29 -0
- package/kit/NLTFormFilesDropZone/index.tsx +73 -0
- package/kit/NLTFormPhoneField/index.tsx +36 -0
- package/kit/NLTFormPhoneInput/index.tsx +32 -0
- package/kit/NLTImageDropZone/index.tsx +105 -0
- package/kit/NLTModal/index.tsx +36 -0
- package/kit/NLTModal/useModal.ts +10 -0
- package/kit/NLTModalHeader/index.tsx +48 -0
- package/kit/NLTModalHeader/useModal.ts +10 -0
- package/kit/NLTMonthYearPicker/index.tsx +66 -0
- package/kit/NLTMonthYearPicker/useMonthYearPicker.ts +37 -0
- package/kit/NLTPhoneInput/index.tsx +153 -0
- package/kit/NLTPieChart/index.tsx +62 -0
- package/kit/NLTSidebar/app-sidebar.tsx +39 -0
- package/kit/NLTSidebar/nav-main.tsx +68 -0
- package/kit/NLTSidebar/nav-projects.tsx +89 -0
- package/kit/NLTSidebar/nav-user.tsx +114 -0
- package/kit/NLTSidebar/team-switcher.tsx +89 -0
- package/kit/NLTTable/NLTTable.tsx +50 -0
- package/kit/NLTTable/index.tsx +1 -0
- package/kit/NLTTablePagination/index.tsx +75 -0
- package/kit/Sidebar/SidebarNav/SidebarNavGroup.tsx +27 -0
- package/kit/Sidebar/SidebarNav/SidebarNavGroupItem.tsx +120 -0
- package/kit/Sidebar/SidebarNav/index.ts +3 -0
- package/kit/Sidebar/SidebarNav/types.ts +19 -0
- package/kit/Sidebar/index.ts +1 -0
- package/kit/Stepper/LinearStepper.tsx +91 -0
- package/kit/Stepper/Stepper.tsx +17 -0
- package/kit/Stepper/VerticalStepper.tsx +91 -0
- package/kit/Stepper/index.ts +1 -0
- package/kit/Stepper/types.ts +21 -0
- package/kit/Stepper/useStepper.ts +40 -0
- package/node_modules/@oneplatformdev/hooks/.babelrc +12 -0
- package/node_modules/@oneplatformdev/hooks/CHANGELOG.md +23 -0
- package/node_modules/@oneplatformdev/hooks/LICENSE +21 -0
- package/node_modules/@oneplatformdev/hooks/README.md +7 -0
- package/node_modules/@oneplatformdev/hooks/dist/CHANGELOG.md +19 -0
- package/node_modules/@oneplatformdev/hooks/dist/LICENSE +21 -0
- package/node_modules/@oneplatformdev/hooks/dist/README.md +7 -0
- package/node_modules/@oneplatformdev/hooks/dist/index.d.ts +37 -0
- package/node_modules/@oneplatformdev/hooks/dist/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/index.js +74 -0
- package/node_modules/@oneplatformdev/hooks/dist/package.json +68 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.d.ts +29 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useBoolean/useBoolean.js +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.d.ts +17 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useClickAnyWhere/useClickAnyWhere.js +9 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.d.ts +34 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCopyToClipboard/useCopyToClipboard.js +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.d.ts +47 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCountdown/useCountdown.js +33 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.d.ts +28 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useCounter/useCounter.js +20 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.d.ts +46 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDarkMode/useDarkMode.js +38 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.d.ts +3 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/index.js +5 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.d.ts +62 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.js +21 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.d.ts +40 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDebounceValue/useDebounceValue.js +13 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.d.ts +19 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useDocumentTitle/useDocumentTitle.js +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.d.ts +18 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventCallback/useEventCallback.js +13 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.d.ts +7 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useEventListener/useEventListener.js +20 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.d.ts +17 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useHover/useHover.js +13 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.d.ts +72 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.js +53 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.d.ts +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useInterval/useInterval.js +20 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.d.ts +13 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsClient/useIsClient.js +10 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.d.ts +3 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.d.ts +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/types.js +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.d.ts +3 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMobile/useIsMobile.js +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsMounted/useIsMounted.js +10 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +16 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +5 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.d.ts +39 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLocalStorage/useLocalStorage.js +65 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useLockBody/useLockBody.js +12 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.d.ts +48 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMap/useMap.js +27 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.d.ts +29 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useMediaQuery/useMediaQuery.js +21 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.d.ts +24 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useOnClickOutside/useOnClickOutside.js +17 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.d.ts +10 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useQueryString/useQueryString.js +10 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.d.ts +14 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useReadLocalStorage/useReadLocalStorage.js +48 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.d.ts +44 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useResizeObserver/useResizeObserver.js +31 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.d.ts +20 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScreen/useScreen.js +48 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.d.ts +24 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScript/useScript.js +45 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.d.ts +54 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useScrollLock/useScrollLock.js +26 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.d.ts +39 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useSessionStorage/useSessionStorage.js +65 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.d.ts +31 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useStep/useStep.js +34 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.d.ts +46 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.js +27 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.d.ts +17 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useTimeout/useTimeout.js +20 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.d.ts +18 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useToggle/useToggle.js +10 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.d.ts +14 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useUnmount/useUnmount.js +13 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/index.js +4 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.d.ts +30 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/hooks/dist/useWindowSize/useWindowSize.js +31 -0
- package/node_modules/@oneplatformdev/hooks/package.json +68 -0
- package/node_modules/@oneplatformdev/hooks/src/index.ts +36 -0
- package/node_modules/@oneplatformdev/hooks/src/useBoolean/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useBoolean/useBoolean.ts +50 -0
- package/node_modules/@oneplatformdev/hooks/src/useClickAnyWhere/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useClickAnyWhere/useClickAnyWhere.ts +22 -0
- package/node_modules/@oneplatformdev/hooks/src/useCopyToClipboard/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useCopyToClipboard/useCopyToClipboard.ts +58 -0
- package/node_modules/@oneplatformdev/hooks/src/useCountdown/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useCountdown/useCountdown.ts +102 -0
- package/node_modules/@oneplatformdev/hooks/src/useCounter/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useCounter/useCounter.ts +52 -0
- package/node_modules/@oneplatformdev/hooks/src/useDarkMode/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useDarkMode/useDarkMode.ts +92 -0
- package/node_modules/@oneplatformdev/hooks/src/useDebounceCallback/index.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/src/useDebounceCallback/useDebounceCallback.ts +115 -0
- package/node_modules/@oneplatformdev/hooks/src/useDebounceValue/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useDebounceValue/useDebounceValue.ts +67 -0
- package/node_modules/@oneplatformdev/hooks/src/useDocumentTitle/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useDocumentTitle/useDocumentTitle.ts +43 -0
- package/node_modules/@oneplatformdev/hooks/src/useEventCallback/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useEventCallback/useEventCallback.ts +40 -0
- package/node_modules/@oneplatformdev/hooks/src/useEventListener/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useEventListener/useEventListener.ts +121 -0
- package/node_modules/@oneplatformdev/hooks/src/useHover/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useHover/useHover.ts +37 -0
- package/node_modules/@oneplatformdev/hooks/src/useIntersectionObserver/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useIntersectionObserver/useIntersectionObserver.ts +186 -0
- package/node_modules/@oneplatformdev/hooks/src/useInterval/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useInterval/useInterval.ts +43 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsClient/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsClient/useIsClient.ts +22 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsMobile/index.ts +2 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsMobile/types.ts +3 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsMobile/useIsMobile.tsx +23 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsMounted/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsMounted/useIsMounted.ts +15 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsomorphicLayoutEffect/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts +17 -0
- package/node_modules/@oneplatformdev/hooks/src/useLocalStorage/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useLocalStorage/useLocalStorage.ts +191 -0
- package/node_modules/@oneplatformdev/hooks/src/useLockBody/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useLockBody/useLockBody.tsx +12 -0
- package/node_modules/@oneplatformdev/hooks/src/useMap/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useMap/useMap.ts +83 -0
- package/node_modules/@oneplatformdev/hooks/src/useMediaQuery/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useMediaQuery/useMediaQuery.ts +83 -0
- package/node_modules/@oneplatformdev/hooks/src/useOnClickOutside/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useOnClickOutside/useOnClickOutside.ts +61 -0
- package/node_modules/@oneplatformdev/hooks/src/useQueryString/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useQueryString/useQueryString.ts +26 -0
- package/node_modules/@oneplatformdev/hooks/src/useReadLocalStorage/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useReadLocalStorage/useReadLocalStorage.ts +122 -0
- package/node_modules/@oneplatformdev/hooks/src/useResizeObserver/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useResizeObserver/useResizeObserver.ts +131 -0
- package/node_modules/@oneplatformdev/hooks/src/useScreen/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useScreen/useScreen.ts +106 -0
- package/node_modules/@oneplatformdev/hooks/src/useScript/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useScript/useScript.ts +142 -0
- package/node_modules/@oneplatformdev/hooks/src/useScrollLock/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useScrollLock/useScrollLock.ts +141 -0
- package/node_modules/@oneplatformdev/hooks/src/useSessionStorage/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useSessionStorage/useSessionStorage.ts +191 -0
- package/node_modules/@oneplatformdev/hooks/src/useStep/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useStep/useStep.ts +83 -0
- package/node_modules/@oneplatformdev/hooks/src/useTernaryDarkMode/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useTernaryDarkMode/useTernaryDarkMode.ts +81 -0
- package/node_modules/@oneplatformdev/hooks/src/useTimeout/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useTimeout/useTimeout.ts +44 -0
- package/node_modules/@oneplatformdev/hooks/src/useToggle/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useToggle/useToggle.ts +30 -0
- package/node_modules/@oneplatformdev/hooks/src/useUnmount/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useUnmount/useUnmount.ts +26 -0
- package/node_modules/@oneplatformdev/hooks/src/useWindowSize/index.ts +1 -0
- package/node_modules/@oneplatformdev/hooks/src/useWindowSize/useWindowSize.ts +100 -0
- package/node_modules/@oneplatformdev/hooks/tsconfig.json +10 -0
- package/node_modules/@oneplatformdev/hooks/tsconfig.lib.json +33 -0
- package/node_modules/@oneplatformdev/hooks/vite.config.ts +62 -0
- package/node_modules/@oneplatformdev/utils/.babelrc +12 -0
- package/node_modules/@oneplatformdev/utils/CHANGELOG.md +23 -0
- package/node_modules/@oneplatformdev/utils/LICENSE +21 -0
- package/node_modules/@oneplatformdev/utils/README.md +7 -0
- package/node_modules/@oneplatformdev/utils/dist/CHANGELOG.md +19 -0
- package/node_modules/@oneplatformdev/utils/dist/LICENSE +21 -0
- package/node_modules/@oneplatformdev/utils/dist/README.md +7 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/cn.d.ts +4 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/cn.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/cn.js +9 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/cn/index.js +5 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.d.ts +4 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/composeRefs.js +10 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/composeRefs/index.js +5 -0
- package/node_modules/@oneplatformdev/utils/dist/index.d.ts +4 -0
- package/node_modules/@oneplatformdev/utils/dist/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/index.js +6 -0
- package/node_modules/@oneplatformdev/utils/dist/package.json +64 -0
- package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.d.ts +2 -0
- package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/types/PartialOne.js +1 -0
- package/node_modules/@oneplatformdev/utils/dist/types/index.d.ts +2 -0
- package/node_modules/@oneplatformdev/utils/dist/types/index.d.ts.map +1 -0
- package/node_modules/@oneplatformdev/utils/dist/types/index.js +1 -0
- package/node_modules/@oneplatformdev/utils/package.json +64 -0
- package/node_modules/@oneplatformdev/utils/src/cn/cn.ts +7 -0
- package/node_modules/@oneplatformdev/utils/src/cn/index.ts +1 -0
- package/node_modules/@oneplatformdev/utils/src/composeRefs/composeRefs.ts +12 -0
- package/node_modules/@oneplatformdev/utils/src/composeRefs/index.ts +1 -0
- package/node_modules/@oneplatformdev/utils/src/index.ts +3 -0
- package/node_modules/@oneplatformdev/utils/src/types/PartialOne.ts +1 -0
- package/node_modules/@oneplatformdev/utils/src/types/index.ts +1 -0
- package/node_modules/@oneplatformdev/utils/tsconfig.json +10 -0
- package/node_modules/@oneplatformdev/utils/tsconfig.lib.json +34 -0
- package/node_modules/@oneplatformdev/utils/vite.config.ts +60 -0
- package/node_modules/@radix-ui/react-slot/README.md +13 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.mts +13 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.ts +13 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js +118 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs +85 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-slot/package.json +50 -0
- package/node_modules/@radix-ui/react-tooltip/LICENSE +21 -0
- package/node_modules/@radix-ui/react-tooltip/README.md +3 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.d.mts +101 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.d.ts +101 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.js +540 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.mjs +508 -0
- package/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-tooltip/package.json +79 -0
- package/package.json +4 -3
- package/src/Button/Button.stories.tsx +33 -0
- package/src/Button/Button.tsx +33 -0
- package/src/Button/Button.types.ts +11 -0
- package/src/Button/buttonVariants.ts +38 -0
- package/src/Button/index.ts +3 -0
- package/src/ButtonIcon/ButtonIcon.stories.tsx +186 -0
- package/src/ButtonIcon/ButtonIcon.tsx +28 -0
- package/src/ButtonIcon/ButtonIcon.types.ts +10 -0
- package/src/ButtonIcon/buttonIconVariants.ts +137 -0
- package/src/ButtonIcon/index.ts +3 -0
- package/src/Tooltip/Tooltip.tsx +20 -0
- package/src/Tooltip/Tooltip.types.tsx +9 -0
- package/src/Tooltip/TooltipRoot.tsx +32 -0
- package/src/Tooltip/index.ts +3 -0
- package/src/global.css +123 -0
- package/src/index.ts +5 -0
- package/src_old/Accordion/Accordion.tsx +62 -0
- package/src_old/Accordion/index.ts +1 -0
- package/src_old/Alert/Alert.tsx +42 -0
- package/src_old/Alert/alertVariants.ts +19 -0
- package/src_old/Alert/index.ts +1 -0
- package/src_old/AlertDialog/AlertDialog.stories.tsx +131 -0
- package/src_old/AlertDialog/AlertDialog.tsx +257 -0
- package/src_old/AlertDialog/AlertDialog.types.tsx +66 -0
- package/src_old/AlertDialog/AlertDialogRoot.tsx +141 -0
- package/src_old/AlertDialog/index.ts +15 -0
- package/src_old/AreaChart/AreaChart.tsx +39 -0
- package/src_old/AreaChart/AreaChart.types.ts +18 -0
- package/src_old/AreaChart/index.tsx +2 -0
- package/src_old/Aside/Aside.tsx +26 -0
- package/src_old/Aside/Aside.types.ts +21 -0
- package/src_old/Aside/AsideSidebar.tsx +78 -0
- package/src_old/Aside/index.ts +3 -0
- package/src_old/AspectRatio/AspectRatio.tsx +5 -0
- package/src_old/AspectRatio/index.ts +1 -0
- package/src_old/Avatar/Avatar.tsx +48 -0
- package/src_old/Avatar/index.ts +1 -0
- package/src_old/Badge/Badge.tsx +13 -0
- package/src_old/Badge/Badge.types.ts +8 -0
- package/src_old/Badge/badgeVariants.ts +21 -0
- package/src_old/Badge/index.ts +3 -0
- package/src_old/Breadcrumb/Breadcrumb.tsx +115 -0
- package/src_old/Breadcrumb/index.ts +1 -0
- package/src_old/Calendar/Calendar.tsx +77 -0
- package/src_old/Calendar/index.ts +1 -0
- package/src_old/Card/Card.tsx +77 -0
- package/src_old/Card/index.ts +1 -0
- package/src_old/Carousel/Carousel.tsx +262 -0
- package/src_old/Carousel/index.ts +1 -0
- package/src_old/Chart/Chart.tsx +365 -0
- package/src_old/Chart/index.ts +1 -0
- package/src_old/Checkbox/Checkbox.tsx +62 -0
- package/src_old/Checkbox/Checkbox.types.ts +15 -0
- package/src_old/Checkbox/index.ts +2 -0
- package/src_old/Collapsible/Collapsible.tsx +11 -0
- package/src_old/Collapsible/index.ts +1 -0
- package/src_old/Combobox/Combobox.tsx +256 -0
- package/src_old/Combobox/Combobox.types.ts +55 -0
- package/src_old/Combobox/ComboboxOptionItem.tsx +46 -0
- package/src_old/Combobox/ComboboxOptions.tsx +90 -0
- package/src_old/Combobox/index.tsx +2 -0
- package/src_old/Command/Command.tsx +161 -0
- package/src_old/Command/index.ts +1 -0
- package/src_old/DataTable/DataTable.tsx +118 -0
- package/src_old/DataTable/DataTable.types.tsx +14 -0
- package/src_old/DataTable/DataTableColumnFilter.tsx +57 -0
- package/src_old/DataTable/index.tsx +2 -0
- package/src_old/DataTable/useDataTable.ts +44 -0
- package/src_old/DatePicker/DatePicker.tsx +56 -0
- package/src_old/DatePicker/DatePicker.types.tsx +7 -0
- package/src_old/DatePicker/index.tsx +3 -0
- package/src_old/Dialog/Dialog.tsx +182 -0
- package/src_old/Dialog/DialogOverlayScope.tsx +19 -0
- package/src_old/Dialog/index.ts +2 -0
- package/src_old/Drawer/Drawer.tsx +118 -0
- package/src_old/Drawer/index.ts +1 -0
- package/src_old/DropdownMenu/DropdownMenu.tsx +206 -0
- package/src_old/DropdownMenu/index.ts +1 -0
- package/src_old/Dropzone/Dropzone.tsx +229 -0
- package/src_old/Dropzone/Dropzone.types.tsx +69 -0
- package/src_old/Dropzone/DropzoneFilePreview.tsx +69 -0
- package/src_old/Dropzone/DropzoneSinglePickPreview.tsx +64 -0
- package/src_old/Dropzone/DropzoneUtils.tsx +31 -0
- package/src_old/Dropzone/index.tsx +2 -0
- package/src_old/Form/Form.tsx +181 -0
- package/src_old/Form/FormRenderControl.tsx +23 -0
- package/src_old/Form/FormRenderControl.types.tsx +29 -0
- package/src_old/Form/index.ts +4 -0
- package/src_old/FormCheckbox/FormCheckbox.tsx +34 -0
- package/src_old/FormCheckbox/FormCheckbox.types.tsx +10 -0
- package/src_old/FormCheckbox/index.tsx +2 -0
- package/src_old/FormCombobox/FormCombobox.tsx +27 -0
- package/src_old/FormCombobox/FormCombobox.types.ts +7 -0
- package/src_old/FormCombobox/index.tsx +2 -0
- package/src_old/FormDatePicker/FormDatePicker.tsx +33 -0
- package/src_old/FormDatePicker/FormDatePicker.types.ts +9 -0
- package/src_old/FormDatePicker/index.tsx +3 -0
- package/src_old/FormDropzone/FormDropzone.tsx +23 -0
- package/src_old/FormDropzone/FormDropzone.types.ts +7 -0
- package/src_old/FormDropzone/index.tsx +2 -0
- package/src_old/FormInput/FormInput.tsx +109 -0
- package/src_old/FormInput/FormInput.types.tsx +7 -0
- package/src_old/FormInput/index.tsx +2 -0
- package/src_old/FormRadio/FormRadio.tsx +54 -0
- package/src_old/FormRadio/FormRadio.types.ts +11 -0
- package/src_old/FormRadio/index.ts +2 -0
- package/src_old/FormSelect/FormSelect.tsx +44 -0
- package/src_old/FormSelect/FormSelect.types.ts +8 -0
- package/src_old/FormSelect/index.tsx +2 -0
- package/src_old/FormTextarea/FormTextarea.tsx +28 -0
- package/src_old/FormTextarea/FormTextarea.types.tsx +7 -0
- package/src_old/FormTextarea/index.tsx +2 -0
- package/src_old/Header/Header.tsx +34 -0
- package/src_old/Header/Header.types.tsx +3 -0
- package/src_old/Header/index.ts +2 -0
- package/src_old/HoverCard/HoverCard.tsx +29 -0
- package/src_old/HoverCard/index.ts +1 -0
- package/src_old/Input/Input.tsx +95 -0
- package/src_old/Input/Input.types.ts +26 -0
- package/src_old/Input/index.ts +3 -0
- package/src_old/Input/inputVariants.tsx +22 -0
- package/src_old/InputOTP/InputOTP.tsx +71 -0
- package/src_old/InputOTP/index.ts +1 -0
- package/src_old/Label/Label.tsx +23 -0
- package/src_old/Label/index.ts +2 -0
- package/src_old/Label/labelVariants.ts +8 -0
- package/src_old/LazyLoader/LazyLoader.tsx +30 -0
- package/src_old/LazyLoader/index.ts +1 -0
- package/src_old/LoadedIcon/LoadedIcon.tsx +36 -0
- package/src_old/LoadedIcon/index.ts +1 -0
- package/src_old/LoadingMask/LoadingMask.tsx +21 -0
- package/src_old/LoadingMask/LoadingMask.types.ts +5 -0
- package/src_old/LoadingMask/RenderLoadingMask.tsx +80 -0
- package/src_old/LoadingMask/index.ts +3 -0
- package/src_old/LoadingProgress/LoadingProgress.tsx +36 -0
- package/src_old/LoadingProgress/LoadingProgress.types.tsx +8 -0
- package/src_old/LoadingProgress/index.ts +3 -0
- package/src_old/LoadingProgress/loadingProgressVariants.ts +22 -0
- package/src_old/Menubar/Menubar.tsx +232 -0
- package/src_old/Menubar/index.ts +1 -0
- package/src_old/NavigationMenu/NavigationMenu.tsx +123 -0
- package/src_old/NavigationMenu/index.ts +2 -0
- package/src_old/NavigationMenu/navigationMenuVariants.ts +5 -0
- package/src_old/Pagination/Pagination.tsx +117 -0
- package/src_old/Pagination/index.ts +1 -0
- package/src_old/Popover/Popover.tsx +47 -0
- package/src_old/Popover/index.ts +1 -0
- package/src_old/Progress/Progress.tsx +28 -0
- package/src_old/Progress/index.ts +1 -0
- package/src_old/Radio/Radio.tsx +23 -0
- package/src_old/Radio/Radio.types.ts +17 -0
- package/src_old/Radio/index.ts +2 -0
- package/src_old/RadioGroup/RadioGroup.tsx +67 -0
- package/src_old/RadioGroup/index.ts +1 -0
- package/src_old/Resizable/Resizable.tsx +45 -0
- package/src_old/Resizable/index.ts +1 -0
- package/src_old/ScrollArea/ScrollArea.tsx +58 -0
- package/src_old/ScrollArea/index.ts +1 -0
- package/src_old/Search/Search.tsx +57 -0
- package/src_old/Search/Search.types.tsx +9 -0
- package/src_old/Search/index.tsx +3 -0
- package/src_old/Select/Select.stories.tsx +45 -0
- package/src_old/Select/Select.tsx +171 -0
- package/src_old/Select/Select.types.ts +46 -0
- package/src_old/Select/SelectRoot.tsx +164 -0
- package/src_old/Select/index.ts +3 -0
- package/src_old/Separator/Separator.tsx +31 -0
- package/src_old/Separator/index.ts +1 -0
- package/src_old/Sheet/Sheet.tsx +144 -0
- package/src_old/Sheet/index.ts +1 -0
- package/src_old/Sidebar/Sidebar.tsx +763 -0
- package/src_old/Sidebar/index.ts +1 -0
- package/src_old/Skeleton/Skeleton.tsx +17 -0
- package/src_old/Skeleton/index.ts +1 -0
- package/src_old/Slider/Slider.tsx +28 -0
- package/src_old/Slider/index.ts +1 -0
- package/src_old/Sonner/Sonner.tsx +31 -0
- package/src_old/Sonner/index.ts +1 -0
- package/src_old/Switch/Switch.tsx +29 -0
- package/src_old/Switch/index.ts +1 -0
- package/src_old/Table/Table.tsx +120 -0
- package/src_old/Table/index.ts +1 -0
- package/src_old/TablePagination/TablePagination.tsx +96 -0
- package/src_old/TablePagination/index.ts +1 -0
- package/src_old/Tabs/Tabs.tsx +35 -0
- package/src_old/Tabs/Tabs.types.tsx +13 -0
- package/src_old/Tabs/TabsRoot.tsx +55 -0
- package/src_old/Tabs/index.ts +2 -0
- package/src_old/Textarea/Textarea.tsx +78 -0
- package/src_old/Textarea/Textarea.types.tsx +21 -0
- package/src_old/Textarea/index.ts +2 -0
- package/src_old/Textarea/useAutosizeTextArea.ts +33 -0
- package/src_old/Theme/ThemeModeToggle.tsx +71 -0
- package/src_old/Theme/ThemeProvider.tsx +29 -0
- package/src_old/Theme/index.ts +2 -0
- package/src_old/Toast/Toast.tsx +109 -0
- package/src_old/Toast/Toast.types.tsx +45 -0
- package/src_old/Toast/index.ts +3 -0
- package/src_old/Toast/toast.constants.tsx +6 -0
- package/src_old/Toast/toastVariants.ts +20 -0
- package/src_old/Toast/useToast.ts +156 -0
- package/src_old/Toaster/Toaster.tsx +35 -0
- package/src_old/Toaster/index.ts +1 -0
- package/src_old/Toggle/Toggle.tsx +45 -0
- package/src_old/Toggle/index.ts +1 -0
- package/src_old/ToggleGroup/ToggleGroup.tsx +61 -0
- package/src_old/ToggleGroup/index.ts +1 -0
- package/src_old/global.css +275 -0
- package/src_old/index.ts +72 -0
- package/tsconfig.json +16 -0
- package/tsconfig.lib.json +41 -0
- package/vite.config.ts +67 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
/** Configuration options for controlling the behavior of the debounced function. */
|
2
|
+
type DebounceOptions = {
|
3
|
+
/**
|
4
|
+
* Determines whether the function should be invoked on the leading edge of the timeout.
|
5
|
+
* @default false
|
6
|
+
*/
|
7
|
+
leading?: boolean;
|
8
|
+
/**
|
9
|
+
* Determines whether the function should be invoked on the trailing edge of the timeout.
|
10
|
+
* @default false
|
11
|
+
*/
|
12
|
+
trailing?: boolean;
|
13
|
+
/**
|
14
|
+
* The maximum time the specified function is allowed to be delayed before it is invoked.
|
15
|
+
*/
|
16
|
+
maxWait?: number;
|
17
|
+
};
|
18
|
+
/** Functions to manage a debounced callback. */
|
19
|
+
type ControlFunctions = {
|
20
|
+
/** Cancels pending function invocations. */
|
21
|
+
cancel: () => void;
|
22
|
+
/** Immediately invokes pending function invocations. */
|
23
|
+
flush: () => void;
|
24
|
+
/**
|
25
|
+
* Checks if there are any pending function invocations.
|
26
|
+
* @returns `true` if there are pending invocations, otherwise `false`.
|
27
|
+
*/
|
28
|
+
isPending: () => boolean;
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* Represents the state and control functions of a debounced callback.
|
32
|
+
* Subsequent calls to the debounced function return the result of the last invocation.
|
33
|
+
* Note: If there are no previous invocations, the result will be undefined.
|
34
|
+
* Ensure proper handling in your code.
|
35
|
+
*/
|
36
|
+
export type DebouncedState<T extends (...args: any) => ReturnType<T>> = ((...args: Parameters<T>) => ReturnType<T> | undefined) & ControlFunctions;
|
37
|
+
/**
|
38
|
+
* Custom hook that creates a debounced version of a callback function.
|
39
|
+
* @template T - Type of the original callback function.
|
40
|
+
* @param {T} func - The callback function to be debounced.
|
41
|
+
* @param {number} delay - The delay in milliseconds before the callback is invoked (default is `500` milliseconds).
|
42
|
+
* @param {DebounceOptions} [options] - Options to control the behavior of the debounced function.
|
43
|
+
* @returns {DebouncedState<T>} A debounced version of the original callback along with control functions.
|
44
|
+
* @public
|
45
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-debounce-callback)
|
46
|
+
* @example
|
47
|
+
* ```tsx
|
48
|
+
* const debouncedCallback = useDebounceCallback(
|
49
|
+
* (searchTerm) => {
|
50
|
+
* // Perform search after user stops typing for 500 milliseconds
|
51
|
+
* searchApi(searchTerm);
|
52
|
+
* },
|
53
|
+
* 500
|
54
|
+
* );
|
55
|
+
*
|
56
|
+
* // Later in the component
|
57
|
+
* debouncedCallback('react hooks'); // Will invoke the callback after 500 milliseconds of inactivity.
|
58
|
+
* ```
|
59
|
+
*/
|
60
|
+
export declare function useDebounceCallback<T extends (...args: any) => ReturnType<T>>(func: T, delay?: number, options?: DebounceOptions): DebouncedState<T>;
|
61
|
+
export {};
|
62
|
+
//# sourceMappingURL=useDebounceCallback.d.ts.map
|
package/node_modules/@oneplatformdev/hooks/dist/useDebounceCallback/useDebounceCallback.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDebounceCallback.d.ts","sourceRoot":"","sources":["../../src/useDebounceCallback/useDebounceCallback.ts"],"names":[],"mappings":"AAMA,oFAAoF;AACpF,KAAK,eAAe,GAAG;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,gDAAgD;AAChD,KAAK,gBAAgB,GAAG;IACtB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,wDAAwD;IACxD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB;;;OAGG;IACH,SAAS,EAAE,MAAM,OAAO,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CACvE,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KACnB,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAC7B,gBAAgB,CAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,EAC3E,IAAI,EAAE,CAAC,EACP,KAAK,SAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,cAAc,CAAC,CAAC,CAAC,CAqCnB"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { useRef as f, useMemo as b, useEffect as d } from "react";
|
2
|
+
import o from "lodash.debounce";
|
3
|
+
import { useUnmount as l } from "../useUnmount/useUnmount.js";
|
4
|
+
function F(e, n = 500, r) {
|
5
|
+
const u = f(null);
|
6
|
+
l(() => {
|
7
|
+
u.current && u.current.cancel();
|
8
|
+
});
|
9
|
+
const s = b(() => {
|
10
|
+
const t = o(e, n, r), c = (...m) => t(...m);
|
11
|
+
return c.cancel = () => {
|
12
|
+
t.cancel();
|
13
|
+
}, c.isPending = () => !!u.current, c.flush = () => t.flush(), c;
|
14
|
+
}, [e, n, r]);
|
15
|
+
return d(() => {
|
16
|
+
u.current = o(e, n, r);
|
17
|
+
}, [e, n, r]), s;
|
18
|
+
}
|
19
|
+
export {
|
20
|
+
F as useDebounceCallback
|
21
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useDebounceValue/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { DebouncedState } from '../useDebounceCallback';
|
2
|
+
/**
|
3
|
+
* Hook options.
|
4
|
+
* @template T - The type of the value.
|
5
|
+
*/
|
6
|
+
type UseDebounceValueOptions<T> = {
|
7
|
+
/**
|
8
|
+
* Determines whether the function should be invoked on the leading edge of the timeout.
|
9
|
+
* @default false
|
10
|
+
*/
|
11
|
+
leading?: boolean;
|
12
|
+
/**
|
13
|
+
* Determines whether the function should be invoked on the trailing edge of the timeout.
|
14
|
+
* @default false
|
15
|
+
*/
|
16
|
+
trailing?: boolean;
|
17
|
+
/**
|
18
|
+
* The maximum time the specified function is allowed to be delayed before it is invoked.
|
19
|
+
*/
|
20
|
+
maxWait?: number;
|
21
|
+
/** 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. */
|
22
|
+
equalityFn?: (left: T, right: T) => boolean;
|
23
|
+
};
|
24
|
+
/**
|
25
|
+
* Custom hook that returns a debounced version of the provided value, along with a function to update it.
|
26
|
+
* @template T - The type of the value.
|
27
|
+
* @param {T | (() => T)} initialValue - The value to be debounced.
|
28
|
+
* @param {number} delay - The delay in milliseconds before the value is updated (default is 500ms).
|
29
|
+
* @param {object} [options] - Optional configurations for the debouncing behavior.
|
30
|
+
* @returns {[T, DebouncedState<(value: T) => void>]} An array containing the debounced value and the function to update it.
|
31
|
+
* @public
|
32
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-debounce-value)
|
33
|
+
* @example
|
34
|
+
* ```tsx
|
35
|
+
* const [debouncedValue, updateDebouncedValue] = useDebounceValue(inputValue, 500, { leading: true });
|
36
|
+
* ```
|
37
|
+
*/
|
38
|
+
export declare function useDebounceValue<T>(initialValue: T | (() => T), delay: number, options?: UseDebounceValueOptions<T>): [T, DebouncedState<(value: T) => void>];
|
39
|
+
export {};
|
40
|
+
//# sourceMappingURL=useDebounceValue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDebounceValue.d.ts","sourceRoot":"","sources":["../../src/useDebounceValue/useDebounceValue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAG5D;;;GAGG;AACH,KAAK,uBAAuB,CAAC,CAAC,IAAI;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iJAAiJ;IACjJ,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,CAAA;CAC5C,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC3B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACnC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAoBzC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { useState as d, useRef as l } from "react";
|
2
|
+
import { useDebounceCallback as p } from "../useDebounceCallback/useDebounceCallback.js";
|
3
|
+
function V(u, c, n) {
|
4
|
+
const r = n?.equalityFn ?? ((f, b) => f === b), e = u instanceof Function ? u() : u, [s, a] = d(e), o = l(e), t = p(
|
5
|
+
a,
|
6
|
+
c,
|
7
|
+
n
|
8
|
+
);
|
9
|
+
return r(o.current, e) || (t(e), o.current = e), [s, t];
|
10
|
+
}
|
11
|
+
export {
|
12
|
+
V as useDebounceValue
|
13
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useDocumentTitle/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/** Hook options. */
|
2
|
+
type UseDocumentTitleOptions = {
|
3
|
+
/** Whether to keep the title after unmounting the component (default is `true`). */
|
4
|
+
preserveTitleOnUnmount?: boolean;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* Custom hook that sets the document title.
|
8
|
+
* @param {string} title - The title to set.
|
9
|
+
* @param {?UseDocumentTitleOptions} [options] - The options.
|
10
|
+
* @public
|
11
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-document-title)
|
12
|
+
* @example
|
13
|
+
* ```tsx
|
14
|
+
* useDocumentTitle('My new title');
|
15
|
+
* ```
|
16
|
+
*/
|
17
|
+
export declare function useDocumentTitle(title: string, options?: UseDocumentTitleOptions): void;
|
18
|
+
export {};
|
19
|
+
//# sourceMappingURL=useDocumentTitle.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../src/useDocumentTitle/useDocumentTitle.ts"],"names":[],"mappings":"AAKA,oBAAoB;AACpB,KAAK,uBAAuB,GAAG;IAC7B,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,uBAA4B,GACpC,IAAI,CAiBN"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { useRef as r } from "react";
|
2
|
+
import { useIsomorphicLayoutEffect as o } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
3
|
+
import { useUnmount as i } from "../useUnmount/useUnmount.js";
|
4
|
+
function l(e, n = {}) {
|
5
|
+
const { preserveTitleOnUnmount: u = !0 } = n, t = r(null);
|
6
|
+
o(() => {
|
7
|
+
t.current = window.document.title;
|
8
|
+
}, []), o(() => {
|
9
|
+
window.document.title = e;
|
10
|
+
}, [e]), i(() => {
|
11
|
+
!u && t.current && (window.document.title = t.current);
|
12
|
+
});
|
13
|
+
}
|
14
|
+
export {
|
15
|
+
l as useDocumentTitle
|
16
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useEventCallback/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Custom hook that creates a memoized event callback.
|
3
|
+
* @template Args - An array of argument types for the event callback.
|
4
|
+
* @template R - The return type of the event callback.
|
5
|
+
* @param {(...args: Args) => R} fn - The callback function.
|
6
|
+
* @returns {(...args: Args) => R} A memoized event callback function.
|
7
|
+
* @public
|
8
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-event-callback)
|
9
|
+
* @example
|
10
|
+
* ```tsx
|
11
|
+
* const handleClick = useEventCallback((event) => {
|
12
|
+
* // Handle the event here
|
13
|
+
* });
|
14
|
+
* ```
|
15
|
+
*/
|
16
|
+
export declare function useEventCallback<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => R;
|
17
|
+
export declare function useEventCallback<Args extends unknown[], R>(fn: ((...args: Args) => R) | undefined): ((...args: Args) => R) | undefined;
|
18
|
+
//# sourceMappingURL=useEventCallback.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useEventCallback.d.ts","sourceRoot":"","sources":["../../src/useEventCallback/useEventCallback.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,CAAC,EACxD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,GACvB,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAA;AACvB,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,CAAC,EACxD,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC,GAAG,SAAS,GACrC,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC,GAAG,SAAS,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { useRef as t, useCallback as o } from "react";
|
2
|
+
import { useIsomorphicLayoutEffect as a } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
3
|
+
function l(e) {
|
4
|
+
const r = t(() => {
|
5
|
+
throw new Error("Cannot call an event handler while rendering.");
|
6
|
+
});
|
7
|
+
return a(() => {
|
8
|
+
r.current = e;
|
9
|
+
}, [e]), o((...n) => r.current?.(...n), [r]);
|
10
|
+
}
|
11
|
+
export {
|
12
|
+
l as useEventCallback
|
13
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useEventListener/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { RefObject } from 'react';
|
2
|
+
declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: boolean | AddEventListenerOptions): void;
|
3
|
+
declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: undefined, options?: boolean | AddEventListenerOptions): void;
|
4
|
+
declare function useEventListener<K extends keyof HTMLElementEventMap & keyof SVGElementEventMap, T extends Element = K extends keyof HTMLElementEventMap ? HTMLDivElement : SVGElement>(eventName: K, handler: ((event: HTMLElementEventMap[K]) => void) | ((event: SVGElementEventMap[K]) => void), element: RefObject<T>, options?: boolean | AddEventListenerOptions): void;
|
5
|
+
declare function useEventListener<K extends keyof DocumentEventMap>(eventName: K, handler: (event: DocumentEventMap[K]) => void, element: RefObject<Document>, options?: boolean | AddEventListenerOptions): void;
|
6
|
+
export { useEventListener };
|
7
|
+
//# sourceMappingURL=useEventListener.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/useEventListener/useEventListener.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,sBAAsB,EAC9D,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,IAAI,EACnD,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,EAClC,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAA;AAGP,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,cAAc,EACtD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAA;AAGP,iBAAS,gBAAgB,CACvB,CAAC,SAAS,MAAM,mBAAmB,GAAG,MAAM,kBAAkB,EAC9D,CAAC,SAAS,OAAO,GAAG,CAAC,SAAS,MAAM,mBAAmB,GACnD,cAAc,GACd,UAAU,EAEd,SAAS,EAAE,CAAC,EACZ,OAAO,EACH,CAAC,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GACzC,CAAC,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,EAC5C,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAA;AAGP,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACxD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC7C,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAA;AA6EP,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { useRef as f, useEffect as i } from "react";
|
2
|
+
import { useIsomorphicLayoutEffect as E } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
3
|
+
function m(r, t, s, n) {
|
4
|
+
const u = f(t);
|
5
|
+
E(() => {
|
6
|
+
u.current = t;
|
7
|
+
}, [t]), i(() => {
|
8
|
+
const e = s?.current ?? window;
|
9
|
+
if (!(e && e.addEventListener)) return;
|
10
|
+
const c = (o) => {
|
11
|
+
u.current(o);
|
12
|
+
};
|
13
|
+
return e.addEventListener(r, c, n), () => {
|
14
|
+
e.removeEventListener(r, c, n);
|
15
|
+
};
|
16
|
+
}, [r, s, n]);
|
17
|
+
}
|
18
|
+
export {
|
19
|
+
m as useEventListener
|
20
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useHover/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { RefObject } from 'react';
|
2
|
+
/**
|
3
|
+
* Custom hook that tracks whether a DOM element is being hovered over.
|
4
|
+
* @template T - The type of the DOM element. Defaults to `HTMLElement`.
|
5
|
+
* @param {RefObject<T>} elementRef - The ref object for the DOM element to track.
|
6
|
+
* @returns {boolean} A boolean value indicating whether the element is being hovered over.
|
7
|
+
* @public
|
8
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-hover)
|
9
|
+
* @example
|
10
|
+
* ```tsx
|
11
|
+
* const buttonRef = useRef<HTMLButtonElement>(null);
|
12
|
+
* const isHovered = useHover(buttonRef);
|
13
|
+
* // Access the isHovered variable to determine if the button is being hovered over.
|
14
|
+
* ```
|
15
|
+
*/
|
16
|
+
export declare function useHover<T extends HTMLElement = HTMLElement>(elementRef: RefObject<T>): boolean;
|
17
|
+
//# sourceMappingURL=useHover.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useHover.d.ts","sourceRoot":"","sources":["../../src/useHover/useHover.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC1D,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,OAAO,CAcT"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { useState as n } from "react";
|
2
|
+
import { useEventListener as o } from "../useEventListener/useEventListener.js";
|
3
|
+
function m(e) {
|
4
|
+
const [s, t] = n(!1), r = () => {
|
5
|
+
t(!0);
|
6
|
+
}, u = () => {
|
7
|
+
t(!1);
|
8
|
+
};
|
9
|
+
return o("mouseenter", r, e), o("mouseleave", u, e), s;
|
10
|
+
}
|
11
|
+
export {
|
12
|
+
m as useHover
|
13
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useIntersectionObserver/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA"}
|
package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.d.ts
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
/** Represents the options for configuring the Intersection Observer. */
|
2
|
+
type UseIntersectionObserverOptions = {
|
3
|
+
/**
|
4
|
+
* The element that is used as the viewport for checking visibility of the target.
|
5
|
+
* @default null
|
6
|
+
*/
|
7
|
+
root?: Element | Document | null;
|
8
|
+
/**
|
9
|
+
* A margin around the root.
|
10
|
+
* @default '0%'
|
11
|
+
*/
|
12
|
+
rootMargin?: string;
|
13
|
+
/**
|
14
|
+
* A threshold indicating the percentage of the target's visibility needed to trigger the callback.
|
15
|
+
* @default 0
|
16
|
+
*/
|
17
|
+
threshold?: number | number[];
|
18
|
+
/**
|
19
|
+
* If true, freezes the intersection state once the element becomes visible.
|
20
|
+
* @default false
|
21
|
+
*/
|
22
|
+
freezeOnceVisible?: boolean;
|
23
|
+
/**
|
24
|
+
* A callback function to be invoked when the intersection state changes.
|
25
|
+
* @param {boolean} isIntersecting - A boolean indicating if the element is intersecting.
|
26
|
+
* @param {IntersectionObserverEntry} entry - The intersection observer Entry.
|
27
|
+
* @default undefined
|
28
|
+
*/
|
29
|
+
onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
|
30
|
+
/**
|
31
|
+
* The initial state of the intersection.
|
32
|
+
* @default false
|
33
|
+
*/
|
34
|
+
initialIsIntersecting?: boolean;
|
35
|
+
};
|
36
|
+
/**
|
37
|
+
* The return type of the useIntersectionObserver hook.
|
38
|
+
*
|
39
|
+
* Supports both tuple and object destructing.
|
40
|
+
* @param {(node: Element | null) => void} ref - The ref callback function.
|
41
|
+
* @param {boolean} isIntersecting - A boolean indicating if the element is intersecting.
|
42
|
+
* @param {IntersectionObserverEntry | undefined} entry - The intersection observer Entry.
|
43
|
+
*/
|
44
|
+
type IntersectionReturn = [
|
45
|
+
(node?: Element | null) => void,
|
46
|
+
boolean,
|
47
|
+
IntersectionObserverEntry | undefined
|
48
|
+
] & {
|
49
|
+
ref: (node?: Element | null) => void;
|
50
|
+
isIntersecting: boolean;
|
51
|
+
entry?: IntersectionObserverEntry;
|
52
|
+
};
|
53
|
+
/**
|
54
|
+
* Custom hook that tracks the intersection of a DOM element with its containing element or the viewport using the [`Intersection Observer API`](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
|
55
|
+
* @param {UseIntersectionObserverOptions} options - The options for the Intersection Observer.
|
56
|
+
* @returns {IntersectionReturn} The ref callback, a boolean indicating if the element is intersecting, and the intersection observer entry.
|
57
|
+
* @public
|
58
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-intersection-observer)
|
59
|
+
* @example
|
60
|
+
* ```tsx
|
61
|
+
* // Example 1
|
62
|
+
* const [ref, isIntersecting, entry] = useIntersectionObserver({ threshold: 0.5 });
|
63
|
+
* ```
|
64
|
+
*
|
65
|
+
* ```tsx
|
66
|
+
* // Example 2
|
67
|
+
* const { ref, isIntersecting, entry } = useIntersectionObserver({ threshold: 0.5 });
|
68
|
+
* ```
|
69
|
+
*/
|
70
|
+
export declare function useIntersectionObserver({ threshold, root, rootMargin, freezeOnceVisible, initialIsIntersecting, onChange, }?: UseIntersectionObserverOptions): IntersectionReturn;
|
71
|
+
export {};
|
72
|
+
//# sourceMappingURL=useIntersectionObserver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useIntersectionObserver.d.ts","sourceRoot":"","sources":["../../src/useIntersectionObserver/useIntersectionObserver.ts"],"names":[],"mappings":"AAUA,wEAAwE;AACxE,KAAK,8BAA8B,GAAG;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAA;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAC9E;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;GAOG;AACH,KAAK,kBAAkB,GAAG;IACxB,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI;IAC/B,OAAO;IACP,yBAAyB,GAAG,SAAS;CACtC,GAAG;IACF,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IACpC,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,CAAC,EAAE,yBAAyB,CAAA;CAClC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAa,EACb,IAAW,EACX,UAAiB,EACjB,iBAAyB,EACzB,qBAA6B,EAC7B,QAAQ,GACT,GAAE,8BAAmC,GAAG,kBAAkB,CAiG1D"}
|
package/node_modules/@oneplatformdev/hooks/dist/useIntersectionObserver/useIntersectionObserver.js
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
import { useState as d, useRef as h, useEffect as I } from "react";
|
2
|
+
function A({
|
3
|
+
threshold: f = 0,
|
4
|
+
root: a = null,
|
5
|
+
rootMargin: l = "0%",
|
6
|
+
freezeOnceVisible: s = !1,
|
7
|
+
initialIsIntersecting: i = !1,
|
8
|
+
onChange: R
|
9
|
+
} = {}) {
|
10
|
+
const [r, b] = d(null), [t, y] = d(() => ({
|
11
|
+
isIntersecting: i,
|
12
|
+
entry: void 0
|
13
|
+
})), u = h(null);
|
14
|
+
u.current = R;
|
15
|
+
const c = t.entry?.isIntersecting && s;
|
16
|
+
I(() => {
|
17
|
+
if (!r || !("IntersectionObserver" in window) || c) return;
|
18
|
+
const n = new IntersectionObserver(
|
19
|
+
(m) => {
|
20
|
+
const p = Array.isArray(n.thresholds) ? n.thresholds : [n.thresholds];
|
21
|
+
m.forEach((o) => {
|
22
|
+
const v = o.isIntersecting && p.some((w) => o.intersectionRatio >= w);
|
23
|
+
y({ isIntersecting: v, entry: o }), u.current && u.current(v, o);
|
24
|
+
});
|
25
|
+
},
|
26
|
+
{ threshold: f, root: a, rootMargin: l }
|
27
|
+
);
|
28
|
+
return n.observe(r), () => {
|
29
|
+
n.disconnect();
|
30
|
+
};
|
31
|
+
}, [
|
32
|
+
r,
|
33
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
34
|
+
JSON.stringify(f),
|
35
|
+
a,
|
36
|
+
l,
|
37
|
+
c,
|
38
|
+
s
|
39
|
+
]);
|
40
|
+
const g = h(null);
|
41
|
+
I(() => {
|
42
|
+
!r && t.entry?.target && !s && !c && g.current !== t.entry.target && (g.current = t.entry.target, y({ isIntersecting: i, entry: void 0 }));
|
43
|
+
}, [r, t.entry, s, c, i]);
|
44
|
+
const e = [
|
45
|
+
b,
|
46
|
+
!!t.isIntersecting,
|
47
|
+
t.entry
|
48
|
+
];
|
49
|
+
return e.ref = e[0], e.isIntersecting = e[1], e.entry = e[2], e;
|
50
|
+
}
|
51
|
+
export {
|
52
|
+
A as useIntersectionObserver
|
53
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useInterval/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Custom hook that creates an interval that invokes a callback function at a specified delay using the [`setInterval API`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval).
|
3
|
+
* @param {() => void} callback - The function to be invoked at each interval.
|
4
|
+
* @param {number | null} delay - The time, in milliseconds, between each invocation of the callback. Use `null` to clear the interval.
|
5
|
+
* @public
|
6
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-interval)
|
7
|
+
* @example
|
8
|
+
* ```tsx
|
9
|
+
* const handleInterval = () => {
|
10
|
+
* // Code to be executed at each interval
|
11
|
+
* };
|
12
|
+
* useInterval(handleInterval, 1000);
|
13
|
+
* ```
|
14
|
+
*/
|
15
|
+
export declare function useInterval(callback: () => void, delay: number | null): void;
|
16
|
+
//# sourceMappingURL=useInterval.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useInterval.d.ts","sourceRoot":"","sources":["../../src/useInterval/useInterval.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,QAwBrE"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { useRef as o, useEffect as u } from "react";
|
2
|
+
import { useIsomorphicLayoutEffect as f } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
3
|
+
function i(r, t) {
|
4
|
+
const e = o(r);
|
5
|
+
f(() => {
|
6
|
+
e.current = r;
|
7
|
+
}, [r]), u(() => {
|
8
|
+
if (t === null)
|
9
|
+
return;
|
10
|
+
const n = setInterval(() => {
|
11
|
+
e.current();
|
12
|
+
}, t);
|
13
|
+
return () => {
|
14
|
+
clearInterval(n);
|
15
|
+
};
|
16
|
+
}, [t]);
|
17
|
+
}
|
18
|
+
export {
|
19
|
+
i as useInterval
|
20
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useIsClient/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Custom hook that determines if the code is running on the client side (in the browser).
|
3
|
+
* @returns {boolean} A boolean value indicating whether the code is running on the client side.
|
4
|
+
* @public
|
5
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-is-client)
|
6
|
+
* @example
|
7
|
+
* ```tsx
|
8
|
+
* const isClient = useIsClient();
|
9
|
+
* // Use isClient to conditionally render or execute code specific to the client side.
|
10
|
+
* ```
|
11
|
+
*/
|
12
|
+
export declare function useIsClient(): boolean;
|
13
|
+
//# sourceMappingURL=useIsClient.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useIsClient.d.ts","sourceRoot":"","sources":["../../src/useIsClient/useIsClient.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,YAQ1B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useIsMobile/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,mBAAmB,SAAS,CAAA"}
|