Socket
Socket
Sign inDemoInstall

@mantine/hooks

Package Overview
Dependencies
Maintainers
1
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/hooks - npm Package Compare versions

Comparing version 1.2.0-alpha.4 to 1.2.0-alpha.5

cjs/utils/random-id/random-id.js

4

cjs/index.js

@@ -5,2 +5,4 @@ 'use strict';

var randomId = require('./utils/random-id/random-id.js');
var upperFirst = require('./utils/upper-first/upper-first.js');
var useClickOutside = require('./use-click-outside/use-click-outside.js');

@@ -26,2 +28,4 @@ var useClipboard = require('./use-clipboard/use-clipboard.js');

exports.randomId = randomId.randomId;
exports.upperFirst = upperFirst.upperFirst;
exports.useClickOutside = useClickOutside.useClickOutside;

@@ -28,0 +32,0 @@ exports.useClipboard = useClipboard.useClipboard;

4

cjs/use-id/use-id.js

@@ -6,5 +6,5 @@ 'use strict';

var react = require('react');
var utils = require('@mantine/utils');
var randomId = require('../utils/random-id/random-id.js');
function useId(id, generateId = utils.randomId) {
function useId(id, generateId = randomId.randomId) {
const generatedId = react.useRef(generateId());

@@ -11,0 +11,0 @@ return id || generatedId.current;

@@ -0,1 +1,3 @@

export { randomId } from './utils/random-id/random-id.js';
export { upperFirst } from './utils/upper-first/upper-first.js';
export { useClickOutside } from './use-click-outside/use-click-outside.js';

@@ -2,0 +4,0 @@ export { useClipboard } from './use-clipboard/use-clipboard.js';

import { useRef } from 'react';
import { randomId } from '@mantine/utils';
import { randomId } from '../utils/random-id/random-id.js';

@@ -4,0 +4,0 @@ function useId(id, generateId = randomId) {

@@ -0,1 +1,2 @@

export * from './utils';
export { useClickOutside } from './use-click-outside/use-click-outside';

@@ -2,0 +3,0 @@ export { useClipboard } from './use-clipboard/use-clipboard';

@@ -7,2 +7,10 @@ (function (global, factory) {

function randomId() {
return `mantine-${Math.random().toString(36).substr(2, 9)}`;
}
function upperFirst(value) {
return typeof value !== "string" ? "" : value.charAt(0).toUpperCase() + value.slice(1);
}
function useClickOutside(handler, events = ["mousedown", "touchstart"]) {

@@ -383,6 +391,2 @@ const ref = react.useRef();

function randomId() {
return `mantine-${Math.random().toString(36).substr(2, 9)}`;
}
function useId(id, generateId = randomId) {

@@ -569,2 +573,4 @@ const generatedId = react.useRef(generateId());

exports.randomId = randomId;
exports.upperFirst = upperFirst;
exports.useClickOutside = useClickOutside;

@@ -571,0 +577,0 @@ exports.useClipboard = useClipboard;

{
"name": "@mantine/hooks",
"version": "1.2.0-alpha.4",
"version": "1.2.0-alpha.5",
"main": "cjs/index.js",

@@ -13,3 +13,4 @@ "module": "esm/index.js",

},
"dependencies": {},
"devDependencies": {}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc