@uxf/core-react
Advanced tools
Comparing version 11.31.0 to 11.32.0
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Hide = void 0; | ||
exports.Hide = Hide; | ||
const react_1 = __importDefault(require("react")); | ||
@@ -15,2 +15,1 @@ function Hide(props) { | ||
} | ||
exports.Hide = Hide; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Show = void 0; | ||
exports.Show = Show; | ||
const react_1 = __importDefault(require("react")); | ||
@@ -15,2 +15,1 @@ function Show(props) { | ||
} | ||
exports.Show = Show; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._useSimulatedButton = void 0; | ||
exports._useSimulatedButton = _useSimulatedButton; | ||
const react_1 = require("react"); | ||
@@ -49,2 +49,1 @@ function _useSimulatedButton({ analyticsCallback, isClickable, isHyperlink, onClick, onKeyDown, onKeyUp, submit, }) { | ||
} | ||
exports._useSimulatedButton = _useSimulatedButton; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useAnchorProps = void 0; | ||
exports.useAnchorProps = useAnchorProps; | ||
const classes_1 = require("@uxf/core/constants/classes"); | ||
const cx_1 = require("@uxf/core/utils/cx"); | ||
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil"); | ||
const _use_simulated_button_1 = require("./_use-simulated-button"); | ||
@@ -12,3 +13,3 @@ function useAnchorProps({ ["aria-busy"]: ariaBusy, ["aria-disabled"]: ariaDisabled, analyticsCallback, className, disabled, download, href, hrefLang, loading, media, onClick, onKeyDown, onKeyUp, ping, referrerPolicy, rel, role, tabIndex, target, type, ...restProps }) { | ||
const submit = type === "submit"; | ||
const isButton = submit || !!onClick; | ||
const isButton = submit || (0, is_not_nil_1.isNotNil)(onClick); | ||
const tabIndexInteractive = isBusyOrDisabled ? -1 : tabIndex; | ||
@@ -19,3 +20,3 @@ const _className = [isBusy && classes_1.CLASSES.IS_LOADING, disabled && classes_1.CLASSES.IS_DISABLED, className]; | ||
isClickable: !isBusyOrDisabled || isButton, | ||
isHyperlink: !isBusyOrDisabled || !!href, | ||
isHyperlink: !isBusyOrDisabled || Boolean(href), | ||
onClick, | ||
@@ -67,2 +68,1 @@ onKeyDown, | ||
} | ||
exports.useAnchorProps = useAnchorProps; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useBodyScrollLock = void 0; | ||
exports.useBodyScrollLock = useBodyScrollLock; | ||
const bodyScrollLock_1 = require("@uxf/core/utils/bodyScrollLock"); | ||
@@ -35,2 +35,1 @@ const react_1 = require("react"); | ||
} | ||
exports.useBodyScrollLock = useBodyScrollLock; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useButtonProps = void 0; | ||
exports.useButtonProps = useButtonProps; | ||
const classes_1 = require("@uxf/core/constants/classes"); | ||
@@ -59,2 +59,1 @@ const cx_1 = require("@uxf/core/utils/cx"); | ||
} | ||
exports.useButtonProps = useButtonProps; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useClickableProps = void 0; | ||
exports.useClickableProps = useClickableProps; | ||
const classes_1 = require("@uxf/core/constants/classes"); | ||
const cx_1 = require("@uxf/core/utils/cx"); | ||
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil"); | ||
const _use_simulated_button_1 = require("./_use-simulated-button"); | ||
@@ -12,3 +13,3 @@ function useClickableProps({ ["aria-busy"]: ariaBusy, ["aria-disabled"]: ariaDisabled, analyticsCallback, className, disabled, loading, onClick, onKeyDown, onKeyUp, role, tabIndex, type, ...restProps }) { | ||
const submit = type === "submit"; | ||
const isButton = submit || !!onClick; | ||
const isButton = submit || (0, is_not_nil_1.isNotNil)(onClick); | ||
const _className = [isBusy && classes_1.CLASSES.IS_LOADING, isDisabled && classes_1.CLASSES.IS_DISABLED, className]; | ||
@@ -33,3 +34,3 @@ const simulatedButton = (0, _use_simulated_button_1._useSimulatedButton)({ | ||
role: role || "button", | ||
tabIndex: isBusyOrDisabled ? -1 : tabIndex !== null && tabIndex !== void 0 ? tabIndex : 0, | ||
tabIndex: isBusyOrDisabled ? -1 : (tabIndex !== null && tabIndex !== void 0 ? tabIndex : 0), | ||
...restProps, | ||
@@ -45,2 +46,1 @@ }; | ||
} | ||
exports.useClickableProps = useClickableProps; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useFocusReturn = void 0; | ||
exports.useFocusReturn = useFocusReturn; | ||
const react_1 = require("react"); | ||
@@ -32,5 +32,4 @@ const use_on_update_1 = require("./use-on-update"); | ||
}; | ||
}, [opened]); | ||
}, [opened, shouldReturnFocus, transitionDuration]); | ||
return returnFocus; | ||
} | ||
exports.useFocusReturn = useFocusReturn; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useFocusTrap = void 0; | ||
exports.useFocusTrap = useFocusTrap; | ||
const react_1 = require("react"); | ||
@@ -146,2 +146,1 @@ const use_on_unmount_1 = require("./use-on-unmount"); | ||
} | ||
exports.useFocusTrap = useFocusTrap; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useInputFocus = void 0; | ||
exports.useInputFocus = useInputFocus; | ||
const react_1 = require("react"); | ||
@@ -27,2 +27,1 @@ function useInputFocus(focusRef, onBlur, onFocus) { | ||
} | ||
exports.useInputFocus = useInputFocus; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useIsMounted = void 0; | ||
exports.useIsMounted = useIsMounted; | ||
const react_1 = require("react"); | ||
@@ -10,2 +10,1 @@ function useIsMounted() { | ||
} | ||
exports.useIsMounted = useIsMounted; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useKey = void 0; | ||
exports.useKey = useKey; | ||
const react_1 = require("react"); | ||
@@ -28,2 +28,1 @@ const createKeyPredicate = (keyFilter) => typeof keyFilter === "function" | ||
} | ||
exports.useKey = useKey; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare function useLatest<T>(current: T): import("react").MutableRefObject<T>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useLatest = void 0; | ||
exports.useLatest = useLatest; | ||
const react_1 = require("react"); | ||
@@ -10,2 +10,1 @@ function useLatest(current) { | ||
} | ||
exports.useLatest = useLatest; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useMinWindowWidth = void 0; | ||
exports.useMinWindowWidth = useMinWindowWidth; | ||
const react_1 = require("react"); | ||
@@ -29,2 +29,1 @@ const use_raf_state_1 = require("./use-raf-state"); | ||
} | ||
exports.useMinWindowWidth = useMinWindowWidth; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useMouseDragToScroll = void 0; | ||
exports.useMouseDragToScroll = useMouseDragToScroll; | ||
const react_1 = require("react"); | ||
@@ -39,2 +39,1 @@ function useMouseDragToScroll(containerRef) { | ||
} | ||
exports.useMouseDragToScroll = useMouseDragToScroll; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useOnMount = void 0; | ||
exports.useOnMount = useOnMount; | ||
const react_1 = require("react"); | ||
@@ -10,2 +10,1 @@ function useOnMount(effect) { | ||
} | ||
exports.useOnMount = useOnMount; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useOnUnmount = void 0; | ||
exports.useOnUnmount = useOnUnmount; | ||
const react_1 = require("react"); | ||
@@ -15,2 +15,1 @@ function useOnUnmount(effect) { | ||
} | ||
exports.useOnUnmount = useOnUnmount; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useOnUpdate = void 0; | ||
exports.useOnUpdate = useOnUpdate; | ||
const react_1 = require("react"); | ||
@@ -15,2 +15,1 @@ function useOnUpdate(effect, deps) { | ||
} | ||
exports.useOnUpdate = useOnUpdate; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
export declare function usePrevious<T>(current: T): import("react").MutableRefObject<T>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.usePrevious = void 0; | ||
exports.usePrevious = usePrevious; | ||
const react_1 = require("react"); | ||
@@ -12,2 +12,1 @@ function usePrevious(current) { | ||
} | ||
exports.usePrevious = usePrevious; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useRafState = void 0; | ||
exports.useRafState = useRafState; | ||
const react_1 = require("react"); | ||
@@ -18,2 +18,1 @@ const use_on_unmount_1 = require("./use-on-unmount"); | ||
} | ||
exports.useRafState = useRafState; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useWindowScroll = void 0; | ||
exports.useWindowScroll = useWindowScroll; | ||
const react_1 = require("react"); | ||
@@ -22,2 +22,1 @@ const use_raf_state_1 = require("./use-raf-state"); | ||
} | ||
exports.useWindowScroll = useWindowScroll; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useWindowSize = void 0; | ||
exports.useWindowSize = useWindowSize; | ||
const react_1 = require("react"); | ||
@@ -19,2 +19,1 @@ const use_raf_state_1 = require("./use-raf-state"); | ||
} | ||
exports.useWindowSize = useWindowSize; |
{ | ||
"name": "@uxf/core-react", | ||
"version": "11.31.0", | ||
"version": "11.32.0", | ||
"description": "UXF Core", | ||
@@ -15,3 +15,3 @@ "author": "UX Fans s.r.o", | ||
"dependencies": { | ||
"@uxf/core": "11.31.0" | ||
"@uxf/core": "11.32.0" | ||
}, | ||
@@ -22,5 +22,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@types/react": "18.2.63", | ||
"react": "18.2.0" | ||
"@types/react": "18.3.5", | ||
"react": "18.3.1" | ||
} | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.composeRefs = void 0; | ||
exports.composeRefs = composeRefs; | ||
function composeRefs(...refs) { | ||
@@ -16,2 +16,1 @@ return (value) => refs.forEach((ref) => { | ||
} | ||
exports.composeRefs = composeRefs; |
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
41032
844
+ Added@uxf/core@11.32.0(transitive)
- Removed@uxf/core@11.31.0(transitive)
Updated@uxf/core@11.32.0