Socket
Socket
Sign inDemoInstall

@chakra-ui/popper

Package Overview
Dependencies
Maintainers
3
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/popper - npm Package Compare versions

Comparing version 0.0.0-dev-20221222051548 to 0.0.0-dev-20221223180742

dist/chunk-6DG2E3QO.mjs

131

dist/index.d.ts

@@ -1,128 +0,5 @@

import { Placement, Modifier, VirtualElement } from '@popperjs/core';
export { PlacementWithLogical } from './popper.placement.js';
export { UsePopperProps, UsePopperReturn, usePopper } from './use-popper.js';
export { cssVars as popperCSSVars } from './utils.js';
export { Placement } from '@popperjs/core';
import * as _chakra_ui_react_types from '@chakra-ui/react-types';
import { PropGetter } from '@chakra-ui/react-types';
declare type Logical = "start-start" | "start-end" | "end-start" | "end-end" | "start" | "end";
declare type PlacementWithLogical = Placement | Logical;
interface UsePopperProps {
/**
* Whether the popper.js should be enabled
*/
enabled?: boolean;
/**
* The main and cross-axis offset to displace popper element
* from its reference element.
*/
offset?: [number, number];
/**
* The distance or margin between the reference and popper.
* It is used internally to create an `offset` modifier.
*
* NB: If you define `offset` prop, it'll override the gutter.
* @default 8
*/
gutter?: number;
/**
* If `true`, will prevent the popper from being cut off and ensure
* it's visible within the boundary area.
* @default true
*/
preventOverflow?: boolean;
/**
* If `true`, the popper will change its placement and flip when it's
* about to overflow its boundary area.
* @default true
*/
flip?: boolean;
/**
* If `true`, the popper will match the width of the reference at all times.
* It's useful for `autocomplete`, `date-picker` and `select` patterns.
*/
matchWidth?: boolean;
/**
* The boundary area for the popper. Used within the `preventOverflow` modifier
* @default "clippingParents"
*/
boundary?: "clippingParents" | "scrollParent" | HTMLElement;
/**
* If provided, determines whether the popper will reposition itself on `scroll`
* and `resize` of the window.
* @default true
*/
eventListeners?: boolean | {
scroll?: boolean;
resize?: boolean;
};
/**
* The padding required to prevent the arrow from
* reaching the very edge of the popper.
* @default 8
*/
arrowPadding?: number;
/**
* The CSS positioning strategy to use.
* @default "absolute"
*/
strategy?: "absolute" | "fixed";
/**
* The placement of the popper relative to its reference.
* @default "bottom"
*/
placement?: PlacementWithLogical;
/**
* Array of popper.js modifiers. Check the docs to see
* the list of possible modifiers you can pass.
*
* @see Docs https://popper.js.org/docs/v2/modifiers/
*/
modifiers?: Array<Partial<Modifier<string, any>>>;
/**
* Theme direction `ltr` or `rtl`. Popper's placement will
* be set accordingly
* @default "ltr"
*/
direction?: "ltr" | "rtl";
}
declare function usePopper(props?: UsePopperProps): {
update(): void;
forceUpdate(): void;
transformOrigin: string;
referenceRef: <T extends Element | VirtualElement>(node: T | null) => void;
popperRef: <T_1 extends HTMLElement>(node: T_1 | null) => void;
getPopperProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>;
getArrowProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>;
getArrowInnerProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>;
getReferenceProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>;
};
declare type UsePopperReturn = ReturnType<typeof usePopper>;
declare const cssVars: {
readonly arrowShadowColor: {
var: string;
varRef: string;
};
readonly arrowSize: {
var: string;
varRef: string;
};
readonly arrowSizeHalf: {
var: string;
varRef: string;
};
readonly arrowBg: {
var: string;
varRef: string;
};
readonly transformOrigin: {
var: string;
varRef: string;
};
readonly arrowOffset: {
var: string;
varRef: string;
};
};
export { PlacementWithLogical, UsePopperProps, UsePopperReturn, cssVars as popperCSSVars, usePopper };
import '@chakra-ui/react-types';
{
"name": "@chakra-ui/popper",
"version": "0.0.0-dev-20221222051548",
"version": "0.0.0-dev-20221223180742",
"description": "A React component and hooks wrapper for popper.js",

@@ -21,3 +21,3 @@ "keywords": [

"license": "MIT",
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"files": [

@@ -39,4 +39,4 @@ "dist"

"@popperjs/core": "^2.9.3",
"@chakra-ui/react-use-merge-refs": "2.0.5",
"@chakra-ui/react-types": "2.0.5"
"@chakra-ui/react-use-merge-refs": "0.0.0-dev-20221223180742",
"@chakra-ui/react-types": "0.0.0-dev-20221223180742"
},

@@ -47,3 +47,3 @@ "devDependencies": {

"clean-package": "2.1.1",
"@chakra-ui/hooks": "0.0.0-dev-20221222051548"
"@chakra-ui/hooks": "0.0.0-dev-20221223180742"
},

@@ -53,9 +53,18 @@ "peerDependencies": {

},
"module": "dist/index.esm.js",
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},

@@ -65,8 +74,8 @@ "./package.json": "./package.json"

"scripts": {
"build": "tsup src/index.ts --dts",
"build": "tsup src --dts",
"dev": "pnpm build:fast -- --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src/index.ts"
"build:fast": "tsup src"
}
}
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