@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,60 @@
|
|
1
|
+
/// <reference types='vitest' />
|
2
|
+
import { defineConfig } from 'vite';
|
3
|
+
import react from '@vitejs/plugin-react';
|
4
|
+
import dts from 'vite-plugin-dts';
|
5
|
+
import * as path from 'path';
|
6
|
+
import { globSync } from 'glob';
|
7
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
8
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
9
|
+
|
10
|
+
export default defineConfig(() => ({
|
11
|
+
root: __dirname,
|
12
|
+
cacheDir: '../../node_modules/.vite/packages/utils',
|
13
|
+
plugins: [
|
14
|
+
react(),
|
15
|
+
nxViteTsPaths(),
|
16
|
+
nxCopyAssetsPlugin([ '*.md', 'LICENSE', 'package.json' ]),
|
17
|
+
dts({
|
18
|
+
entryRoot: 'src',
|
19
|
+
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
|
20
|
+
})
|
21
|
+
],
|
22
|
+
build: {
|
23
|
+
outDir: './dist',
|
24
|
+
emptyOutDir: true,
|
25
|
+
reportCompressedSize: true,
|
26
|
+
commonjsOptions: {
|
27
|
+
transformMixedEsModules: true,
|
28
|
+
},
|
29
|
+
sourcemap: false,
|
30
|
+
target: 'es2022',
|
31
|
+
lib: {
|
32
|
+
name: '@oneplatformdev/utils',
|
33
|
+
formats: [ 'es' as const ],
|
34
|
+
entry: {
|
35
|
+
index: path.resolve(__dirname, 'src/index.ts'),
|
36
|
+
...Object.fromEntries(
|
37
|
+
globSync('src/**/*.{ts,tsx}').map((filename) => {
|
38
|
+
return [
|
39
|
+
path.relative(
|
40
|
+
'src',
|
41
|
+
filename.slice(0, filename.length - path.extname(filename).length)
|
42
|
+
),
|
43
|
+
path.resolve(__dirname, filename),
|
44
|
+
]
|
45
|
+
})
|
46
|
+
)
|
47
|
+
}
|
48
|
+
},
|
49
|
+
rollupOptions: {
|
50
|
+
external: [ 'react', 'react-dom', 'react/jsx-runtime', "clsx", "tailwind-merge", "class-variance-authority" ],
|
51
|
+
output: {
|
52
|
+
preserveModules: true,
|
53
|
+
preserveModulesRoot: 'src',
|
54
|
+
globals: {
|
55
|
+
clsx: 'clsx',
|
56
|
+
},
|
57
|
+
}
|
58
|
+
}
|
59
|
+
},
|
60
|
+
}));
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as React from 'react';
|
3
|
+
|
4
|
+
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}
|
7
|
+
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
8
|
+
declare const Slottable: ({ children }: {
|
9
|
+
children: React.ReactNode;
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
11
|
+
declare const Root: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
12
|
+
|
13
|
+
export { Root, Slot, type SlotProps, Slottable };
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as React from 'react';
|
3
|
+
|
4
|
+
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}
|
7
|
+
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
8
|
+
declare const Slottable: ({ children }: {
|
9
|
+
children: React.ReactNode;
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
11
|
+
declare const Root: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
12
|
+
|
13
|
+
export { Root, Slot, type SlotProps, Slottable };
|
@@ -0,0 +1,118 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
|
30
|
+
// packages/react/slot/src/index.ts
|
31
|
+
var src_exports = {};
|
32
|
+
__export(src_exports, {
|
33
|
+
Root: () => Root,
|
34
|
+
Slot: () => Slot,
|
35
|
+
Slottable: () => Slottable
|
36
|
+
});
|
37
|
+
module.exports = __toCommonJS(src_exports);
|
38
|
+
|
39
|
+
// packages/react/slot/src/Slot.tsx
|
40
|
+
var React = __toESM(require("react"));
|
41
|
+
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
43
|
+
var Slot = React.forwardRef((props, forwardedRef) => {
|
44
|
+
const { children, ...slotProps } = props;
|
45
|
+
const childrenArray = React.Children.toArray(children);
|
46
|
+
const slottable = childrenArray.find(isSlottable);
|
47
|
+
if (slottable) {
|
48
|
+
const newElement = slottable.props.children;
|
49
|
+
const newChildren = childrenArray.map((child) => {
|
50
|
+
if (child === slottable) {
|
51
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
52
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
53
|
+
} else {
|
54
|
+
return child;
|
55
|
+
}
|
56
|
+
});
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
58
|
+
}
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
60
|
+
});
|
61
|
+
Slot.displayName = "Slot";
|
62
|
+
var SlotClone = React.forwardRef((props, forwardedRef) => {
|
63
|
+
const { children, ...slotProps } = props;
|
64
|
+
if (React.isValidElement(children)) {
|
65
|
+
const childrenRef = getElementRef(children);
|
66
|
+
return React.cloneElement(children, {
|
67
|
+
...mergeProps(slotProps, children.props),
|
68
|
+
// @ts-ignore
|
69
|
+
ref: forwardedRef ? (0, import_react_compose_refs.composeRefs)(forwardedRef, childrenRef) : childrenRef
|
70
|
+
});
|
71
|
+
}
|
72
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
73
|
+
});
|
74
|
+
SlotClone.displayName = "SlotClone";
|
75
|
+
var Slottable = ({ children }) => {
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
77
|
+
};
|
78
|
+
function isSlottable(child) {
|
79
|
+
return React.isValidElement(child) && child.type === Slottable;
|
80
|
+
}
|
81
|
+
function mergeProps(slotProps, childProps) {
|
82
|
+
const overrideProps = { ...childProps };
|
83
|
+
for (const propName in childProps) {
|
84
|
+
const slotPropValue = slotProps[propName];
|
85
|
+
const childPropValue = childProps[propName];
|
86
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
87
|
+
if (isHandler) {
|
88
|
+
if (slotPropValue && childPropValue) {
|
89
|
+
overrideProps[propName] = (...args) => {
|
90
|
+
childPropValue(...args);
|
91
|
+
slotPropValue(...args);
|
92
|
+
};
|
93
|
+
} else if (slotPropValue) {
|
94
|
+
overrideProps[propName] = slotPropValue;
|
95
|
+
}
|
96
|
+
} else if (propName === "style") {
|
97
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
98
|
+
} else if (propName === "className") {
|
99
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
return { ...slotProps, ...overrideProps };
|
103
|
+
}
|
104
|
+
function getElementRef(element) {
|
105
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
106
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
107
|
+
if (mayWarn) {
|
108
|
+
return element.ref;
|
109
|
+
}
|
110
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
111
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
112
|
+
if (mayWarn) {
|
113
|
+
return element.props.ref;
|
114
|
+
}
|
115
|
+
return element.props.ref || element.ref;
|
116
|
+
}
|
117
|
+
var Root = Slot;
|
118
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts", "../src/Slot.tsx"],
|
4
|
+
"sourcesContent": ["export {\n Slot,\n Slottable,\n //\n Root,\n} from './Slot';\nexport type { SlotProps } from './Slot';\n", "import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n});\n\nSlot.displayName = 'Slot';\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return React.cloneElement(children, {\n ...mergeProps(slotProps, children.props as AnyProps),\n // @ts-ignore\n ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef,\n });\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\n\nSlotClone.displayName = 'SlotClone';\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>;\n};\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<React.ComponentProps<typeof Slottable>, typeof Slottable> {\n return React.isValidElement(child) && child.type === Slottable;\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nconst Root = Slot;\n\nexport {\n Slot,\n Slottable,\n //\n Root,\n};\nexport type { SlotProps };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAA4B;AAiCtB;AAvBN,IAAM,OAAa,iBAAmC,CAAC,OAAO,iBAAiB;AAC7E,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,QAAM,gBAAsB,eAAS,QAAQ,QAAQ;AACrD,QAAM,YAAY,cAAc,KAAK,WAAW;AAEhD,MAAI,WAAW;AAEb,UAAM,aAAa,UAAU,MAAM;AAEnC,UAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,UAAI,UAAU,WAAW;AAGvB,YAAU,eAAS,MAAM,UAAU,IAAI,EAAG,QAAa,eAAS,KAAK,IAAI;AACzE,eAAa,qBAAe,UAAU,IACjC,WAAW,MAAwC,WACpD;AAAA,MACN,OAAO;AACL,eAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,WACE,4CAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UAAM,qBAAe,UAAU,IACtB,mBAAa,YAAY,QAAW,WAAW,IACrD,MACN;AAAA,EAEJ;AAEA,SACE,4CAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,IAAM,YAAkB,iBAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AAEnC,MAAU,qBAAe,QAAQ,GAAG;AAClC,UAAM,cAAc,cAAc,QAAQ;AAC1C,WAAa,mBAAa,UAAU;AAAA,MAClC,GAAG,WAAW,WAAW,SAAS,KAAiB;AAAA;AAAA,MAEnD,KAAK,mBAAe,uCAAY,cAAc,WAAW,IAAI;AAAA,IAC/D,CAAC;AAAA,EACH;AAEA,SAAa,eAAS,MAAM,QAAQ,IAAI,IAAU,eAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMxB,IAAM,YAAY,CAAC,EAAE,SAAS,MAAqC;AACjE,SAAO,2EAAG,UAAS;AACrB;AAMA,SAAS,YACP,OACuF;AACvF,SAAa,qBAAe,KAAK,KAAK,MAAM,SAAS;AACvD;AAEA,SAAS,WAAW,WAAqB,YAAsB;AAE7D,QAAM,gBAAgB,EAAE,GAAG,WAAW;AAEtC,aAAW,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAE1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AAEb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAoB;AAChD,yBAAe,GAAG,IAAI;AACtB,wBAAc,GAAG,IAAI;AAAA,QACvB;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;AAEA,IAAM,OAAO;",
|
6
|
+
"names": []
|
7
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
// packages/react/slot/src/Slot.tsx
|
2
|
+
import * as React from "react";
|
3
|
+
import { composeRefs } from "@radix-ui/react-compose-refs";
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
5
|
+
var Slot = React.forwardRef((props, forwardedRef) => {
|
6
|
+
const { children, ...slotProps } = props;
|
7
|
+
const childrenArray = React.Children.toArray(children);
|
8
|
+
const slottable = childrenArray.find(isSlottable);
|
9
|
+
if (slottable) {
|
10
|
+
const newElement = slottable.props.children;
|
11
|
+
const newChildren = childrenArray.map((child) => {
|
12
|
+
if (child === slottable) {
|
13
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
14
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
15
|
+
} else {
|
16
|
+
return child;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
20
|
+
}
|
21
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
22
|
+
});
|
23
|
+
Slot.displayName = "Slot";
|
24
|
+
var SlotClone = React.forwardRef((props, forwardedRef) => {
|
25
|
+
const { children, ...slotProps } = props;
|
26
|
+
if (React.isValidElement(children)) {
|
27
|
+
const childrenRef = getElementRef(children);
|
28
|
+
return React.cloneElement(children, {
|
29
|
+
...mergeProps(slotProps, children.props),
|
30
|
+
// @ts-ignore
|
31
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
32
|
+
});
|
33
|
+
}
|
34
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
35
|
+
});
|
36
|
+
SlotClone.displayName = "SlotClone";
|
37
|
+
var Slottable = ({ children }) => {
|
38
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
39
|
+
};
|
40
|
+
function isSlottable(child) {
|
41
|
+
return React.isValidElement(child) && child.type === Slottable;
|
42
|
+
}
|
43
|
+
function mergeProps(slotProps, childProps) {
|
44
|
+
const overrideProps = { ...childProps };
|
45
|
+
for (const propName in childProps) {
|
46
|
+
const slotPropValue = slotProps[propName];
|
47
|
+
const childPropValue = childProps[propName];
|
48
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
49
|
+
if (isHandler) {
|
50
|
+
if (slotPropValue && childPropValue) {
|
51
|
+
overrideProps[propName] = (...args) => {
|
52
|
+
childPropValue(...args);
|
53
|
+
slotPropValue(...args);
|
54
|
+
};
|
55
|
+
} else if (slotPropValue) {
|
56
|
+
overrideProps[propName] = slotPropValue;
|
57
|
+
}
|
58
|
+
} else if (propName === "style") {
|
59
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
60
|
+
} else if (propName === "className") {
|
61
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
62
|
+
}
|
63
|
+
}
|
64
|
+
return { ...slotProps, ...overrideProps };
|
65
|
+
}
|
66
|
+
function getElementRef(element) {
|
67
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
68
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
69
|
+
if (mayWarn) {
|
70
|
+
return element.ref;
|
71
|
+
}
|
72
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
73
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
74
|
+
if (mayWarn) {
|
75
|
+
return element.props.ref;
|
76
|
+
}
|
77
|
+
return element.props.ref || element.ref;
|
78
|
+
}
|
79
|
+
var Root = Slot;
|
80
|
+
export {
|
81
|
+
Root,
|
82
|
+
Slot,
|
83
|
+
Slottable
|
84
|
+
};
|
85
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/Slot.tsx"],
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n});\n\nSlot.displayName = 'Slot';\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return React.cloneElement(children, {\n ...mergeProps(slotProps, children.props as AnyProps),\n // @ts-ignore\n ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef,\n });\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\n\nSlotClone.displayName = 'SlotClone';\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>;\n};\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<React.ComponentProps<typeof Slottable>, typeof Slottable> {\n return React.isValidElement(child) && child.type === Slottable;\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nconst Root = Slot;\n\nexport {\n Slot,\n Slottable,\n //\n Root,\n};\nexport type { SlotProps };\n"],
|
5
|
+
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,mBAAmB;AAiCtB,SA+CG,UA/CH;AAvBN,IAAM,OAAa,iBAAmC,CAAC,OAAO,iBAAiB;AAC7E,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,QAAM,gBAAsB,eAAS,QAAQ,QAAQ;AACrD,QAAM,YAAY,cAAc,KAAK,WAAW;AAEhD,MAAI,WAAW;AAEb,UAAM,aAAa,UAAU,MAAM;AAEnC,UAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,UAAI,UAAU,WAAW;AAGvB,YAAU,eAAS,MAAM,UAAU,IAAI,EAAG,QAAa,eAAS,KAAK,IAAI;AACzE,eAAa,qBAAe,UAAU,IACjC,WAAW,MAAwC,WACpD;AAAA,MACN,OAAO;AACL,eAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,WACE,oBAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UAAM,qBAAe,UAAU,IACtB,mBAAa,YAAY,QAAW,WAAW,IACrD,MACN;AAAA,EAEJ;AAEA,SACE,oBAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,IAAM,YAAkB,iBAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AAEnC,MAAU,qBAAe,QAAQ,GAAG;AAClC,UAAM,cAAc,cAAc,QAAQ;AAC1C,WAAa,mBAAa,UAAU;AAAA,MAClC,GAAG,WAAW,WAAW,SAAS,KAAiB;AAAA;AAAA,MAEnD,KAAK,eAAe,YAAY,cAAc,WAAW,IAAI;AAAA,IAC/D,CAAC;AAAA,EACH;AAEA,SAAa,eAAS,MAAM,QAAQ,IAAI,IAAU,eAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMxB,IAAM,YAAY,CAAC,EAAE,SAAS,MAAqC;AACjE,SAAO,gCAAG,UAAS;AACrB;AAMA,SAAS,YACP,OACuF;AACvF,SAAa,qBAAe,KAAK,KAAK,MAAM,SAAS;AACvD;AAEA,SAAS,WAAW,WAAqB,YAAsB;AAE7D,QAAM,gBAAgB,EAAE,GAAG,WAAW;AAEtC,aAAW,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAE1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AAEb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAoB;AAChD,yBAAe,GAAG,IAAI;AACtB,wBAAc,GAAG,IAAI;AAAA,QACvB;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;AAEA,IAAM,OAAO;",
|
6
|
+
"names": []
|
7
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "@radix-ui/react-slot",
|
3
|
+
"version": "1.1.1",
|
4
|
+
"license": "MIT",
|
5
|
+
"exports": {
|
6
|
+
".": {
|
7
|
+
"import": {
|
8
|
+
"types": "./dist/index.d.mts",
|
9
|
+
"default": "./dist/index.mjs"
|
10
|
+
},
|
11
|
+
"require": {
|
12
|
+
"types": "./dist/index.d.ts",
|
13
|
+
"default": "./dist/index.js"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"source": "./src/index.ts",
|
18
|
+
"main": "./dist/index.js",
|
19
|
+
"module": "./dist/index.mjs",
|
20
|
+
"types": "./dist/index.d.ts",
|
21
|
+
"files": [
|
22
|
+
"dist",
|
23
|
+
"README.md"
|
24
|
+
],
|
25
|
+
"sideEffects": false,
|
26
|
+
"scripts": {
|
27
|
+
"clean": "rm -rf dist",
|
28
|
+
"version": "yarn version"
|
29
|
+
},
|
30
|
+
"dependencies": {
|
31
|
+
"@radix-ui/react-compose-refs": "1.1.1"
|
32
|
+
},
|
33
|
+
"peerDependencies": {
|
34
|
+
"@types/react": "*",
|
35
|
+
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
36
|
+
},
|
37
|
+
"peerDependenciesMeta": {
|
38
|
+
"@types/react": {
|
39
|
+
"optional": true
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"homepage": "https://radix-ui.com/primitives",
|
43
|
+
"repository": {
|
44
|
+
"type": "git",
|
45
|
+
"url": "git+https://github.com/radix-ui/primitives.git"
|
46
|
+
},
|
47
|
+
"bugs": {
|
48
|
+
"url": "https://github.com/radix-ui/primitives/issues"
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 WorkOS
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
2
|
+
import * as React from 'react';
|
3
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
4
|
+
import * as PopperPrimitive from '@radix-ui/react-popper';
|
5
|
+
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
6
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
7
|
+
|
8
|
+
declare const createTooltipScope: _radix_ui_react_context.CreateScope;
|
9
|
+
interface TooltipProviderProps {
|
10
|
+
children: React.ReactNode;
|
11
|
+
/**
|
12
|
+
* The duration from when the pointer enters the trigger until the tooltip gets opened.
|
13
|
+
* @defaultValue 700
|
14
|
+
*/
|
15
|
+
delayDuration?: number;
|
16
|
+
/**
|
17
|
+
* How much time a user has to enter another trigger without incurring a delay again.
|
18
|
+
* @defaultValue 300
|
19
|
+
*/
|
20
|
+
skipDelayDuration?: number;
|
21
|
+
/**
|
22
|
+
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
|
23
|
+
* @defaultValue false
|
24
|
+
*/
|
25
|
+
disableHoverableContent?: boolean;
|
26
|
+
}
|
27
|
+
declare const TooltipProvider: React.FC<TooltipProviderProps>;
|
28
|
+
interface TooltipProps {
|
29
|
+
children?: React.ReactNode;
|
30
|
+
open?: boolean;
|
31
|
+
defaultOpen?: boolean;
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
33
|
+
/**
|
34
|
+
* The duration from when the pointer enters the trigger until the tooltip gets opened. This will
|
35
|
+
* override the prop with the same name passed to Provider.
|
36
|
+
* @defaultValue 700
|
37
|
+
*/
|
38
|
+
delayDuration?: number;
|
39
|
+
/**
|
40
|
+
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
|
41
|
+
* @defaultValue false
|
42
|
+
*/
|
43
|
+
disableHoverableContent?: boolean;
|
44
|
+
}
|
45
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
46
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
47
|
+
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
48
|
+
}
|
49
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
50
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
51
|
+
interface TooltipPortalProps {
|
52
|
+
children?: React.ReactNode;
|
53
|
+
/**
|
54
|
+
* Specify a container element to portal the content into.
|
55
|
+
*/
|
56
|
+
container?: PortalProps['container'];
|
57
|
+
/**
|
58
|
+
* Used to force mounting when more control is needed. Useful when
|
59
|
+
* controlling animation with React animation libraries.
|
60
|
+
*/
|
61
|
+
forceMount?: true;
|
62
|
+
}
|
63
|
+
declare const TooltipPortal: React.FC<TooltipPortalProps>;
|
64
|
+
interface TooltipContentProps extends TooltipContentImplProps {
|
65
|
+
/**
|
66
|
+
* Used to force mounting when more control is needed. Useful when
|
67
|
+
* controlling animation with React animation libraries.
|
68
|
+
*/
|
69
|
+
forceMount?: true;
|
70
|
+
}
|
71
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
72
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
73
|
+
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
74
|
+
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
75
|
+
/**
|
76
|
+
* A more descriptive label for accessibility purpose
|
77
|
+
*/
|
78
|
+
'aria-label'?: string;
|
79
|
+
/**
|
80
|
+
* Event handler called when the escape key is down.
|
81
|
+
* Can be prevented.
|
82
|
+
*/
|
83
|
+
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
84
|
+
/**
|
85
|
+
* Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.
|
86
|
+
* Can be prevented.
|
87
|
+
*/
|
88
|
+
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
89
|
+
}
|
90
|
+
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
91
|
+
interface TooltipArrowProps extends PopperArrowProps {
|
92
|
+
}
|
93
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
94
|
+
declare const Provider: React.FC<TooltipProviderProps>;
|
95
|
+
declare const Root: React.FC<TooltipProps>;
|
96
|
+
declare const Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
97
|
+
declare const Portal: React.FC<TooltipPortalProps>;
|
98
|
+
declare const Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
99
|
+
declare const Arrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
100
|
+
|
101
|
+
export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope };
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
2
|
+
import * as React from 'react';
|
3
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
4
|
+
import * as PopperPrimitive from '@radix-ui/react-popper';
|
5
|
+
import { Portal as Portal$1 } from '@radix-ui/react-portal';
|
6
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
7
|
+
|
8
|
+
declare const createTooltipScope: _radix_ui_react_context.CreateScope;
|
9
|
+
interface TooltipProviderProps {
|
10
|
+
children: React.ReactNode;
|
11
|
+
/**
|
12
|
+
* The duration from when the pointer enters the trigger until the tooltip gets opened.
|
13
|
+
* @defaultValue 700
|
14
|
+
*/
|
15
|
+
delayDuration?: number;
|
16
|
+
/**
|
17
|
+
* How much time a user has to enter another trigger without incurring a delay again.
|
18
|
+
* @defaultValue 300
|
19
|
+
*/
|
20
|
+
skipDelayDuration?: number;
|
21
|
+
/**
|
22
|
+
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
|
23
|
+
* @defaultValue false
|
24
|
+
*/
|
25
|
+
disableHoverableContent?: boolean;
|
26
|
+
}
|
27
|
+
declare const TooltipProvider: React.FC<TooltipProviderProps>;
|
28
|
+
interface TooltipProps {
|
29
|
+
children?: React.ReactNode;
|
30
|
+
open?: boolean;
|
31
|
+
defaultOpen?: boolean;
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
33
|
+
/**
|
34
|
+
* The duration from when the pointer enters the trigger until the tooltip gets opened. This will
|
35
|
+
* override the prop with the same name passed to Provider.
|
36
|
+
* @defaultValue 700
|
37
|
+
*/
|
38
|
+
delayDuration?: number;
|
39
|
+
/**
|
40
|
+
* When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.
|
41
|
+
* @defaultValue false
|
42
|
+
*/
|
43
|
+
disableHoverableContent?: boolean;
|
44
|
+
}
|
45
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
46
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
47
|
+
interface TooltipTriggerProps extends PrimitiveButtonProps {
|
48
|
+
}
|
49
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
50
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
|
51
|
+
interface TooltipPortalProps {
|
52
|
+
children?: React.ReactNode;
|
53
|
+
/**
|
54
|
+
* Specify a container element to portal the content into.
|
55
|
+
*/
|
56
|
+
container?: PortalProps['container'];
|
57
|
+
/**
|
58
|
+
* Used to force mounting when more control is needed. Useful when
|
59
|
+
* controlling animation with React animation libraries.
|
60
|
+
*/
|
61
|
+
forceMount?: true;
|
62
|
+
}
|
63
|
+
declare const TooltipPortal: React.FC<TooltipPortalProps>;
|
64
|
+
interface TooltipContentProps extends TooltipContentImplProps {
|
65
|
+
/**
|
66
|
+
* Used to force mounting when more control is needed. Useful when
|
67
|
+
* controlling animation with React animation libraries.
|
68
|
+
*/
|
69
|
+
forceMount?: true;
|
70
|
+
}
|
71
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
72
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
73
|
+
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
74
|
+
interface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {
|
75
|
+
/**
|
76
|
+
* A more descriptive label for accessibility purpose
|
77
|
+
*/
|
78
|
+
'aria-label'?: string;
|
79
|
+
/**
|
80
|
+
* Event handler called when the escape key is down.
|
81
|
+
* Can be prevented.
|
82
|
+
*/
|
83
|
+
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
84
|
+
/**
|
85
|
+
* Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.
|
86
|
+
* Can be prevented.
|
87
|
+
*/
|
88
|
+
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
89
|
+
}
|
90
|
+
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
91
|
+
interface TooltipArrowProps extends PopperArrowProps {
|
92
|
+
}
|
93
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
94
|
+
declare const Provider: React.FC<TooltipProviderProps>;
|
95
|
+
declare const Root: React.FC<TooltipProps>;
|
96
|
+
declare const Trigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
97
|
+
declare const Portal: React.FC<TooltipPortalProps>;
|
98
|
+
declare const Content: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
99
|
+
declare const Arrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
100
|
+
|
101
|
+
export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope };
|