@nextui-org/system
Advanced tools
Comparing version 0.0.0-canary-20240910124648 to 0.0.0-canary-20240910152643
@@ -6,4 +6,5 @@ export { As, CapitalizedDOMElements, DOMAttributes, DOMElement, DOMElements, ExtendVariantProps, ExtendVariantWithSlotsProps, ExtendVariants, HTMLNextUIProps, InternalForwardRefRenderFunction, Merge, MergeWithAs, OmitCommonProps, PropGetter, PropsOf, RightJoinProps, SharedSelection, extendVariants, forwardRef, isNextUIEl, mapPropsVariants, mapPropsVariantsWithCommon, toIterator } from '@nextui-org/system-rsc'; | ||
import '@react-aria/overlays'; | ||
import '@react-types/shared'; | ||
import '@react-aria/i18n'; | ||
import 'react'; | ||
import '@internationalized/date'; |
@@ -56,2 +56,3 @@ "use client"; | ||
navigate, | ||
useHref, | ||
disableAnimation = false, | ||
@@ -68,3 +69,3 @@ disableRipple = false, | ||
if (navigate) { | ||
contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.RouterProvider, { navigate, children: contents }); | ||
contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.RouterProvider, { navigate, useHref, children: contents }); | ||
} | ||
@@ -71,0 +72,0 @@ const context = (0, import_react.useMemo)(() => { |
@@ -5,2 +5,3 @@ import '@nextui-org/system-rsc'; | ||
import { ProviderContextProps } from './provider-context.js'; | ||
import { Href } from '@react-types/shared'; | ||
import { I18nProviderProps } from '@react-aria/i18n'; | ||
@@ -30,2 +31,10 @@ import 'react'; | ||
navigate?: (path: string) => void; | ||
/** | ||
* Convert an `href` provided to a link component to a native `href` | ||
* For example, a router might accept hrefs relative to a base path, | ||
* or offer additional custom ways of specifying link destinations. | ||
* The original href specified on the link is passed to the navigate function of the RouterProvider, | ||
* and useHref is used to generate the full native href to put on the actual DOM element. | ||
*/ | ||
useHref?: (href: Href) => string; | ||
} | ||
@@ -32,0 +41,0 @@ declare const NextUIProvider: React.FC<NextUIProviderProps>; |
@@ -45,2 +45,3 @@ "use client"; | ||
navigate, | ||
useHref, | ||
disableAnimation = false, | ||
@@ -57,3 +58,3 @@ disableRipple = false, | ||
if (navigate) { | ||
contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.RouterProvider, { navigate, children: contents }); | ||
contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.RouterProvider, { navigate, useHref, children: contents }); | ||
} | ||
@@ -60,0 +61,0 @@ const context = (0, import_react.useMemo)(() => { |
{ | ||
"name": "@nextui-org/system", | ||
"version": "0.0.0-canary-20240910124648", | ||
"version": "0.0.0-canary-20240910152643", | ||
"description": "NextUI system primitives", | ||
@@ -47,4 +47,4 @@ "keywords": [ | ||
"@react-stately/utils": "3.10.1", | ||
"@nextui-org/system-rsc": "0.0.0-canary-20240910124648", | ||
"@nextui-org/react-utils": "0.0.0-canary-20240910124648" | ||
"@nextui-org/system-rsc": "0.0.0-canary-20240910152643", | ||
"@nextui-org/react-utils": "0.0.0-canary-20240910152643" | ||
}, | ||
@@ -51,0 +51,0 @@ "module": "dist/index.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20790
480
+ Added@nextui-org/react-utils@0.0.0-canary-20240910152643(transitive)
+ Added@nextui-org/shared-utils@0.0.0-canary-20240910152643(transitive)
+ Added@nextui-org/system-rsc@0.0.0-canary-20240910152643(transitive)
+ Added@nextui-org/theme@0.0.0-canary-20240910152643(transitive)
- Removed@nextui-org/react-utils@0.0.0-canary-20240910124648(transitive)
- Removed@nextui-org/shared-utils@0.0.0-canary-20240910124648(transitive)
- Removed@nextui-org/system-rsc@0.0.0-canary-20240910124648(transitive)
- Removed@nextui-org/theme@0.0.0-canary-20240910124648(transitive)