@khanacademy/wonder-blocks-tooltip 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/es/index.js +1133 -0
- package/dist/index.js +1389 -0
- package/dist/index.js.flow +2 -0
- package/docs.md +11 -0
- package/package.json +37 -0
- package/src/__tests__/__snapshots__/generated-snapshot.test.js.snap +2674 -0
- package/src/__tests__/generated-snapshot.test.js +475 -0
- package/src/components/__tests__/__snapshots__/tooltip-tail.test.js.snap +9 -0
- package/src/components/__tests__/__snapshots__/tooltip.test.js.snap +47 -0
- package/src/components/__tests__/tooltip-anchor.test.js +987 -0
- package/src/components/__tests__/tooltip-bubble.test.js +80 -0
- package/src/components/__tests__/tooltip-popper.test.js +71 -0
- package/src/components/__tests__/tooltip-tail.test.js +117 -0
- package/src/components/__tests__/tooltip.integration.test.js +79 -0
- package/src/components/__tests__/tooltip.test.js +401 -0
- package/src/components/tooltip-anchor.js +330 -0
- package/src/components/tooltip-bubble.js +150 -0
- package/src/components/tooltip-bubble.md +92 -0
- package/src/components/tooltip-content.js +76 -0
- package/src/components/tooltip-content.md +34 -0
- package/src/components/tooltip-popper.js +101 -0
- package/src/components/tooltip-tail.js +462 -0
- package/src/components/tooltip-tail.md +143 -0
- package/src/components/tooltip.js +235 -0
- package/src/components/tooltip.md +194 -0
- package/src/components/tooltip.stories.js +76 -0
- package/src/index.js +12 -0
- package/src/util/__tests__/__snapshots__/active-tracker.test.js.snap +3 -0
- package/src/util/__tests__/__snapshots__/ref-tracker.test.js.snap +3 -0
- package/src/util/__tests__/active-tracker.test.js +142 -0
- package/src/util/__tests__/ref-tracker.test.js +153 -0
- package/src/util/active-tracker.js +94 -0
- package/src/util/constants.js +7 -0
- package/src/util/ref-tracker.js +46 -0
- package/src/util/types.js +29 -0
package/docs.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Use a tooltip to help describe an on screen object.
|
|
2
|
+
|
|
3
|
+
Tooltips:
|
|
4
|
+
|
|
5
|
+
- contain text
|
|
6
|
+
- (optional) contain small graphic elements to complement the text
|
|
7
|
+
- appear on hover or focus (for non-assistive tech keyboard users)
|
|
8
|
+
- must have a tail that points to a parent object
|
|
9
|
+
- DO NOT include actions
|
|
10
|
+
|
|
11
|
+
For more rich content see Popovers, for taking action on an object, see Snackbars (proposed).
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@khanacademy/wonder-blocks-tooltip",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"design": "v1",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"description": "",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/es/index.js",
|
|
11
|
+
"source": "src/index.js",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@babel/runtime": "^7.13.10",
|
|
19
|
+
"@khanacademy/wonder-blocks-color": "^1.1.18",
|
|
20
|
+
"@khanacademy/wonder-blocks-core": "^3.1.4",
|
|
21
|
+
"@khanacademy/wonder-blocks-layout": "^1.4.3",
|
|
22
|
+
"@khanacademy/wonder-blocks-modal": "^2.1.42",
|
|
23
|
+
"@khanacademy/wonder-blocks-spacing": "^3.0.3",
|
|
24
|
+
"@khanacademy/wonder-blocks-typography": "^1.1.25"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@popperjs/core": "^2.10.1",
|
|
28
|
+
"aphrodite": "^1.2.5",
|
|
29
|
+
"react": "^16.4.1",
|
|
30
|
+
"react-dom": "^16.4.1",
|
|
31
|
+
"react-popper": "^2.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"wb-dev-build-settings": "^0.1.0"
|
|
35
|
+
},
|
|
36
|
+
"gitHead": "8022bb419eed74be37f71f71c7621854794a731c"
|
|
37
|
+
}
|