Socket
Socket
Sign inDemoInstall

tippy.js

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tippy.js - npm Package Compare versions

Comparing version 4.3.1 to 5.0.0-alpha.0

addons/cjs/tippy-addons.js

149

index.d.ts

@@ -9,3 +9,3 @@ import Popper from 'popper.js'

export type Targets = string | Element | Element[] | NodeList | VirtualReference
export type Targets = string | Element | Element[] | NodeList

@@ -20,88 +20,63 @@ export interface ReferenceElement extends Element {

export interface VirtualReference extends Popper.ReferenceObject {
_tippy?: Instance
parentNode?: Element
contains(): void
setAttribute(key: string, value: any): void
getAttribute(key: string): string
removeAttribute(key: string): void
hasAttribute(key: string): boolean
addEventListener(): void
removeEventListener(): void
attributes: {
[key: string]: any
}
classList: {
add(key: string): void
remove(key: string): void
contains(key: string): boolean
classNames: {
[key: string]: boolean
}
[key: string]: any
}
}
export interface PopperInstance extends Popper {
reference: ReferenceElement
popper: PopperElement
data: {
placement: Placement
}
modifiers: { name: string; padding: object | number }[]
}
export interface Options {
a11y?: boolean
allowHTML?: boolean
animateFill?: boolean
animation?: 'fade' | 'scale' | 'shift-toward' | 'perspective' | 'shift-away'
appendTo?: 'parent' | Element | ((ref: Element) => Element)
aria?: 'describedby' | 'labelledby' | null
arrow?: boolean
arrowType?: 'sharp' | 'round'
boundary?: 'scrollParent' | 'window' | 'viewport' | HTMLElement
content?: Content
delay?: number | [number, number]
distance?: number
duration?: number | [number, number]
flip?: boolean
flipBehavior?: 'flip' | Placement[]
flipOnUpdate?: boolean
followCursor?: boolean | 'vertical' | 'horizontal' | 'initial'
hideOnClick?: boolean | 'toggle'
ignoreAttributes?: boolean
inertia?: boolean
interactive?: boolean
interactiveBorder?: number
interactiveDebounce?: number
lazy?: boolean
maxWidth?: number | string
multiple?: boolean
offset?: number | string
onHidden?(instance: Instance): void
onHide?(instance: Instance): void | false
onMount?(instance: Instance): void
onShow?(instance: Instance): void | false
onShown?(instance: Instance): void
onTrigger?(instance: Instance, event: Event): void
placement?: Placement
popperOptions?: Popper.PopperOptions
role?: string
showOnInit?: boolean
size?: 'small' | 'regular' | 'large'
sticky?: boolean
target?: string
theme?: 'dark' | 'light' | 'light-border' | 'google' | string
touch?: boolean
touchHold?: boolean
trigger?: string
triggerTarget?: Element | null
updateDuration?: number
wait?: ((instance: Instance, event?: Event) => void) | null
zIndex?: number
export interface Props {
allowHTML: boolean
animateFill: boolean
animation: 'fade' | 'shift-away' | string
appendTo: 'parent' | Element | ((ref: Element) => Element)
aria: 'describedby' | 'labelledby' | null
arrow: boolean
arrowType: 'sharp' | 'round' | string
boundary: 'scrollParent' | 'window' | 'viewport' | HTMLElement
content: Content
delay: number | [number, number]
distance: number
duration: number | [number, number]
flip: boolean
flipBehavior: 'flip' | Placement[]
flipOnUpdate: boolean
followCursor: boolean | 'vertical' | 'horizontal' | 'initial'
hideOnClick: boolean | 'toggle'
ignoreAttributes: boolean
inertia: boolean
interactive: boolean
interactiveBorder: number
interactiveDebounce: number
lazy: boolean
maxWidth: number | string
multiple: boolean
offset: number | string
onCreate(instance: Instance): void
onHidden(instance: Instance): void
onHide(instance: Instance): void | false
onMount(instance: Instance): void
onShow(instance: Instance): void | false
onShown(instance: Instance): void
onTrigger(instance: Instance, event: Event): void
onUntrigger(instance: Instance, event: Event): void
placement: Placement
popperOptions: Popper.PopperOptions
role: string
showOnInit: boolean
size: 'small' | 'regular' | 'large'
sticky: boolean
theme: string
touch: boolean
touchHold: boolean
trigger: string
triggerTarget: Element | null
updateDuration: number
wait: ((instance: Instance, event?: Event) => void) | null
zIndex: number
}
/**
* @deprecated
* Use `Options` instead.
*/
export type Props = Options
export type Options = Partial<Props>

@@ -119,3 +94,3 @@ export interface Instance {

props: Props
reference: ReferenceElement | VirtualReference
reference: ReferenceElement
set(options: Options): void

@@ -133,11 +108,2 @@ setContent(content: Content): void

export interface GroupedInstance extends Instance {
_originalProps: Props
}
export interface GroupOptions {
delay?: number | [number, number]
duration?: number | [number, number]
}
export interface PopperChildren {

@@ -156,8 +122,7 @@ tooltip: HTMLDivElement

export interface Tippy {
(targets: Targets, options?: Props): Instance | Instance[]
(targets: Targets, options?: Options): Instance | Instance[] | null
readonly defaults: Props
readonly version: string
group(instances: Instance[], options?: GroupOptions): void
hideAll(options?: HideAllOptions): void
setDefaults(options: Props): void
setDefaults(partialDefaults: Options): void
}

@@ -164,0 +129,0 @@

{
"name": "tippy.js",
"version": "4.3.1",
"version": "5.0.0-alpha.0",
"description": "Highly customizable tooltip and popover library",
"main": "./umd/index.all.js",
"module": "./esm/index.all.js",
"unpkg": "./umd/index.all.min.js",
"main": "./cjs/tippy.bundle.js",
"module": "./esm/tippy.bundle.js",
"unpkg": "./iife/tippy.bundle.min.js",
"types": "index.d.ts",
"sideEffects": [
"./cjs/tippy.bundle.js",
"./cjs/tippy.bundle.min.js",
"./esm/tippy.bundle.js",
"./esm/tippy.bundle.min.js",
"*.css"
],
"author": "atomiks",

@@ -19,2 +26,5 @@ "contributors": [

"popover",
"popper",
"dropdown",
"popup",
"tippy",

@@ -24,5 +34,8 @@ "tippy.js"

"files": [
"umd",
"esm",
"themes",
"cjs/",
"iife/",
"esm/",
"addons/",
"animations/",
"themes/",
"index.css",

@@ -37,7 +50,10 @@ "index.d.ts"

"dev": "parcel demo/index.html -d .devserver --open",
"build": "node rollup.build.js && bundlesize",
"test": "jest --coverage",
"dev:flip": "parcel demo/flip/index.html -d .devserver --open",
"dev:themes": "parcel demo/themes/index.html -d .devserver --open",
"dev:animations": "parcel demo/animations/index.html -d .devserver --open",
"build": "node rollup.pre-build && rollup --config && bundlesize",
"test": "jest --coverage --silent",
"check-types": "tsc",
"lint": "eslint --report-unused-disable-directives .",
"clean": "rimraf umd esm themes coverage .devserver .cache ./index.css",
"lint": "eslint --report-unused-disable-directives . --ext .ts,.js",
"clean": "rimraf addons/{cjs,esm} cjs iife esm themes coverage .devserver .cache ./index.css ./index.d.ts",
"prepare": "npm run clean && npm run build"

@@ -52,3 +68,3 @@ },

"browserslist": [
"> 0.25%",
"> 0.5%",
"not dead",

@@ -59,8 +75,12 @@ "not safari < 8"

{
"path": "./esm/index.min.js",
"maxSize": "7 kB"
"path": "./iife/tippy.bundle.min.js",
"maxSize": "6.75 kB"
},
{
"path": "./iife/tippy.min.js",
"maxSize": "5.5 kB"
},
{
"path": "./index.css",
"maxSize": "2 kB"
"maxSize": "1.25 kB"
}

@@ -76,3 +96,3 @@ ],

"jest --findRelatedTests",
"eslint",
"eslint --report-unused-disable-directives . --ext .ts,.js",
"git add"

@@ -90,2 +110,3 @@ ],

"@babel/preset-typescript": "^7.3.3",
"@types/node": "^12.0.2",
"@typescript-eslint/eslint-plugin": "^1.4.2",

@@ -95,2 +116,3 @@ "@typescript-eslint/parser": "^1.4.2",

"babel-jest": "^24.5.0",
"babel-plugin-dev-expression": "^0.2.1",
"bundlesize": "^0.17.0",

@@ -113,7 +135,7 @@ "colorette": "^1.0.7",

"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-css-only": "^0.4.0",
"rollup-plugin-css-only": "^1.0.0",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-sass": "^1.1.0",
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-terser": "^4.0.3",

@@ -120,0 +142,0 @@ "typescript": "^3.3.3333"

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