Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] V5 #499

Merged
merged 550 commits into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from 234 commits
Commits
Show all changes
550 commits
Select commit Hold shift + click to select a range
fc29cb3
Fix: place injected styles above first style or link tag only
atomiks Jun 29, 2019
bb9be84
Fix: avoid objectWithoutProperties babel ponyfill
atomiks Jun 29, 2019
63bb1d4
Remove min versions for esm/cjs
atomiks Jun 29, 2019
6b221ff
Adjust paths
atomiks Jun 29, 2019
5cae731
Fix arrowType validation message
atomiks Jun 29, 2019
d56f490
Fix double 'that' in message
atomiks Jun 29, 2019
ce82481
Fix static message
atomiks Jun 29, 2019
b497a4b
Rename private __dev__ property to __extraProps__
atomiks Jun 29, 2019
022b60b
Simplify mutation application
atomiks Jun 29, 2019
c48a8dd
Fix extra prop interop with addons
atomiks Jun 29, 2019
3768ad4
Use currentPlacement for correctness for normalizedPlacement check
atomiks Jun 29, 2019
58591c4
Fix: followCursor: 'initial' if triggered again while still visible
atomiks Jun 30, 2019
a8a89ec
Popper scroll listeners workaround
atomiks Jun 30, 2019
236d93a
style: spacing
atomiks Jun 30, 2019
7fd4d0d
Fix: restore clearDelayTimeouts() method
atomiks Jun 30, 2019
907f025
Fix: add extra-props dir to "files" key
atomiks Jun 30, 2019
536ad2f
5.0.0-alpha.2
atomiks Jun 30, 2019
0d1e53e
Mega commit
atomiks Jul 1, 2019
c7b79b3
Fix: move computedPadding logic into modifier
atomiks Jul 1, 2019
de18451
Remove outdated comment about flip offset
atomiks Jul 1, 2019
26963d3
No need for ternary when spreading
atomiks Jul 1, 2019
820a92c
Fix: followCursor 'initial' being placed at mouseenter instead of las…
atomiks Jul 2, 2019
b466261
Fix: preventOverflow padding is now 5 instead of 4, use 10px
atomiks Jul 2, 2019
f1ab141
Add docs on bundler usage for ESM/CJS versions
atomiks Jul 2, 2019
51aa122
Update getValue util
atomiks Jul 2, 2019
77dcf75
Make includes() util types explicit
atomiks Jul 2, 2019
2c4d68d
Fix: avoid silencing invalid selector errors
atomiks Jul 2, 2019
fa08630
Fix: remove unused import
atomiks Jul 2, 2019
88f78d5
Fix: move isBrowser check outside of function for coverage
atomiks Jul 2, 2019
3a16c3c
Remove --open command
atomiks Jul 2, 2019
f1bf35c
Fix: set() -> setProps()
atomiks Jul 2, 2019
17ecbeb
Fix: Early return if instance is already destroyed
atomiks Jul 2, 2019
9246adb
Remove `wait` prop
atomiks Jul 3, 2019
d138e18
Fix: Move distance application into onUpdate
atomiks Jul 4, 2019
558d4a2
Use react-flip-toolkit npm package
atomiks Jul 5, 2019
01398d4
Fix: check isMounted instead of isVisible
atomiks Jul 7, 2019
1699f77
Fix: avoid typecasting now that getValueAtIndexOrReturn util handles …
atomiks Jul 7, 2019
f55f81f
Remove inlinePositioning prop
atomiks Jul 24, 2019
31a7059
Fix #543 - optimize sticky prop
atomiks Jul 29, 2019
f148aeb
Update deps
atomiks Jul 29, 2019
1678f05
5.0.0-beta.0
atomiks Jul 29, 2019
0c64659
Bump tippy.css size threshold to 5 kB
atomiks Jul 31, 2019
bc64e23
Fix (#546): avoid setting role attribute if tippy is interactive
atomiks Aug 1, 2019
fcd4f78
Fix conflicts, errors
atomiks Aug 1, 2019
bd3f13e
Rollup: Use dist/ instead of separate format folders
atomiks Aug 1, 2019
aa47af3
Fix: delete role fix
atomiks Aug 1, 2019
867236a
Fix: bundlesize size links
atomiks Aug 1, 2019
90acd90
Fix conflicts, errors
atomiks Aug 2, 2019
7997944
Port followCursor popper.js@1.16.0 fix
atomiks Aug 2, 2019
28ac3bf
Fix clean script
atomiks Aug 2, 2019
f383836
Update pages
atomiks Aug 2, 2019
8af4a47
Merge branch 'master' into v5
atomiks Aug 4, 2019
df5ed9f
Fix: disabling instance should hide it
atomiks Aug 4, 2019
fd34fad
Fix (test): disabling instance should hide it
atomiks Aug 4, 2019
4bcecf1
Remove TODO
atomiks Aug 4, 2019
0189b9f
Move webpack note to FAQ
atomiks Aug 4, 2019
455e34a
Update Getting Started
atomiks Aug 4, 2019
6c5db79
Tweak h2 style
atomiks Aug 4, 2019
8d23d7b
Convert px to rem/em
atomiks Aug 4, 2019
f95137c
Fix accidental import
atomiks Aug 4, 2019
6aea245
Add formatted warnings
atomiks Aug 4, 2019
50d8d51
Remove superfluous double trailing __
atomiks Aug 4, 2019
eb2d4de
Replace setTrigger with an trigger: [showEvents, hideEvents]
atomiks Aug 6, 2019
28268da
Add doc on updating props
atomiks Aug 6, 2019
019f449
Fix: add referenceNode property for appendTo
atomiks Aug 7, 2019
7ee3ce9
Update addons demo
atomiks Aug 7, 2019
7009201
Fix: set() warning after rebase
atomiks Aug 8, 2019
99a2d2e
Fix: remove accidental import
atomiks Aug 8, 2019
d167c35
Fix: missing return type
atomiks Aug 8, 2019
35572fc
Fix: remove updating props section
atomiks Aug 8, 2019
fdba9ba
Update temp <Tippy /> wrapper
atomiks Aug 9, 2019
0f0d90b
Delete PropSymbol
atomiks Aug 9, 2019
32c807d
Fix #553: Handle multiple ids for aria-describedby
atomiks Aug 9, 2019
ee3ba42
tip -> instance
atomiks Aug 9, 2019
3367120
Fix: remove support for trigger: [show, hide] after .setProps restora…
atomiks Aug 9, 2019
05dcf86
5.0.0-beta.1
atomiks Aug 9, 2019
4ff5690
Fix: test cleanup (styling, constants)
atomiks Aug 10, 2019
b5fd7a2
DRY warning messages
atomiks Aug 11, 2019
939d76a
Functionize handleAriaDescribedByAttribute
atomiks Aug 12, 2019
1986980
Rename listeners functions
atomiks Aug 12, 2019
3465243
Add material filling effect to demo
atomiks Aug 12, 2019
2618651
Fix: handle aria-expanded attr + make changes sync
atomiks Aug 12, 2019
2df2e45
Fix: move makeSticky outside of instance closure
atomiks Aug 12, 2019
81c14e0
Remove patched methods with warnings
atomiks Aug 12, 2019
271c044
Fix: clean
atomiks Aug 13, 2019
a896379
Fix: rename removeProperties param name to be generic
atomiks Aug 13, 2019
63012ad
Move followCursor-only util to its module
atomiks Aug 13, 2019
3bddbff
Strip 'with' from followCursor to align with import name
atomiks Aug 13, 2019
855e4f5
Move makeSticky to createTippy module
atomiks Aug 13, 2019
363e9ad
Add inline element positioning section
atomiks Aug 13, 2019
b105998
Update syntax theme
atomiks Aug 13, 2019
4ac3dc7
Fix: remove stray <PropSymbol />
atomiks Aug 13, 2019
0ec5404
Syntax theme adjustements
atomiks Aug 13, 2019
deeb0b4
Extra clarity on process error
atomiks Aug 13, 2019
74587f2
Fix: default accessibility for interactive tippys
atomiks Aug 13, 2019
62705a0
Fix: internalize aria handlers in closure
atomiks Aug 15, 2019
2616cec
Fix: adjust for new interactive a11y defaults
atomiks Aug 15, 2019
461f9e5
Fix: port splitBySpaces util from master
atomiks Aug 15, 2019
1bef509
Fix conflicts
atomiks Aug 15, 2019
bfaeebd
Upgrade deps
atomiks Aug 15, 2019
750d7ff
Fix linting errors after 2.0 TS parser update
atomiks Aug 15, 2019
2d92f35
Fix: disable() call
atomiks Aug 15, 2019
7ac9ae2
Add WIP links
atomiks Aug 15, 2019
9534c67
Add doc on material filling effect
atomiks Aug 16, 2019
dc0dfa5
Default to module import syntax only
atomiks Aug 16, 2019
a60269e
Add doc on SVG arrows
atomiks Aug 16, 2019
421d6cd
Fix: remove error wrapper for IIFE versions
atomiks Aug 17, 2019
627629e
Update LICENSE
atomiks Aug 17, 2019
842312e
Run 2 updates on mount
atomiks Aug 30, 2019
1a664c6
Fix: spread nativeProps
atomiks Aug 30, 2019
3e51108
Fix: hide original tippy instances
atomiks Aug 30, 2019
edf6ba0
Fix: indentation
atomiks Aug 30, 2019
83c734f
Fix: interactive singleton delay leave
atomiks Aug 31, 2019
52b9bbd
Fix: interactivity with singletons
atomiks Aug 31, 2019
876d862
Fix: delay hiding listeners for non-mouseenter trigger
atomiks Aug 31, 2019
f759f61
Reduce duration default to [300, 250]
atomiks Aug 31, 2019
1316932
Remove non-updatable prop caveat
atomiks Sep 1, 2019
680350a
Use shared stylesheet for demos
atomiks Sep 2, 2019
2221826
Add backticks to props in messages
atomiks Sep 4, 2019
42cbe0b
Use splitBySpaces util
atomiks Sep 4, 2019
8afe0fb
5.0.0-beta.2
atomiks Sep 4, 2019
7e6aa86
Fix type for concat trick
atomiks Sep 5, 2019
567518c
Fix props argument type
atomiks Sep 5, 2019
2a2a318
Add stricter type for __extraProps
atomiks Sep 5, 2019
24e60dc
Inline tooltip.style references
atomiks Sep 5, 2019
e37a446
Remove unnecessary selector
atomiks Sep 5, 2019
aff70dd
Remove support for auto-initialization
atomiks Sep 11, 2019
b9635f4
Use side-effect free imports, tippy.bundle to tippy-bundle
atomiks Sep 12, 2019
e21638a
Import CSS to temp wrapper
atomiks Sep 12, 2019
79fed10
Move standalone CSS files to dist/
atomiks Sep 12, 2019
8eaa5b7
Change import paths
atomiks Sep 12, 2019
12fc5fe
Remove references to auto-initialization docs
atomiks Sep 13, 2019
fe6a6fb
Use headings for node vs browser
atomiks Sep 13, 2019
e2395f8
Fix type error
atomiks Sep 13, 2019
0008b8e
Don't add followCursor check if set to false
atomiks Sep 16, 2019
997e7d7
Fix aria attribute for singletons
atomiks Sep 16, 2019
8889598
Remove unused hideTimeout
atomiks Sep 16, 2019
03b563b
Fix: use tippyConstructor defaultProps.delay
atomiks Sep 16, 2019
601b10d
Remove addons/ and extra-props/ folders
atomiks Sep 17, 2019
da9acf8
Export hideAll() and setDefaultProps() as separate functions
atomiks Sep 17, 2019
fae21b9
Add hideAll and setDefaultProps separate types
atomiks Sep 17, 2019
cab7083
Update import path changes
atomiks Sep 17, 2019
e7b8ae8
Use heading for Node/Browser
atomiks Sep 17, 2019
7bf2077
Fix setDefaultProps() doc
atomiks Sep 17, 2019
1bea44d
Update deps
atomiks Sep 17, 2019
3be4477
Delete addons/ extra-props/
atomiks Sep 18, 2019
3d8574b
Fix touch-related followCursor issues
atomiks Sep 19, 2019
8d59184
Force `flipOnUpdate: true` for followCursor
atomiks Sep 19, 2019
2830d08
Fix scroll listeners added for touch input
atomiks Sep 19, 2019
d93eda5
Force 0 delay in touch and keyboard contexts
atomiks Sep 19, 2019
be94ab9
Remove Delay section
atomiks Sep 19, 2019
dc8416c
Use <MDXProvider /> instead of browser api hacks
atomiks Sep 19, 2019
0325c39
Replace extra-props with plugins API, fix createSingleton implementation
atomiks Sep 21, 2019
b7cff82
Update website
atomiks Sep 21, 2019
8703e21
Fix types
atomiks Sep 21, 2019
b4e1775
Remove outdated paths from ignores
atomiks Sep 21, 2019
aa0f040
Use target instead of reference for referenceNode
atomiks Sep 21, 2019
15eeb6d
Use currentTarget for invokeWithArgsOrReturn
atomiks Sep 21, 2019
a1df60b
Move state assignment above hook where possible
atomiks Sep 21, 2019
1821034
Move sticky prop to a plugin
atomiks Sep 21, 2019
d158edc
Move sticky test
atomiks Sep 21, 2019
3c60ef2
Split plugin types and use generic
atomiks Sep 21, 2019
ea5f452
Fix generic type based on edit
atomiks Sep 21, 2019
a077f3c
Add types section
atomiks Sep 21, 2019
d0f5d40
js -> ts
atomiks Sep 21, 2019
1d91bdb
Remove Modern ES modules section
atomiks Sep 21, 2019
2a39236
Fix plugin types
atomiks Sep 21, 2019
e3798e8
Fix type errors
atomiks Sep 21, 2019
e45c53b
Use normalizeToArray util
atomiks Sep 21, 2019
f50ecb5
Fix incorrect spread ordering
atomiks Sep 21, 2019
0a0181a
Update website
atomiks Sep 21, 2019
a53aa7a
Add sticky type
atomiks Sep 21, 2019
8a3fcb6
5.0.0-beta.3
atomiks Sep 21, 2019
2615870
Remove unused directories from files key
atomiks Sep 21, 2019
857a04b
Update plugins API and types
atomiks Sep 21, 2019
3aa5a74
Update plugins doc
atomiks Sep 21, 2019
59173fe
name and defaultValue are optional for plugins
atomiks Sep 21, 2019
3e0e22e
CreateSingleton takes all Props in new implementation
atomiks Sep 21, 2019
0813acc
Fix plugin interfaces
atomiks Sep 21, 2019
a6ef6a3
Inline DEV messages
atomiks Sep 21, 2019
02c6e99
Add test for defaultProps
atomiks Sep 21, 2019
82bb9b1
Update demos
atomiks Sep 21, 2019
5e2fc6b
Import missing shift-away.css path
atomiks Sep 21, 2019
64f9840
Set state.currentPlacement = null initially
atomiks Sep 21, 2019
042d4ff
Remove unnecessary parameter
atomiks Sep 21, 2019
5f066b6
Remove @ts-ignore after adding [key: string]: any
atomiks Sep 22, 2019
2c2420e
Remove unused test util
atomiks Sep 22, 2019
3c80e97
Use keyof LifecycleHooks type
atomiks Sep 22, 2019
de02d14
Change didHideDueToDocumentMouseDown technique
atomiks Sep 22, 2019
0c67e15
Rename instancePlugins variable
atomiks Sep 22, 2019
0043a98
Remove forced flipOnUpdate: true
atomiks Sep 22, 2019
16828ec
Increase code cov
atomiks Sep 22, 2019
b42dd65
Handle case of weird head tag layout (#576)
finom Sep 23, 2019
0e13f72
Add __DEV__ to jest key
atomiks Sep 23, 2019
4133a62
Various tweaks and fixes
atomiks Sep 23, 2019
33fe0cc
Unify setUserProps() behavior
atomiks Sep 23, 2019
6208c6d
Add more tests
atomiks Sep 23, 2019
b86eb87
Split animateFill into a plugin, followCursor tweaks
atomiks Sep 24, 2019
9300288
Merge branch 'master' into v5
atomiks Sep 24, 2019
8339e01
Move to instance-based plugins system
atomiks Sep 24, 2019
0838e6c
Fix transitionDelay
atomiks Sep 24, 2019
b39fc67
Use ReferenceObject
atomiks Sep 25, 2019
4e91c2f
Update website
atomiks Sep 25, 2019
d4d72a5
Clarify offset and interactive conflcit - resolve #567
atomiks Sep 25, 2019
9e27164
Fix Tippy type
atomiks Sep 25, 2019
c1201e3
Fix props extension
atomiks Sep 25, 2019
499ce37
Split addons and plugin tests into separate files
atomiks Sep 25, 2019
1c87668
Fix missing return type
atomiks Sep 25, 2019
35eda8a
Add `inlinePositioning` prop (basic support)
atomiks Sep 25, 2019
ab31da3
Remove unsued include paths
atomiks Sep 25, 2019
de518fd
Merge branch 'v5' of https://github.com/atomiks/tippyjs into v5
atomiks Sep 25, 2019
1aa4908
Move onCreate hook below createPopperInstance()
atomiks Sep 25, 2019
a63381e
Remove # of plugins
atomiks Sep 25, 2019
9398433
Drop 'Vanilla JS' now that jQuery is increasingly less relevant
atomiks Sep 25, 2019
6ce6b94
Fix console.logs
atomiks Sep 25, 2019
f22eb87
Add check for interactiveDebounce
atomiks Sep 25, 2019
4d06e85
Fix odd transitionDelay
atomiks Sep 25, 2019
851a43a
Update website
atomiks Sep 25, 2019
fdbcb34
Add InlinePositioningProps type
atomiks Sep 25, 2019
cd00a43
Clean code with destructuring
atomiks Sep 25, 2019
a9878d7
Better message for plain object argument
atomiks Sep 25, 2019
fc27919
Fix user-specified hook overriding singleton internal hook
atomiks Sep 26, 2019
e32c98d
Split onPropsUpdated into onBeforeUpdate & onAfterUpdate
atomiks Sep 26, 2019
2593c70
Remove `followCursor` from exception list
atomiks Sep 26, 2019
bd94c5f
Fix missing argument to onBeforeUpdate()
atomiks Sep 26, 2019
219ecae
Improve setProps() checks
atomiks Sep 26, 2019
537260a
Fix data-tippy- attributes not considering plugin props
atomiks Sep 26, 2019
2871336
Fix followCursor plugin disabling event listeners for unrelated insta…
atomiks Sep 26, 2019
57470a7
Fix inlinePositioning defaultValue as true
atomiks Sep 27, 2019
2393822
Mark plugins param as optional
atomiks Sep 27, 2019
75b1990
Fix disabling listeners for initial, horizontal, vertical
atomiks Sep 27, 2019
818faef
Update plugins demo
atomiks Sep 27, 2019
cb7c062
Update website
atomiks Sep 27, 2019
0cb0e98
Make Props table more readable
atomiks Sep 27, 2019
709f680
Add migration guide
atomiks Sep 27, 2019
58f7b02
Add missing return type
atomiks Sep 27, 2019
4803ada
Fix console.log
atomiks Sep 27, 2019
353dbf1
Fix lack of getIsEnabled() guard
atomiks Sep 28, 2019
5ca22c1
Fix padding oddities
atomiks Sep 28, 2019
eb513bd
Inline instanceof check
atomiks Sep 28, 2019
7a32d87
Simplify sticky logic
atomiks Sep 28, 2019
fd2a301
Fix svg-arrow CSS
atomiks Sep 28, 2019
4384200
Move backdrop-related CSS to backdrop.scss
atomiks Sep 28, 2019
bbbf572
Remove unecessary arrow CSS
atomiks Sep 28, 2019
94e3aa3
Add data-out-of-boundaries to migration guide
atomiks Sep 28, 2019
ee41eec
Add Element type value for appendTo
atomiks Sep 28, 2019
cf8a2e9
Make default round arrow tree shakeable
atomiks Sep 28, 2019
8b15eb5
Update README.md
atomiks Sep 28, 2019
ae1d17d
Further increase clarity of props table
atomiks Sep 28, 2019
b963d6e
Ensure mutation happens in lifecycle hook
atomiks Sep 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
{
"presets": ["@babel/env", "@babel/typescript"],
"plugins": [
["@babel/proposal-object-rest-spread", { "loose": true }, "unique"]
[
"@babel/plugin-transform-template-literals",
{
"loose": true
},
"unique"
],
["@babel/proposal-object-rest-spread", { "loose": true }, "unique"],
"dev-expression"
],
"env": {
"test": {
"presets": [["@babel/env", { "targets": { "node": "current" } }]]
"presets": [["@babel/env", { "targets": { "node": "current" } }]],
"plugins": ["dev-expression"]
}
}
}
13 changes: 8 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
node_modules
coverage
esm
umd
website
/node_modules
/coverage
/cjs
/esm
/iife
/website
/demo
/addons
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
jest: true,
es6: true,
},
globals: {
__DEV__: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
Expand Down
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
/coverage
/.devserver
node_modules
/index.css
/umd
/tippy.css
/cjs
/iife
/esm
/themes
/themes
/animations
/index.d.ts
/addons/cjs
/addons/esm
/addons/iife
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ yarn add tippy.js

```html
<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@4"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
```

### Modern ES modules in the browser

```html
<script type="module">
// Uses latest popper.js (unminified code)
import tippy from 'https://unpkg.com/tippy.js@4?module'
import tippy from 'https://unpkg.com/tippy.js@5?module'
</script>
```

Expand Down
16 changes: 16 additions & 0 deletions addons/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Instance, Targets, Props } from '..'

export type Delegate = (
targets: Targets,
props: Partial<Props> & { target: string },
) => Instance | Instance[]

export type CreateSingleton = (
tippyInstances: Instance[],
optionalProps?: { delay: number | [number, number] },
) => Instance

declare const delegate: Delegate
declare const createSingleton: CreateSingleton

export { delegate, createSingleton }
9 changes: 9 additions & 0 deletions addons/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "tippy-addons",
"private": true,
"main": "./cjs/tippy-addons.js",
"module": "./esm/tippy-addons.js",
"unpkg": "./iife/tippy-addons.min.js",
"types": "index.d.ts",
"sideEffects": false
}
4 changes: 4 additions & 0 deletions build/addons-pure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import delegate from '../src/addons/delegate.ts'
import createSingleton from '../src/addons/createSingleton.ts'

export { delegate, createSingleton }
15 changes: 15 additions & 0 deletions build/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable no-undef */
import delegate from '../src/addons/delegate.ts'
import createSingleton from '../src/addons/createSingleton.ts'

if (typeof tippy === 'function') {
tippy.delegate = delegate
tippy.createSingleton = createSingleton
} else {
throw new Error(
'[tippy.js ERROR] `tippy` is not a global function. Make sure you have ' +
'included the tippy script before tippy-addons.',
)
}

export { delegate, createSingleton }
1 change: 1 addition & 0 deletions build/animations/perspective-extreme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/perspective-extreme.scss'
1 change: 1 addition & 0 deletions build/animations/perspective-subtle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/perspective-subtle.scss'
1 change: 1 addition & 0 deletions build/animations/perspective.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/perspective.scss'
1 change: 1 addition & 0 deletions build/animations/scale-extreme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/scale-extreme.scss'
1 change: 1 addition & 0 deletions build/animations/scale-subtle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/scale-subtle.scss'
1 change: 1 addition & 0 deletions build/animations/scale.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/scale.scss'
1 change: 1 addition & 0 deletions build/animations/shift-away-extreme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/shift-away-extreme.scss'
1 change: 1 addition & 0 deletions build/animations/shift-away-subtle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/shift-away-subtle.scss'
1 change: 1 addition & 0 deletions build/animations/shift-toward-extreme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/shift-toward-extreme.scss'
1 change: 1 addition & 0 deletions build/animations/shift-toward-subtle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/shift-toward-subtle.scss'
1 change: 1 addition & 0 deletions build/animations/shift-toward.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/animations/shift-toward.scss'
2 changes: 2 additions & 0 deletions build/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import tippy from '../src'
export default tippy
4 changes: 2 additions & 2 deletions build/all.js → build/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import css from '../index.css'
import tippy from '../src/index.ts'
import css from '../tippy.css'
import tippy from '../src'
import { injectCSS } from '../src/css'

injectCSS(css)
Expand Down
2 changes: 0 additions & 2 deletions build/index.js

This file was deleted.

1 change: 0 additions & 1 deletion build/themes/google.js

This file was deleted.

1 change: 1 addition & 0 deletions build/themes/material.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../src/scss/themes/material.scss'
59 changes: 59 additions & 0 deletions demo/addons/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tippy Addons Dev</title>
<script src="./index.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<script>
process = { env: {} }
</script>
<style>
* {
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: #96b5fd;
height: 1500px;
}

.container {
max-width: 1000px;
margin: 0 auto;
margin-bottom: 200px;
}

button {
background: #eee;
border: 1px solid #ddd;
font-size: 16px;
margin: 2px;
padding: 8px;
}
</style>
</head>

<body>
<div class="container">
<div id="delegate">
<h1>delegate</h1>
<button data-tippy-content="one">One</button>
<button data-tippy-content="two">Two</button>
<button data-tippy-content="three">Three</button>
</div>

<div id="createSingleton">
<h1>createSingleton</h1>
<button class="createSingleton">One</button>
<button class="createSingleton">Two</button>
<button class="createSingleton">Three</button>
</div>
</div>
<!-- prettier-ignore -->
<script> </script>
<!-- Empty script tag fixes Chrome transition bug on page loads. -->
</body>
</html>
22 changes: 22 additions & 0 deletions demo/addons/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import tippy from '../../src'
import '../../src/scss/index.scss'
import createSingleton from '../../src/addons/createSingleton'
import delegate from '../../src/addons/delegate'

delegate('#delegate', {
target: 'button',
})

const instances = tippy('.createSingleton', {
content: 'tooltip',
updateDuration: 300,
})

const singleton = createSingleton(instances, {
delay: 500,
})

singleton.destroy(false)
createSingleton(instances, {
delay: 500,
})
45 changes: 45 additions & 0 deletions demo/animations/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tippy Animations Dev</title>
<script src="./index.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<script>
process = { env: {} }
</script>
<style>
* {
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: #96b5fd;
height: 1500px;
}

.container {
max-width: 1000px;
margin: 0 auto;
margin-bottom: 200px;
}

button {
background: #eee;
border: 1px solid #ddd;
font-size: 16px;
margin: 2px;
padding: 8px;
}
</style>
</head>

<body>
<div class="container"></div>
<!-- prettier-ignore -->
<script> </script>
<!-- Empty script tag fixes Chrome transition bug on page loads. -->
</body>
</html>
52 changes: 52 additions & 0 deletions demo/animations/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import tippy from '../../src'
import '../../src/scss/index.scss'
import '../../src/scss/animations/shift-away-subtle.scss'
import '../../src/scss/animations/shift-away-extreme.scss'
import '../../src/scss/animations/shift-toward.scss'
import '../../src/scss/animations/shift-toward-extreme.scss'
import '../../src/scss/animations/shift-toward-subtle.scss'
import '../../src/scss/animations/perspective.scss'
import '../../src/scss/animations/perspective-extreme.scss'
import '../../src/scss/animations/perspective-subtle.scss'
import '../../src/scss/animations/scale.scss'
import '../../src/scss/animations/scale-subtle.scss'
import '../../src/scss/animations/scale-extreme.scss'

const container = document.querySelector('.container')

const animations = [
'fade',
'shift-away',
'shift-away-subtle',
'shift-away-extreme',
'shift-toward',
'shift-toward-extreme',
'shift-toward-subtle',
'perspective',
'perspective-extreme',
'perspective-subtle',
'scale',
'scale-subtle',
'scale-extreme',
]
const placements = ['top', 'bottom', 'left', 'right']

animations.forEach(animation => {
const h1 = document.createElement('h1')
h1.textContent = animation
container.appendChild(h1)

placements.forEach(placement => {
const button = document.createElement('button')
button.textContent = placement
container.appendChild(button)

tippy(button, {
content: 'Tooltip',
animateFill: false,
duration: 2000,
animation,
placement,
})
})
})