@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 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useResizeObserver/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { RefObject } from 'react';
|
2
|
+
/** The size of the observed element. */
|
3
|
+
type Size = {
|
4
|
+
/** The width of the observed element. */
|
5
|
+
width: number | undefined;
|
6
|
+
/** The height of the observed element. */
|
7
|
+
height: number | undefined;
|
8
|
+
};
|
9
|
+
/** The options for the ResizeObserver. */
|
10
|
+
type UseResizeObserverOptions<T extends HTMLElement = HTMLElement> = {
|
11
|
+
/** The ref of the element to observe. */
|
12
|
+
ref: RefObject<T>;
|
13
|
+
/**
|
14
|
+
* When using `onResize`, the hook doesn't re-render on element size changes; it delegates handling to the provided callback.
|
15
|
+
* @default undefined
|
16
|
+
*/
|
17
|
+
onResize?: (size: Size) => void;
|
18
|
+
/**
|
19
|
+
* The box model to use for the ResizeObserver.
|
20
|
+
* @default 'content-box'
|
21
|
+
*/
|
22
|
+
box?: 'border-box' | 'content-box' | 'device-pixel-content-box';
|
23
|
+
};
|
24
|
+
/**
|
25
|
+
* Custom hook that observes the size of an element using the [`ResizeObserver API`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).
|
26
|
+
* @template T - The type of the element to observe.
|
27
|
+
* @param {UseResizeObserverOptions<T>} options - The options for the ResizeObserver.
|
28
|
+
* @returns {Size} - The size of the observed element.
|
29
|
+
* @public
|
30
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-resize-observer)
|
31
|
+
* @example
|
32
|
+
* ```tsx
|
33
|
+
* const myRef = useRef(null);
|
34
|
+
* const { width = 0, height = 0 } = useResizeObserver({
|
35
|
+
* ref: myRef,
|
36
|
+
* box: 'content-box',
|
37
|
+
* });
|
38
|
+
*
|
39
|
+
* <div ref={myRef}>Hello, world!</div>
|
40
|
+
* ```
|
41
|
+
*/
|
42
|
+
export declare function useResizeObserver<T extends HTMLElement = HTMLElement>(options: UseResizeObserverOptions<T>): Size;
|
43
|
+
export {};
|
44
|
+
//# sourceMappingURL=useResizeObserver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/useResizeObserver/useResizeObserver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,wCAAwC;AACxC,KAAK,IAAI,GAAG;IACV,yCAAyC;IACzC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,0CAA0C;AAC1C,KAAK,wBAAwB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IACnE,yCAAyC;IACzC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/B;;;OAGG;IACH,GAAG,CAAC,EAAE,YAAY,GAAG,aAAa,GAAG,0BAA0B,CAAA;CAChE,CAAA;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnE,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACnC,IAAI,CAmDN"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { useState as g, useRef as z, useEffect as x } from "react";
|
2
|
+
import { useIsMounted as l } from "../useIsMounted/useIsMounted.js";
|
3
|
+
const w = {
|
4
|
+
width: void 0,
|
5
|
+
height: void 0
|
6
|
+
};
|
7
|
+
function B(t) {
|
8
|
+
const { ref: e, box: i = "content-box" } = t, [{ width: v, height: a }, b] = g(w), s = l(), n = z({ ...w }), r = z(void 0);
|
9
|
+
return r.current = t.onResize, x(() => {
|
10
|
+
if (!e.current || typeof window > "u" || !("ResizeObserver" in window)) return;
|
11
|
+
const u = new ResizeObserver(([d]) => {
|
12
|
+
const h = i === "border-box" ? "borderBoxSize" : i === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", o = S(d, h, "inlineSize"), c = S(d, h, "blockSize");
|
13
|
+
if (n.current.width !== o || n.current.height !== c) {
|
14
|
+
const f = { width: o, height: c };
|
15
|
+
n.current.width = o, n.current.height = c, r.current ? r.current(f) : s() && b(f);
|
16
|
+
}
|
17
|
+
});
|
18
|
+
return u.observe(e.current, { box: i }), () => {
|
19
|
+
u.disconnect();
|
20
|
+
};
|
21
|
+
}, [i, e, s]), { width: v, height: a };
|
22
|
+
}
|
23
|
+
function S(t, e, i) {
|
24
|
+
return t[e] ? Array.isArray(t[e]) ? t[e][0][i] : (
|
25
|
+
// @ts-ignore Support Firefox's non-standard behavior
|
26
|
+
t[e][i]
|
27
|
+
) : e === "contentBoxSize" ? t.contentRect[i === "inlineSize" ? "width" : "height"] : void 0;
|
28
|
+
}
|
29
|
+
export {
|
30
|
+
B as useResizeObserver
|
31
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useScreen/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* The hooks options.
|
3
|
+
* @template InitializeWithValue - If `true` (default), the hook will initialize reading the screen dimensions. In SSR, you should set it to `false`, returning `undefined` initially.
|
4
|
+
*/
|
5
|
+
type UseScreenOptions<InitializeWithValue extends boolean | undefined> = {
|
6
|
+
/**
|
7
|
+
* If `true` (default), the hook will initialize reading the screen dimensions. In SSR, you should set it to `false`, returning `undefined` initially.
|
8
|
+
* @default true
|
9
|
+
*/
|
10
|
+
initializeWithValue: InitializeWithValue;
|
11
|
+
/**
|
12
|
+
* The delay in milliseconds before the state is updated (disabled by default for retro-compatibility).
|
13
|
+
* @default undefined
|
14
|
+
*/
|
15
|
+
debounceDelay?: number;
|
16
|
+
};
|
17
|
+
export declare function useScreen(options: UseScreenOptions<false>): Screen | undefined;
|
18
|
+
export declare function useScreen(options?: Partial<UseScreenOptions<true>>): Screen;
|
19
|
+
export {};
|
20
|
+
//# sourceMappingURL=useScreen.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useScreen.d.ts","sourceRoot":"","sources":["../../src/useScreen/useScreen.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,KAAK,gBAAgB,CAAC,mBAAmB,SAAS,OAAO,GAAG,SAAS,IAAI;IACvE;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAKD,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,SAAS,CAAA;AAE/E,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAA"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { useState as w } from "react";
|
2
|
+
import { useDebounceCallback as b } from "../useDebounceCallback/useDebounceCallback.js";
|
3
|
+
import { useEventListener as v } from "../useEventListener/useEventListener.js";
|
4
|
+
import { useIsomorphicLayoutEffect as D } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
5
|
+
const c = typeof window > "u";
|
6
|
+
function x(e = {}) {
|
7
|
+
let { initializeWithValue: t = !0 } = e;
|
8
|
+
c && (t = !1);
|
9
|
+
const n = () => {
|
10
|
+
if (!c)
|
11
|
+
return window.screen;
|
12
|
+
}, [u, r] = w(() => {
|
13
|
+
if (t)
|
14
|
+
return n();
|
15
|
+
}), s = b(
|
16
|
+
r,
|
17
|
+
e.debounceDelay
|
18
|
+
);
|
19
|
+
function i() {
|
20
|
+
const o = n(), a = e.debounceDelay ? s : r;
|
21
|
+
if (o) {
|
22
|
+
const {
|
23
|
+
width: f,
|
24
|
+
height: d,
|
25
|
+
availHeight: l,
|
26
|
+
availWidth: S,
|
27
|
+
colorDepth: h,
|
28
|
+
orientation: m,
|
29
|
+
pixelDepth: p
|
30
|
+
} = o;
|
31
|
+
a({
|
32
|
+
width: f,
|
33
|
+
height: d,
|
34
|
+
availHeight: l,
|
35
|
+
availWidth: S,
|
36
|
+
colorDepth: h,
|
37
|
+
orientation: m,
|
38
|
+
pixelDepth: p
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return v("resize", i), D(() => {
|
43
|
+
i();
|
44
|
+
}, []), u;
|
45
|
+
}
|
46
|
+
export {
|
47
|
+
x as useScreen
|
48
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useScript/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/** Script loading status. */
|
2
|
+
type UseScriptStatus = 'idle' | 'loading' | 'ready' | 'error';
|
3
|
+
/** Hook options. */
|
4
|
+
type UseScriptOptions = {
|
5
|
+
/** If `true`, prevents the script from being loaded (optional). */
|
6
|
+
shouldPreventLoad?: boolean;
|
7
|
+
/** If `true`, removes the script from the DOM when the component unmounts (optional). */
|
8
|
+
removeOnUnmount?: boolean;
|
9
|
+
/** Script's `id` (optional). */
|
10
|
+
id?: string;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* Custom hook that dynamically loads scripts and tracking their loading status.
|
14
|
+
* @param {string | null} src - The source URL of the script to load. Set to `null` or omit to prevent loading (optional).
|
15
|
+
* @param {UseScriptOptions} [options] - Additional options for controlling script loading (optional).
|
16
|
+
* @returns {UseScriptStatus} The status of the script loading, which can be one of 'idle', 'loading', 'ready', or 'error'.
|
17
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-script)
|
18
|
+
* @example
|
19
|
+
* const scriptStatus = useScript('https://example.com/script.js', { removeOnUnmount: true });
|
20
|
+
* // Access the status of the script loading (e.g., 'loading', 'ready', 'error').
|
21
|
+
*/
|
22
|
+
export declare function useScript(src: string | null, options?: UseScriptOptions): UseScriptStatus;
|
23
|
+
export {};
|
24
|
+
//# sourceMappingURL=useScript.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useScript.d.ts","sourceRoot":"","sources":["../../src/useScript/useScript.ts"],"names":[],"mappings":"AAEA,6BAA6B;AAC7B,KAAK,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,oBAAoB;AACpB,KAAK,gBAAgB,GAAG;IACtB,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gCAAgC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AA6BD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACzB,eAAe,CAsFjB"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { useState as v, useEffect as f } from "react";
|
2
|
+
const s = /* @__PURE__ */ new Map();
|
3
|
+
function m(t) {
|
4
|
+
const r = document.querySelector(
|
5
|
+
`script[src="${t}"]`
|
6
|
+
), u = r?.getAttribute("data-status");
|
7
|
+
return {
|
8
|
+
node: r,
|
9
|
+
status: u
|
10
|
+
};
|
11
|
+
}
|
12
|
+
function p(t, r) {
|
13
|
+
const [u, i] = v(() => !t || r?.shouldPreventLoad ? "idle" : typeof window > "u" ? "loading" : s.get(t) ?? "loading");
|
14
|
+
return f(() => {
|
15
|
+
if (!t || r?.shouldPreventLoad)
|
16
|
+
return;
|
17
|
+
const n = s.get(t);
|
18
|
+
if (n === "ready" || n === "error") {
|
19
|
+
i(n);
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
const c = m(t);
|
23
|
+
let e = c.node;
|
24
|
+
if (e)
|
25
|
+
i(c.status ?? n ?? "loading");
|
26
|
+
else {
|
27
|
+
e = document.createElement("script"), e.src = t, e.async = !0, r?.id && (e.id = r.id), e.setAttribute("data-status", "loading"), document.body.appendChild(e);
|
28
|
+
const a = (o) => {
|
29
|
+
const l = o.type === "load" ? "ready" : "error";
|
30
|
+
e?.setAttribute("data-status", l);
|
31
|
+
};
|
32
|
+
e.addEventListener("load", a), e.addEventListener("error", a);
|
33
|
+
}
|
34
|
+
const d = (a) => {
|
35
|
+
const o = a.type === "load" ? "ready" : "error";
|
36
|
+
i(o), s.set(t, o);
|
37
|
+
};
|
38
|
+
return e.addEventListener("load", d), e.addEventListener("error", d), () => {
|
39
|
+
e && (e.removeEventListener("load", d), e.removeEventListener("error", d)), e && r?.removeOnUnmount && (e.remove(), s.delete(t));
|
40
|
+
};
|
41
|
+
}, [t, r?.shouldPreventLoad, r?.removeOnUnmount, r?.id]), u;
|
42
|
+
}
|
43
|
+
export {
|
44
|
+
p as useScript
|
45
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useScrollLock/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/** Hook options. */
|
2
|
+
type UseScrollLockOptions = {
|
3
|
+
/**
|
4
|
+
* Whether to lock the scroll initially.
|
5
|
+
* @default true
|
6
|
+
*/
|
7
|
+
autoLock?: boolean;
|
8
|
+
/**
|
9
|
+
* The target element to lock the scroll (default is the body element).
|
10
|
+
* @default document.body
|
11
|
+
*/
|
12
|
+
lockTarget?: HTMLElement | string;
|
13
|
+
/**
|
14
|
+
* Whether to prevent width reflow when locking the scroll.
|
15
|
+
* @default true
|
16
|
+
*/
|
17
|
+
widthReflow?: boolean;
|
18
|
+
};
|
19
|
+
/** Hook return type. */
|
20
|
+
type UseScrollLockReturn = {
|
21
|
+
/** Whether the scroll is locked. */
|
22
|
+
isLocked: boolean;
|
23
|
+
/** Lock the scroll. */
|
24
|
+
lock: () => void;
|
25
|
+
/** Unlock the scroll. */
|
26
|
+
unlock: () => void;
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* A custom hook that locks and unlocks scroll.
|
30
|
+
* @param {UseScrollLockOptions} [options] - Options to configure the hook, by default it will lock the scroll automatically.
|
31
|
+
* @returns {UseScrollLockReturn} - An object containing the lock and unlock functions.
|
32
|
+
* @public
|
33
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-scroll-lock)
|
34
|
+
* @example
|
35
|
+
* ```tsx
|
36
|
+
* // Lock the scroll when the modal is mounted, and unlock it when it's unmounted
|
37
|
+
* useScrollLock()
|
38
|
+
* ```
|
39
|
+
* @example
|
40
|
+
* ```tsx
|
41
|
+
* // Manually lock and unlock the scroll
|
42
|
+
* const { lock, unlock } = useScrollLock({ autoLock: false })
|
43
|
+
*
|
44
|
+
* return (
|
45
|
+
* <div>
|
46
|
+
* <button onClick={lock}>Lock</button>
|
47
|
+
* <button onClick={unlock}>Unlock</button>
|
48
|
+
* </div>
|
49
|
+
* )
|
50
|
+
* ```
|
51
|
+
*/
|
52
|
+
export declare function useScrollLock(options?: UseScrollLockOptions): UseScrollLockReturn;
|
53
|
+
export {};
|
54
|
+
//# sourceMappingURL=useScrollLock.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../src/useScrollLock/useScrollLock.ts"],"names":[],"mappings":"AAIA,oBAAoB;AACpB,KAAK,oBAAoB,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,wBAAwB;AACxB,KAAK,mBAAmB,GAAG;IACzB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,yBAAyB;IACzB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AASD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CA0ErB"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { useState as y, useRef as d } from "react";
|
2
|
+
import { useIsomorphicLayoutEffect as w } from "../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
3
|
+
const R = typeof window > "u";
|
4
|
+
function S(s = {}) {
|
5
|
+
const { autoLock: o = !0, lockTarget: e, widthReflow: n = !0 } = s, [l, c] = y(!1), t = d(null), r = d(null), u = () => {
|
6
|
+
if (t.current) {
|
7
|
+
const { overflow: f, paddingRight: g } = t.current.style;
|
8
|
+
if (r.current = { overflow: f, paddingRight: g }, n) {
|
9
|
+
const a = t.current === document.body ? window.innerWidth : t.current.offsetWidth, h = parseInt(window.getComputedStyle(t.current).paddingRight, 10) || 0, p = a - t.current.scrollWidth;
|
10
|
+
t.current.style.paddingRight = `${p + h}px`;
|
11
|
+
}
|
12
|
+
t.current.style.overflow = "hidden", c(!0);
|
13
|
+
}
|
14
|
+
}, i = () => {
|
15
|
+
t.current && r.current && (t.current.style.overflow = r.current.overflow, n && (t.current.style.paddingRight = r.current.paddingRight)), c(!1);
|
16
|
+
};
|
17
|
+
return w(() => {
|
18
|
+
if (!R)
|
19
|
+
return e && (t.current = typeof e == "string" ? document.querySelector(e) : e), t.current || (t.current = document.body), o && u(), () => {
|
20
|
+
i();
|
21
|
+
};
|
22
|
+
}, [o, e, n]), { isLocked: l, lock: u, unlock: i };
|
23
|
+
}
|
24
|
+
export {
|
25
|
+
S as useScrollLock
|
26
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useSessionStorage/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
declare global {
|
3
|
+
interface WindowEventMap {
|
4
|
+
'session-storage': CustomEvent;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* Represents the options for customizing the behavior of serialization and deserialization.
|
9
|
+
* @template T - The type of the state to be stored in session storage.
|
10
|
+
*/
|
11
|
+
type UseSessionStorageOptions<T> = {
|
12
|
+
/** A function to serialize the value before storing it. */
|
13
|
+
serializer?: (value: T) => string;
|
14
|
+
/** A function to deserialize the stored value. */
|
15
|
+
deserializer?: (value: string) => T;
|
16
|
+
/**
|
17
|
+
* If `true` (default), the hook will initialize reading the session storage. In SSR, you should set it to `false`, returning the initial value initially.
|
18
|
+
* @default true
|
19
|
+
*/
|
20
|
+
initializeWithValue?: boolean;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* Custom hook that uses the [`sessionStorage API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage) to persist state across page reloads.
|
24
|
+
* @template T - The type of the state to be stored in session storage.
|
25
|
+
* @param {string} key - The key under which the value will be stored in session storage.
|
26
|
+
* @param {T | (() => T)} initialValue - The initial value of the state or a function that returns the initial value.
|
27
|
+
* @param {?UseSessionStorageOptions<T>} [options] - Options for customizing the behavior of serialization and deserialization (optional).
|
28
|
+
* @returns {[T, Dispatch<SetStateAction<T>>, () => void]} A tuple containing the stored value, a function to set the value and a function to remove the key from storage.
|
29
|
+
* @public
|
30
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-session-storage)
|
31
|
+
* @example
|
32
|
+
* ```tsx
|
33
|
+
* const [count, setCount, removeCount] = useSessionStorage('count', 0);
|
34
|
+
* // Access the `count` value, the `setCount` function to update it and `removeCount` function to remove the key from storage.
|
35
|
+
* ```
|
36
|
+
*/
|
37
|
+
export declare function useSessionStorage<T>(key: string, initialValue: T | (() => T), options?: UseSessionStorageOptions<T>): [T, Dispatch<SetStateAction<T>>, () => void];
|
38
|
+
export {};
|
39
|
+
//# sourceMappingURL=useSessionStorage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useSessionStorage.d.ts","sourceRoot":"","sources":["../../src/useSessionStorage/useSessionStorage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAKrD,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,cAAc;QACtB,iBAAiB,EAAE,WAAW,CAAA;KAC/B;CACF;AAED;;;GAGG;AACH,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,kDAAkD;IAClD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,CAAA;IACnC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC3B,OAAO,GAAE,wBAAwB,CAAC,CAAC,CAAM,GACxC,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CA2I9C"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { useCallback as i, useState as F, useEffect as p } from "react";
|
2
|
+
import { useEventCallback as u } from "../useEventCallback/useEventCallback.js";
|
3
|
+
import { useEventListener as w } from "../useEventListener/useEventListener.js";
|
4
|
+
const a = typeof window > "u";
|
5
|
+
function J(n, r, o = {}) {
|
6
|
+
const { initializeWithValue: S = !0 } = o, m = i(
|
7
|
+
(e) => o.serializer ? o.serializer(e) : JSON.stringify(e),
|
8
|
+
[o]
|
9
|
+
), d = i(
|
10
|
+
(e) => {
|
11
|
+
if (o.deserializer)
|
12
|
+
return o.deserializer(e);
|
13
|
+
if (e === "undefined")
|
14
|
+
return;
|
15
|
+
const t = r instanceof Function ? r() : r;
|
16
|
+
let g;
|
17
|
+
try {
|
18
|
+
g = JSON.parse(e);
|
19
|
+
} catch (z) {
|
20
|
+
return console.error("Error parsing JSON:", z), t;
|
21
|
+
}
|
22
|
+
return g;
|
23
|
+
},
|
24
|
+
[o, r]
|
25
|
+
), s = i(() => {
|
26
|
+
const e = r instanceof Function ? r() : r;
|
27
|
+
if (a)
|
28
|
+
return e;
|
29
|
+
try {
|
30
|
+
const t = window.sessionStorage.getItem(n);
|
31
|
+
return t ? d(t) : e;
|
32
|
+
} catch (t) {
|
33
|
+
return console.warn(`Error reading sessionStorage key “${n}”:`, t), e;
|
34
|
+
}
|
35
|
+
}, [r, n, d]), [h, c] = F(() => S ? s() : r instanceof Function ? r() : r), E = u((e) => {
|
36
|
+
a && console.warn(
|
37
|
+
`Tried setting sessionStorage key “${n}” even though environment is not a client`
|
38
|
+
);
|
39
|
+
try {
|
40
|
+
const t = e instanceof Function ? e(s()) : e;
|
41
|
+
window.sessionStorage.setItem(n, m(t)), c(t), window.dispatchEvent(new StorageEvent("session-storage", { key: n }));
|
42
|
+
} catch (t) {
|
43
|
+
console.warn(`Error setting sessionStorage key “${n}”:`, t);
|
44
|
+
}
|
45
|
+
}), v = u(() => {
|
46
|
+
a && console.warn(
|
47
|
+
`Tried removing sessionStorage key “${n}” even though environment is not a client`
|
48
|
+
);
|
49
|
+
const e = r instanceof Function ? r() : r;
|
50
|
+
window.sessionStorage.removeItem(n), c(e), window.dispatchEvent(new StorageEvent("session-storage", { key: n }));
|
51
|
+
});
|
52
|
+
p(() => {
|
53
|
+
c(s());
|
54
|
+
}, [n]);
|
55
|
+
const f = i(
|
56
|
+
(e) => {
|
57
|
+
e.key && e.key !== n || c(s());
|
58
|
+
},
|
59
|
+
[n, s]
|
60
|
+
);
|
61
|
+
return w("storage", f), w("session-storage", f), [h, E, v];
|
62
|
+
}
|
63
|
+
export {
|
64
|
+
J as useSessionStorage
|
65
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useStep/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
/** Represents the second element of the output of the `useStep` hook. */
|
3
|
+
type UseStepActions = {
|
4
|
+
/** Go to the next step in the process. */
|
5
|
+
goToNextStep: () => void;
|
6
|
+
/** Go to the previous step in the process. */
|
7
|
+
goToPrevStep: () => void;
|
8
|
+
/** Reset the step to the initial step. */
|
9
|
+
reset: () => void;
|
10
|
+
/** Check if the next step is available. */
|
11
|
+
canGoToNextStep: boolean;
|
12
|
+
/** Check if the previous step is available. */
|
13
|
+
canGoToPrevStep: boolean;
|
14
|
+
/** Set the current step to a specific value. */
|
15
|
+
setStep: Dispatch<SetStateAction<number>>;
|
16
|
+
};
|
17
|
+
/**
|
18
|
+
* Custom hook that manages and navigates between steps in a multi-step process.
|
19
|
+
* @param {number} maxStep - The maximum step in the process.
|
20
|
+
* @returns {[number, UseStepActions]} An tuple containing the current step and helper functions for navigating steps.
|
21
|
+
* @public
|
22
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-step)
|
23
|
+
* @example
|
24
|
+
* ```tsx
|
25
|
+
* const [currentStep, { goToNextStep, goToPrevStep, reset, canGoToNextStep, canGoToPrevStep, setStep }] = useStep(3);
|
26
|
+
* // Access and use the current step and provided helper functions.
|
27
|
+
* ```
|
28
|
+
*/
|
29
|
+
export declare function useStep(maxStep: number): [number, UseStepActions];
|
30
|
+
export {};
|
31
|
+
//# sourceMappingURL=useStep.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useStep.d.ts","sourceRoot":"","sources":["../../src/useStep/useStep.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,yEAAyE;AACzE,KAAK,cAAc,GAAG;IACpB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,8CAA8C;IAC9C,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,2CAA2C;IAC3C,eAAe,EAAE,OAAO,CAAA;IACxB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAA;IACxB,gDAAgD;IAChD,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;CAC1C,CAAA;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAgDjE"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { useState as a, useCallback as n } from "react";
|
2
|
+
function l(r) {
|
3
|
+
const [e, o] = a(1), c = e + 1 <= r, s = e - 1 > 0, S = n(
|
4
|
+
(t) => {
|
5
|
+
const u = t instanceof Function ? t(e) : t;
|
6
|
+
if (u >= 1 && u <= r) {
|
7
|
+
o(u);
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
throw new Error("Step not valid");
|
11
|
+
},
|
12
|
+
[r, e]
|
13
|
+
), i = n(() => {
|
14
|
+
c && o((t) => t + 1);
|
15
|
+
}, [c]), p = n(() => {
|
16
|
+
s && o((t) => t - 1);
|
17
|
+
}, [s]), f = n(() => {
|
18
|
+
o(1);
|
19
|
+
}, []);
|
20
|
+
return [
|
21
|
+
e,
|
22
|
+
{
|
23
|
+
goToNextStep: i,
|
24
|
+
goToPrevStep: p,
|
25
|
+
canGoToNextStep: c,
|
26
|
+
canGoToPrevStep: s,
|
27
|
+
setStep: S,
|
28
|
+
reset: f
|
29
|
+
}
|
30
|
+
];
|
31
|
+
}
|
32
|
+
export {
|
33
|
+
l as useStep
|
34
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useTernaryDarkMode/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
/** Ternary dark mode options. */
|
3
|
+
export type TernaryDarkMode = 'system' | 'dark' | 'light';
|
4
|
+
/** Options for the `useTernaryDarkMode` hook. */
|
5
|
+
export type TernaryDarkModeOptions = {
|
6
|
+
/**
|
7
|
+
* The default value for the dark mode.
|
8
|
+
* @default 'system'
|
9
|
+
*/
|
10
|
+
defaultValue?: TernaryDarkMode;
|
11
|
+
/**
|
12
|
+
* The key for storing dark mode preference in local storage.
|
13
|
+
* @default 'usehooks-ts-ternary-dark-mode'
|
14
|
+
*/
|
15
|
+
localStorageKey?: string;
|
16
|
+
/**
|
17
|
+
* If `true` (default), the hook will initialize reading `localStorage`. In SSR, you should set it to `false`, returning default values initially.
|
18
|
+
* @default true
|
19
|
+
*/
|
20
|
+
initializeWithValue?: boolean;
|
21
|
+
};
|
22
|
+
/** Represents the return type of the `useTernaryDarkMode` hook. */
|
23
|
+
export type TernaryDarkModeReturn = {
|
24
|
+
/** The current state of the dark mode. */
|
25
|
+
isDarkMode: boolean;
|
26
|
+
/** The current state of the dark mode. */
|
27
|
+
ternaryDarkMode: TernaryDarkMode;
|
28
|
+
/** A function to set the dark mode state. */
|
29
|
+
setTernaryDarkMode: Dispatch<SetStateAction<TernaryDarkMode>>;
|
30
|
+
/** A function to toggle the dark mode state. */
|
31
|
+
toggleTernaryDarkMode: () => void;
|
32
|
+
};
|
33
|
+
/**
|
34
|
+
* Custom hook that manages ternary (system, dark, light) dark mode with local storage support.
|
35
|
+
* @param {?TernaryDarkModeOptions | string} [options] - Options or the local storage key for the hook.
|
36
|
+
* @returns {TernaryDarkModeReturn} An object containing the dark mode state and helper functions.
|
37
|
+
* @public
|
38
|
+
* @see [Documentation](https://usehooks-ts.com/react-hook/use-ternary-dark-mode)
|
39
|
+
* @example
|
40
|
+
* ```tsx
|
41
|
+
* const { isDarkMode, ternaryDarkMode, setTernaryDarkMode, toggleTernaryDarkMode } = useTernaryDarkMode({ defaultValue: 'dark' });
|
42
|
+
* // Access and use the dark mode state and provided helper functions.
|
43
|
+
* ```
|
44
|
+
*/
|
45
|
+
export declare function useTernaryDarkMode({ defaultValue, localStorageKey, initializeWithValue, }?: TernaryDarkModeOptions): TernaryDarkModeReturn;
|
46
|
+
//# sourceMappingURL=useTernaryDarkMode.d.ts.map
|
package/node_modules/@oneplatformdev/hooks/dist/useTernaryDarkMode/useTernaryDarkMode.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useTernaryDarkMode.d.ts","sourceRoot":"","sources":["../../src/useTernaryDarkMode/useTernaryDarkMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAQrD,iCAAiC;AACjC,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEzD,iDAAiD;AACjD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,qBAAqB,GAAG;IAClC,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAA;IACnB,0CAA0C;IAC1C,eAAe,EAAE,eAAe,CAAA;IAChC,6CAA6C;IAC7C,kBAAkB,EAAE,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAA;IAC7D,gDAAgD;IAChD,qBAAqB,EAAE,MAAM,IAAI,CAAA;CAClC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAAuB,EACvB,eAAmC,EACnC,mBAA0B,GAC3B,GAAE,sBAA2B,GAAG,qBAAqB,CAsBrD"}
|