Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
V4 (#413)
Browse files Browse the repository at this point in the history
* Rename `performance` to `ignoreAttributes`

* Remove `arrowTransform` option

* Test fixes

* Remove unused static methods

* Remove `tippy.one()`

* tippy.hideAllPoppers: ignore hideOnClick for consumer

* New packaging setup

* 0.25% browserslist

* Jest env fix

* Correct files key

* Rewriting demo

* Foolproof trickery

* Optimization

* Simplify CSS

* Rename `tip` to `instance`, tweaks

* tippy.hideAll() new API

* tip -> instance

* hideAll test

* Types update

* Types fixes

* Type fix

* ignoreAttributes type

* Order type

* More ordering..

* Jest 24

* Optimize getDataAttributeOptions

* Remove isNumeric

* Switch to terser for smaller bundles

* Dependencies

* package-lock

* package-lock

* zzz

* Fix .babelrc

* Inline supportsTouch due to DevTools context changes

* Removing archaic browser support

* 'esm' is preferred by Rollup over 'es' now

* Add group as static method

* Test cleanup

* Update rollup.build.js

* Functional values pass target as argument; resolve #421

* Fix tests

* Group types

* Remove import

* Simplify readme

* Update package.json

* Always update state after lifecycle invocation

* Remove MutationObserver: update popperInstance in set()

* Set updateDuration to 0 by default

* Apply updateDuration to popper to allow for smooth flips

* Add `role` option

* Allow followCursor: 'initial' on mobile; resolve #416

* Fix followCursor regression due to pointer-events

* Improve `livePlacement` option and change to `flipScroll`

* Fix animateFill value if arrow is true as an attribute

* Add back forced update

* Change modifier padding to 2px from 5px

* Disable flipScroll by default

* Make tippy.group object optional

* Types update

* JSDoc fix

* Better scale transform animation

* Remove all focus handling: leave it up to the developer

* Add JSDoc back in

* Move .tippy-active class to sync section

* Bunch of test fixes and additions

* Remove MutationObserver references

* Remove banner newline

* Add back outline: 0 by default

* Remove isBrowserSupported var

* Use .update() instead

* 4.0.0-alpha.0

* SSR check

* Fix types

* Change placement onHide, not onHidden

* popperInstance dependencies update

* Add 'parent' as a value for appendTo

* appendTo type

* Fix package-lock

* Website update for v4

* Reduce animateFill content transition delay

* Fix followCursor: 'initial' on touch devices

* Remove !important from .tippy-notransition

* Website update

* Version notice

* Fix Props types ordering

* Rename `flipScroll` to `flipOnUpdate`

* Fix position updating

* Add tests for `target`

* Website updates

* flipOnUpdate type

* Fix minor edge case with delay popper cursor hiding

* Add manual browser tests not covered by Jest

* Website update

* Fix tests

* woops

* yard -> yarn

* Update themes.mdx

* Fix theme() function

* Should be regular comment format

* Add tests for `hideAll()`

* Tested wrong thing

* Spiced the website up 🍭

* Clarify

* Use padding constant, increase from 2 to 3

* Tweak

* Remove VS Code auto import

* Popper delay edge case fix

* dist/themes/ -> themes/

* Open version notice links in new tab
  • Loading branch information
atomiks authored Feb 9, 2019
1 parent 8c8a367 commit 32002e8
Show file tree
Hide file tree
Showing 75 changed files with 7,746 additions and 8,285 deletions.
17 changes: 5 additions & 12 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
{
"presets": [["env", { "modules": false }], "stage-2"],
"presets": ["@babel/env"],
"plugins": [
["@babel/proposal-object-rest-spread", { "loose": true }, "unique"]
],
"env": {
"test": {
"presets": [
[
"env",
{
"targets": {
"node": "current"
}
}
],
"jest"
]
"presets": [["@babel/env", { "targets": { "node": "current" } }]]
}
}
}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
coverage
.devserver
node_modules
dist
tests/visual/dist
/index.css
umd
esm
themes
59 changes: 7 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,69 +8,24 @@
[![npm Downloads](https://img.shields.io/npm/dt/tippy.js.svg)](https://www.npmjs.com/package/tippy.js)
![gzip Size](http://img.badgesize.io/https://unpkg.com/tippy.js/dist/tippy.all.min.js?compression=gzip&label=gzip%20size)

Tippy.js is a highly customizable vanilla JS tooltip and popover library powered by Popper.js.
Tippy.js is a highly customizable vanilla JS tooltip and popover library powered
by Popper.js.

## Demo and Documentation

https://atomiks.github.io/tippyjs/

## Installation

```
```bash
# npm
npm i tippy.js
```

CDN: https://unpkg.com/tippy.js/dist/

## Basic Usage

#### 1. Give elements a `data-tippy` attribute containing the tooltip content.

```html
<button data-tippy="Tooltip">Text</button>
<button data-tippy="Another tooltip">Text</button>
```

#### 2. Include the `tippy.all.min.js` script in your document.

```html
<script src="https://unpkg.com/tippy.js@3/dist/tippy.all.min.js"></script>
```

#### Basic example

```html
<!DOCTYPE html>
<html>
<head>
<title>Tippy Example</title>
</head>
<body>
<!-- Elements with a `data-tippy` attribute -->
<button data-tippy="Tooltip">Text</button>
<button data-tippy="Another tooltip">Text</button>
<!-- Specify option via attribute -->
<button data-tippy="Another tooltip" data-tippy-delay="500">Delayed</button>

<!-- Include Tippy -->
<script src="https://unpkg.com/tippy.js@3/dist/tippy.all.min.js"></script>
<!-- OPTIONAL: Set the defaults for the auto-initialized tooltips -->
<script>
tippy.setDefaults({
arrow: true,
delay: 40,
theme: 'my-tippy',
})
</script>
</body>
</html>
# Yarn
yarn add tippy.js
```

View the [docs](https://atomiks.github.io/tippyjs/) for details on all of the options you can supply to customize tooltips to suit your needs.

## Browser Support

IE11+: browsers that support `MutationObserver` and `requestAnimationFrame`.
CDN: https://unpkg.com/tippy.js/dist/

## Component Wrappers

Expand Down
4 changes: 2 additions & 2 deletions build/main.js → build/all.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styles from '../dist/tippy.css'
import css from '../index.css'
import tippy from '../src/js/index'
import { injectCSS } from '../src/js/css'

injectCSS(styles)
injectCSS(css)

export default tippy
4 changes: 0 additions & 4 deletions build/bundle.js

This file was deleted.

1 change: 1 addition & 0 deletions build/css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../src/scss/index.scss'
2 changes: 2 additions & 0 deletions build/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import tippy from '../src/js'
export default tippy
Loading

0 comments on commit 32002e8

Please sign in to comment.