react-tooltip 4.5.0 → 5.0.0-beta.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.
Files changed (90) hide show
  1. package/.editorconfig +25 -0
  2. package/.eslintrc.json +94 -0
  3. package/.gitattributes +3 -0
  4. package/.github/FUNDING.yml +13 -0
  5. package/.github/workflows/lint.yaml +35 -0
  6. package/.github/workflows/pull-request.yaml +11 -0
  7. package/.github/workflows/release.yaml +30 -0
  8. package/.husky/pre-commit +6 -0
  9. package/.prettierrc.json +10 -0
  10. package/.stylelintrc.json +19 -0
  11. package/.vscode/settings.json +27 -0
  12. package/bower.json +26 -0
  13. package/build/dist/react-tooltip.cjs.js +2909 -0
  14. package/build/dist/react-tooltip.cjs.min.js +6 -0
  15. package/build/dist/react-tooltip.css +73 -0
  16. package/build/dist/react-tooltip.esm.js +2901 -0
  17. package/build/dist/react-tooltip.esm.min.js +6 -0
  18. package/build/dist/react-tooltip.min.css +1 -0
  19. package/build/dist/react-tooltip.umd.js +2913 -0
  20. package/build/dist/react-tooltip.umd.min.js +6 -0
  21. package/build/index.css +79 -0
  22. package/build/index.html +19 -0
  23. package/build/index.js +36190 -0
  24. package/cli.js +30 -0
  25. package/contributing.md +40 -0
  26. package/dist/react-tooltip.cjs.js +2932 -0
  27. package/dist/react-tooltip.cjs.min.js +6 -0
  28. package/dist/react-tooltip.css +73 -0
  29. package/dist/react-tooltip.esm.js +2924 -0
  30. package/dist/react-tooltip.esm.min.js +6 -0
  31. package/dist/react-tooltip.min.css +1 -0
  32. package/dist/react-tooltip.umd.js +2936 -0
  33. package/dist/react-tooltip.umd.min.js +6 -0
  34. package/docs/README.md +50 -0
  35. package/docs/babel.config.js +3 -0
  36. package/docs/docs/examples/_category_.json +7 -0
  37. package/docs/docs/examples/basic-examples.mdx +68 -0
  38. package/docs/docs/examples/children.mdx +67 -0
  39. package/docs/docs/examples/content.mdx +80 -0
  40. package/docs/docs/examples/delay.mdx +84 -0
  41. package/docs/docs/examples/events.mdx +85 -0
  42. package/docs/docs/examples/get-content.mdx +58 -0
  43. package/docs/docs/examples/html.mdx +75 -0
  44. package/docs/docs/examples/multiline.mdx +91 -0
  45. package/docs/docs/examples/offset.mdx +69 -0
  46. package/docs/docs/examples/place.mdx +55 -0
  47. package/docs/docs/examples/state.mdx +331 -0
  48. package/docs/docs/examples/styling.mdx +388 -0
  49. package/docs/docs/examples/variant.mdx +100 -0
  50. package/docs/docs/getting-started.md +70 -0
  51. package/docs/docs/options.mdx +105 -0
  52. package/docs/docs/upgrade-guide/_category_.json +7 -0
  53. package/docs/docs/upgrade-guide/basic-examples-v4-v5.mdx +119 -0
  54. package/docs/docs/upgrade-guide/changelog-v4-v5.md +85 -0
  55. package/docs/docusaurus.config.js +126 -0
  56. package/docs/package.json +47 -0
  57. package/docs/sidebars.js +33 -0
  58. package/docs/src/components/HomepageFeatures/index.tsx +70 -0
  59. package/docs/src/components/HomepageFeatures/styles.module.css +11 -0
  60. package/docs/src/css/custom.css +74 -0
  61. package/docs/src/pages/index.module.css +35 -0
  62. package/docs/src/pages/index.tsx +42 -0
  63. package/docs/src/pages/markdown-page.md +7 -0
  64. package/docs/static/.nojekyll +0 -0
  65. package/docs/static/img/docusaurus.png +0 -0
  66. package/docs/static/img/favicon.ico +0 -0
  67. package/docs/static/img/logo.svg +1 -0
  68. package/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  69. package/docs/static/img/undraw_docusaurus_react.svg +170 -0
  70. package/docs/static/img/undraw_docusaurus_tree.svg +40 -0
  71. package/docs/tsconfig.json +7 -0
  72. package/docs/yarn.lock +7579 -0
  73. package/example-v5/package.json +21 -0
  74. package/example-v5/public/index.html +20 -0
  75. package/example-v5/public/manifest.json +8 -0
  76. package/example-v5/src/App.jsx +908 -0
  77. package/example-v5/src/index.css +238 -0
  78. package/example-v5/src/index.js +15 -0
  79. package/example-v5/src/index.scss +251 -0
  80. package/package.json +94 -146
  81. package/public/index.html +19 -0
  82. package/rollup.config.dev.js +88 -0
  83. package/rollup.config.prod.js +104 -0
  84. package/rollup.config.types.js +7 -0
  85. package/tsconfig.json +109 -0
  86. package/dist/index.es.js +0 -3185
  87. package/dist/index.es.js.map +0 -1
  88. package/dist/index.js +0 -3192
  89. package/dist/index.js.map +0 -1
  90. package/dist/react-tooltip.d.ts +0 -124
@@ -0,0 +1,119 @@
1
+ ---
2
+ sidebar_position: 4
3
+ ---
4
+
5
+ # Basic examples V4 -> V5
6
+
7
+ import { Tooltip } from 'react-tooltip'
8
+ import 'react-tooltip/dist/react-tooltip.css'
9
+
10
+ export const TooltipAnchor = ({ children, id, ...rest }) => {
11
+ return (
12
+ <span
13
+ id={id}
14
+ style={{
15
+ display: 'flex',
16
+ justifyContent: 'center',
17
+ alignItems: 'center',
18
+ width: '60px',
19
+ height: '60px',
20
+ borderRadius: '60px',
21
+ color: '#222',
22
+ background: 'rgba(255, 255, 255, 1)',
23
+ cursor: 'pointer',
24
+ boxShadow: '3px 4px 3px rgba(0, 0, 0, 0.5)',
25
+ border: '1px solid #333',
26
+ }}
27
+ {...rest}
28
+ >
29
+ {children}
30
+ </span>
31
+ )
32
+ }
33
+
34
+ ### V4 or less
35
+
36
+ ```jsx
37
+ import ReactTooltip from 'react-tooltip';
38
+
39
+ <a data-tip="hello world!" data-for="tooltip"> ◕‿‿◕ </a>
40
+
41
+ <ReactTooltip id="tooltip" place="top" type="dark" />
42
+ ```
43
+
44
+ (v4) `data-tip` = `data-content` (v5)
45
+
46
+ - `V4` - CSS styles are built-in and injected by tooltip into the header (not a good practice but convenient), [issues in GitHub](https://github.com/ReactTooltip/react-tooltip/issues?q=is%3Aissue+header)
47
+ - `V5` - CSS styles are optional and can be imported or not to the project
48
+
49
+ ### V5 - props option
50
+
51
+ ```jsx
52
+ import { Tooltip } from 'react-tooltip';
53
+ import 'react-tooltip/dist/react-tooltip.css'
54
+
55
+ <a id="props-basic"> ◕‿‿◕ </a>
56
+
57
+ <Tooltip anchorId="props-basic" content="hello world!" />
58
+ ```
59
+
60
+ <TooltipAnchor id="props-basic">◕‿‿◕</TooltipAnchor>
61
+ <Tooltip anchorId="props-basic" content="hello world!" />
62
+
63
+ ### V5 - data attributes
64
+
65
+ ```jsx
66
+ import { Tooltip } from 'react-tooltip';
67
+ import 'react-tooltip/dist/react-tooltip.css';
68
+
69
+ <a id="attributes-basic" data-content="hello world!"> ◕‿‿◕ </a>
70
+
71
+ <Tooltip anchorId="attributes-basic" />
72
+ ```
73
+
74
+ <TooltipAnchor id="attributes-basic" data-tooltip-content="hello world!">
75
+ ◕‿‿◕
76
+ </TooltipAnchor>
77
+ <Tooltip anchorId="attributes-basic" />
78
+
79
+ ---
80
+
81
+ # Colors
82
+
83
+ ### V4 or less - type
84
+
85
+ ```jsx
86
+ import ReactTooltip from 'react-tooltip';
87
+
88
+ <a data-tip="hello world!" data-for="tooltip"> ◕‿‿◕ </a>
89
+
90
+ <ReactTooltip id="tooltip" place="top" type="success" />
91
+ ```
92
+
93
+ (v4) `type` = `variant` (v5)
94
+
95
+ ### V5 - variant
96
+
97
+ Available values `dark` | `light` | `success` | `warning` | `error` | `info`
98
+
99
+ ```jsx
100
+ import { Tooltip } from 'react-tooltip';
101
+ import 'react-tooltip/dist/react-tooltip.css';
102
+
103
+ <a id="attributes-variant" data-tooltip-content="hello world!" data-tooltip-variant="success"> ◕‿‿◕ </a>
104
+
105
+ <Tooltip anchorId="attributes-variant" />
106
+ ```
107
+
108
+ <TooltipAnchor
109
+ id="attributes-variant"
110
+ data-tooltip-content="hello world!"
111
+ data-tooltip-variant="success"
112
+ >
113
+ ◕‿‿◕
114
+ </TooltipAnchor>
115
+ <Tooltip anchorId="attributes-variant" />
116
+
117
+ ---
118
+
119
+ Please see [all V5 Options here](../options.mdx).
@@ -0,0 +1,85 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Changelog V4 -> V5
6
+
7
+ If you are using V4 and want to use V5, please read this doc.
8
+
9
+ ## From V4 to V5
10
+
11
+ V4 was a great react tooltip component but was built a few years ago, he was built with react class components and it's hard to maintain and to the community give contributions, so, with this in mind, we build a new version of react tooltip using [float-ui](https://floating-ui.com/) behind the scenes. This gives a great improvement in performance and in a new and easier code to let the community contribute to the project.
12
+
13
+ ## Improvements
14
+
15
+ - Dropped package dependency `uuid`
16
+ - - Using React `useId` - [Docs](https://reactjs.org/docs/hooks-reference.html#useid)
17
+ - - - Unfortunately `useId` was introduced only into React v18, so, that will be the minimum necessary version of React to V5
18
+ - Dropped package dependency `prop-types`
19
+ - V5 is written in TypeScript
20
+ - V5 has minified and unminified files available to be used as you want
21
+
22
+ ## Break Changes
23
+
24
+ - Default Padding changed from `padding: 8px 21px;` to `padding: 8px 16px;`
25
+ - Exported module now is `Tooltip` instead of `ReactTooltip`
26
+ - - If you already have a `Tooltip` component in your application and want to explicitly declare this is `ReactTooltip`, just `import { Tooltip as ReactTooltip } from "react-tooltip"`
27
+ - CSS import is now optional, so, you can modify and/or add any styling to your floating tooltip element
28
+ - `data-tip` attribute now is `data-content`
29
+ - `getContent` prop now doesn't accept `any` anymore, just a `function`
30
+ - default behavior of tooltip now is `solid` instead of `float`
31
+
32
+ ## New Props
33
+
34
+ - [x] classNameArrow
35
+ - [x] events - `data-events` -`['hover', 'click']` - default: `['hover']` (always an array when using as prop, even with only one option, when using as data attribute: `data-events="hover click"`)
36
+ - [x] isOpen - `boolean` (to control tooltip state) - if not used, internal state of tooltip will handle the show state
37
+ - [x] setIsOpen - `function` (to control tooltip state) - if not used, internal state of tooltip will handle the show state
38
+
39
+ ## `V4` props available in `V5`
40
+
41
+ - [x] children
42
+ - [x] place - `data-place`
43
+ - [x] type - **Deprecated** | in V5 -> `variant` - `data-variant`
44
+ - [ ] effect
45
+ - [x] offset - `data-offset`
46
+ - [ ] padding - **Deprecated** | in V5 -> can be easy updated by className prop
47
+ - [ ] multiline - **Deprecated** | in V5 -> this is already supported as default by `content` and `html` props
48
+ - [ ] border - **Deprecated** | in V5 -> can be easy updated by `className` prop
49
+ - [ ] borderClass - **Deprecated** | in V5 -> can be easy updated by `className` prop
50
+ - [ ] textColor - **Deprecated** | in V5 -> can be easy updated by `className` prop
51
+ - [ ] backgroundColor - **Deprecated** | in V5 -> can be easy updated by `className` prop
52
+ - [ ] borderColor - **Deprecated** | in V5 -> can be easy updated by `className` prop
53
+ - [ ] arrowColor - **Deprecated** | in V5 -> can be easy updated by `className` prop
54
+ - [ ] arrowRadius - **Deprecated** | in V5 -> can be easy updated by `className` prop
55
+ - [ ] tooltipRadius - **Deprecated** | in V5 -> can be easy updated by `className` prop
56
+ - [ ] insecure - **Deprecated** | in V5 -> CSS will be a separate file and can be imported or not
57
+ - [x] className
58
+ - [x] id
59
+ - [x] html
60
+ - [x] delayHide - `data-delay-hide`
61
+ - [ ] delayUpdate - **Deprecated** | if requested, can be implemented later
62
+ - [x] delayShow - `data-delay-show`
63
+ - [ ] event
64
+ - [ ] eventOff
65
+ - [ ] isCapture - **Deprecated**
66
+ - [ ] globalEventOff - **Deprecated**
67
+ - [x] getContent - Now this attribute only accepts a function instead of any
68
+ - [ ] afterShow
69
+ - [ ] afterHide
70
+ - [ ] overridePosition - **Deprecated**
71
+ - [ ] disable
72
+ - [ ] scrollHide
73
+ - [ ] resizeHide
74
+ - [x] wrapper - `data-wrapper`
75
+ - [ ] bodyMode - **Deprecated**
76
+ - [ ] clickable - **Deprecated** | Supported by default in V5
77
+ - [ ] disableInternalStyle - **Deprecated** | in V5 -> CSS will be a separate file and can be imported or not
78
+
79
+ ### Detailed informations
80
+
81
+ - [The Pull Request of V5](https://github.com/ReactTooltip/react-tooltip/pull/820)
82
+
83
+ ---
84
+
85
+ Please see [all V5 Options here](../options.mdx).
@@ -0,0 +1,126 @@
1
+ // @ts-check
2
+ // Note: type annotations allow type checking and IDEs autocompletion
3
+
4
+ const lightCodeTheme = require('prism-react-renderer/themes/github')
5
+ const darkCodeTheme = require('prism-react-renderer/themes/dracula')
6
+
7
+ /** @type {import('@docusaurus/types').Config} */
8
+ const config = {
9
+ title: 'React Tooltip',
10
+ tagline: 'Awesome React Tooltip component',
11
+ url: 'https://react-tooltip.com',
12
+ baseUrl: '/',
13
+ onBrokenLinks: 'throw',
14
+ onBrokenMarkdownLinks: 'warn',
15
+ favicon: 'img/favicon.ico',
16
+
17
+ // GitHub pages deployment config.
18
+ // If you aren't using GitHub pages, you don't need these.
19
+ organizationName: 'ReactTooltip', // Usually your GitHub org/user name.
20
+ projectName: 'ReactTooltip', // Usually your repo name.
21
+
22
+ // Even if you don't use internalization, you can use this field to set useful
23
+ // metadata like html lang. For example, if your site is Chinese, you may want
24
+ // to replace "en" with "zh-Hans".
25
+ i18n: {
26
+ defaultLocale: 'en',
27
+ locales: ['en'],
28
+ },
29
+
30
+ presets: [
31
+ [
32
+ 'classic',
33
+ /** @type {import('@docusaurus/preset-classic').Options} */
34
+ ({
35
+ docs: {
36
+ sidebarPath: require.resolve('./sidebars.js'),
37
+ // Please change this to your repo.
38
+ // Remove this to remove the "edit this page" links.
39
+ editUrl: 'https://github.com/ReactTooltip/react-tooltip/tree/v5/docs/',
40
+ },
41
+ // blog: {
42
+ // showReadingTime: true,
43
+ // // Please change this to your repo.
44
+ // // Remove this to remove the "edit this page" links.
45
+ // editUrl:
46
+ // 'https://github.com/ReactTooltip/react-tooltip/tree/v5/docs/',
47
+ // },
48
+ theme: {
49
+ customCss: require.resolve('./src/css/custom.css'),
50
+ },
51
+ }),
52
+ ],
53
+ ],
54
+
55
+ themeConfig:
56
+ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
57
+ ({
58
+ navbar: {
59
+ title: 'React Tooltip',
60
+ logo: {
61
+ alt: 'React Tooltip Logo',
62
+ src: 'img/logo.svg',
63
+ },
64
+ items: [
65
+ {
66
+ type: 'doc',
67
+ docId: 'getting-started',
68
+ position: 'left',
69
+ label: 'Docs',
70
+ },
71
+ {
72
+ href: 'https://github.com/ReactTooltip/react-tooltip/',
73
+ label: 'GitHub',
74
+ position: 'right',
75
+ },
76
+ ],
77
+ },
78
+ footer: {
79
+ style: 'dark',
80
+ links: [
81
+ {
82
+ title: 'Docs',
83
+ items: [
84
+ {
85
+ label: 'Getting Started',
86
+ to: '/docs/getting-started',
87
+ },
88
+ ],
89
+ },
90
+ // {
91
+ // title: 'Community',
92
+ // items: [
93
+ // {
94
+ // label: 'Stack Overflow',
95
+ // href: 'https://stackoverflow.com/questions/tagged/docusaurus',
96
+ // },
97
+ // {
98
+ // label: 'Discord',
99
+ // href: 'https://discordapp.com/invite/docusaurus',
100
+ // },
101
+ // {
102
+ // label: 'Twitter',
103
+ // href: 'https://twitter.com/docusaurus',
104
+ // },
105
+ // ],
106
+ // },
107
+ {
108
+ title: 'More',
109
+ items: [
110
+ {
111
+ label: 'GitHub',
112
+ href: 'https://github.com/ReactTooltip/react-tooltip/',
113
+ },
114
+ ],
115
+ },
116
+ ],
117
+ copyright: `Copyright © ${new Date().getFullYear()} React Tooltip. Docs built with Docusaurus.`,
118
+ },
119
+ prism: {
120
+ theme: lightCodeTheme,
121
+ darkTheme: darkCodeTheme,
122
+ },
123
+ }),
124
+ }
125
+
126
+ module.exports = config
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "react-tooltip-docs",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "docusaurus": "docusaurus",
7
+ "start": "docusaurus start",
8
+ "build": "docusaurus build",
9
+ "swizzle": "docusaurus swizzle",
10
+ "deploy": "docusaurus deploy",
11
+ "clear": "docusaurus clear",
12
+ "serve": "docusaurus serve",
13
+ "write-translations": "docusaurus write-translations",
14
+ "write-heading-ids": "docusaurus write-heading-ids",
15
+ "typecheck": "tsc"
16
+ },
17
+ "dependencies": {
18
+ "@docusaurus/core": "2.2.0",
19
+ "@docusaurus/preset-classic": "2.2.0",
20
+ "@mdx-js/react": "^1.6.22",
21
+ "clsx": "^1.2.1",
22
+ "prism-react-renderer": "^1.3.5",
23
+ "react": "18.2.0",
24
+ "react-dom": "18.2.0",
25
+ "react-tooltip": "link:.."
26
+ },
27
+ "devDependencies": {
28
+ "@docusaurus/module-type-aliases": "2.2.0",
29
+ "@tsconfig/docusaurus": "^1.0.5",
30
+ "typescript": "^4.7.4"
31
+ },
32
+ "browserslist": {
33
+ "production": [
34
+ ">0.5%",
35
+ "not dead",
36
+ "not op_mini all"
37
+ ],
38
+ "development": [
39
+ "last 1 chrome version",
40
+ "last 1 firefox version",
41
+ "last 1 safari version"
42
+ ]
43
+ },
44
+ "engines": {
45
+ "node": ">=16.14 <17.x"
46
+ }
47
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Creating a sidebar enables you to:
3
+ - create an ordered group of docs
4
+ - render a sidebar for each doc of that group
5
+ - provide next/previous navigation
6
+
7
+ The sidebars can be generated from the filesystem, or explicitly defined here.
8
+
9
+ Create as many sidebars as you want.
10
+ */
11
+
12
+ // @ts-check
13
+
14
+ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
15
+ const sidebars = {
16
+ // By default, Docusaurus generates a sidebar from the docs folder structure
17
+ tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
18
+
19
+ // But you can create a sidebar manually
20
+ /*
21
+ tutorialSidebar: [
22
+ 'intro',
23
+ 'hello',
24
+ {
25
+ type: 'category',
26
+ label: 'Tutorial',
27
+ items: ['tutorial-basics/create-a-document'],
28
+ },
29
+ ],
30
+ */
31
+ }
32
+
33
+ module.exports = sidebars
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import styles from './styles.module.css';
4
+
5
+ type FeatureItem = {
6
+ title: string;
7
+ Svg: React.ComponentType<React.ComponentProps<'svg'>>;
8
+ description: JSX.Element;
9
+ };
10
+
11
+ const FeatureList: FeatureItem[] = [
12
+ {
13
+ title: 'Easy to Use',
14
+ Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
15
+ description: (
16
+ <>
17
+ Docusaurus was designed from the ground up to be easily installed and
18
+ used to get your website up and running quickly.
19
+ </>
20
+ ),
21
+ },
22
+ {
23
+ title: 'Focus on What Matters',
24
+ Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
25
+ description: (
26
+ <>
27
+ Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
28
+ ahead and move your docs into the <code>docs</code> directory.
29
+ </>
30
+ ),
31
+ },
32
+ {
33
+ title: 'Powered by React',
34
+ Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
35
+ description: (
36
+ <>
37
+ Extend or customize your website layout by reusing React. Docusaurus can
38
+ be extended while reusing the same header and footer.
39
+ </>
40
+ ),
41
+ },
42
+ ];
43
+
44
+ function Feature({title, Svg, description}: FeatureItem) {
45
+ return (
46
+ <div className={clsx('col col--4')}>
47
+ <div className="text--center">
48
+ <Svg className={styles.featureSvg} role="img" />
49
+ </div>
50
+ <div className="text--center padding-horiz--md">
51
+ <h3>{title}</h3>
52
+ <p>{description}</p>
53
+ </div>
54
+ </div>
55
+ );
56
+ }
57
+
58
+ export default function HomepageFeatures(): JSX.Element {
59
+ return (
60
+ <section className={styles.features}>
61
+ <div className="container">
62
+ <div className="row">
63
+ {FeatureList.map((props, idx) => (
64
+ <Feature key={idx} {...props} />
65
+ ))}
66
+ </div>
67
+ </div>
68
+ </section>
69
+ );
70
+ }
@@ -0,0 +1,11 @@
1
+ .features {
2
+ display: flex;
3
+ align-items: center;
4
+ padding: 2rem 0;
5
+ width: 100%;
6
+ }
7
+
8
+ .featureSvg {
9
+ height: 200px;
10
+ width: 200px;
11
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Any CSS included here will be global. The classic template
3
+ * bundles Infima by default. Infima is a CSS framework designed to
4
+ * work well for content-centric websites.
5
+ */
6
+
7
+ /* You can override the default Infima variables here. */
8
+ :root {
9
+ --ifm-color-primary: #2e8555;
10
+ --ifm-color-primary-dark: #29784c;
11
+ --ifm-color-primary-darker: #277148;
12
+ --ifm-color-primary-darkest: #205d3b;
13
+ --ifm-color-primary-light: #33925d;
14
+ --ifm-color-primary-lighter: #359962;
15
+ --ifm-color-primary-lightest: #3cad6e;
16
+ --ifm-code-font-size: 95%;
17
+ --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18
+ }
19
+
20
+ /* For readability concerns, you should choose a lighter palette in dark mode. */
21
+ [data-theme='dark'] {
22
+ --ifm-color-primary: #25c2a0;
23
+ --ifm-color-primary-dark: #21af90;
24
+ --ifm-color-primary-darker: #1fa588;
25
+ --ifm-color-primary-darkest: #1a8870;
26
+ --ifm-color-primary-light: #29d5b0;
27
+ --ifm-color-primary-lighter: #32d8b4;
28
+ --ifm-color-primary-lightest: #4fddbf;
29
+ --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
30
+ }
31
+
32
+ /** styling examples **/
33
+ .example-container .example {
34
+ color: #222;
35
+ background-color: rgb(0, 247, 255);
36
+ }
37
+
38
+ .example-container .example .example-arrow {
39
+ background-color: rgb(0, 247, 255);
40
+ }
41
+
42
+ .example-container .example-orange {
43
+ color: #222;
44
+ background-color: rgb(255, 153, 0);
45
+ }
46
+
47
+ .example-container .example-orange .example-arrow {
48
+ background-color: rgb(255, 153, 0);
49
+ }
50
+
51
+ .example-container .example-pink {
52
+ color: #fff;
53
+ background-color: rgb(255, 0, 255);
54
+ }
55
+
56
+ .example-container .example-pink .example-arrow {
57
+ background-color: rgb(255, 0, 255);
58
+ }
59
+
60
+ .example-container .example-no-radius {
61
+ border-radius: 0;
62
+ }
63
+
64
+ .example-container .example-rounded {
65
+ border-radius: 50%;
66
+ }
67
+
68
+ .example-container .example-no-padding {
69
+ padding: 0;
70
+ }
71
+
72
+ .example-container .example-padding {
73
+ padding: 48px;
74
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * CSS files with the .module.css suffix will be treated as CSS modules
3
+ * and scoped locally.
4
+ */
5
+
6
+ .heroBanner {
7
+ padding: 4rem 0;
8
+ text-align: center;
9
+ position: relative;
10
+ overflow: hidden;
11
+ }
12
+
13
+ @media screen and (max-width: 996px) {
14
+ .heroBanner {
15
+ padding: 2rem;
16
+ }
17
+ }
18
+
19
+ .buttons {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ flex-direction: column;
24
+ row-gap: 16px;
25
+ }
26
+
27
+ @media screen and (min-width: 768px) {
28
+ .buttons {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ flex-direction: row;
33
+ column-gap: 16px;
34
+ }
35
+ }
@@ -0,0 +1,42 @@
1
+ /* eslint-disable import/no-unresolved */
2
+ import React from 'react'
3
+ import clsx from 'clsx'
4
+ import Link from '@docusaurus/Link'
5
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
6
+ import Layout from '@theme/Layout'
7
+ import HomepageFeatures from '@site/src/components/HomepageFeatures'
8
+
9
+ import styles from './index.module.css'
10
+
11
+ function HomepageHeader() {
12
+ const { siteConfig } = useDocusaurusContext()
13
+ return (
14
+ <header className={clsx('hero hero--primary', styles.heroBanner)}>
15
+ <div className="container">
16
+ <h1 className="hero__title">{siteConfig.title}</h1>
17
+ <p className="hero__subtitle">{siteConfig.tagline}</p>
18
+ <div className={styles.buttons}>
19
+ <Link className="button button--primary button--lg" to="/docs/category/upgrade-guide">
20
+ Upgrade from V4 to V5
21
+ </Link>
22
+ <Link className="button button--secondary button--lg" to="/docs/getting-started">
23
+ Getting Started with V5
24
+ </Link>
25
+ </div>
26
+ </div>
27
+ </header>
28
+ )
29
+ }
30
+
31
+ export default function Home(): JSX.Element {
32
+ // const { siteConfig } = useDocusaurusContext()
33
+ return (
34
+ // <Layout title={`${siteConfig.title}`} description="Awesome React Tooltip component">
35
+ <Layout title="Welcome" description="Awesome React Tooltip component">
36
+ <HomepageHeader />
37
+ <main>
38
+ <HomepageFeatures />
39
+ </main>
40
+ </Layout>
41
+ )
42
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Markdown page example
3
+ ---
4
+
5
+ # Markdown page example
6
+
7
+ You don't need React to write simple standalone pages.
File without changes
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#FFF" d="M99 52h84v34H99z"/><path d="M23 163c-7.398 0-13.843-4.027-17.303-10A19.886 19.886 0 0 0 3 163c0 11.046 8.954 20 20 20h20v-20H23z" fill="#3ECC5F"/><path d="M112.98 57.376L183 53V43c0-11.046-8.954-20-20-20H73l-2.5-4.33c-1.112-1.925-3.889-1.925-5 0L63 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L53 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L43 23c-.022 0-.042.003-.065.003l-4.142-4.141c-1.57-1.571-4.252-.853-4.828 1.294l-1.369 5.104-5.192-1.392c-2.148-.575-4.111 1.389-3.535 3.536l1.39 5.193-5.102 1.367c-2.148.576-2.867 3.259-1.296 4.83l4.142 4.142c0 .021-.003.042-.003.064l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 53l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 63l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 73l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 83l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 93l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 103l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 113l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 123l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 133l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 143l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 153l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 163c0 11.046 8.954 20 20 20h120c11.046 0 20-8.954 20-20V83l-70.02-4.376A10.645 10.645 0 0 1 103 68c0-5.621 4.37-10.273 9.98-10.624" fill="#3ECC5F"/><path fill="#3ECC5F" d="M143 183h30v-40h-30z"/><path d="M193 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 190.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M153 123h30v-20h-30z"/><path d="M193 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 183 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M63 55.5a2.5 2.5 0 0 1-2.5-2.5c0-4.136-3.364-7.5-7.5-7.5s-7.5 3.364-7.5 7.5a2.5 2.5 0 1 1-5 0c0-6.893 5.607-12.5 12.5-12.5S65.5 46.107 65.5 53a2.5 2.5 0 0 1-2.5 2.5" fill="#000"/><path d="M103 183h60c11.046 0 20-8.954 20-20V93h-60c-11.046 0-20 8.954-20 20v70z" fill="#FFFF50"/><path d="M168.02 124h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0-49.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 19.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2M183 61.611c-.012 0-.022-.006-.034-.005-3.09.105-4.552 3.196-5.842 5.923-1.346 2.85-2.387 4.703-4.093 4.647-1.889-.068-2.969-2.202-4.113-4.46-1.314-2.594-2.814-5.536-5.963-5.426-3.046.104-4.513 2.794-5.807 5.167-1.377 2.528-2.314 4.065-4.121 3.994-1.927-.07-2.951-1.805-4.136-3.813-1.321-2.236-2.848-4.75-5.936-4.664-2.994.103-4.465 2.385-5.763 4.4-1.373 2.13-2.335 3.428-4.165 3.351-1.973-.07-2.992-1.51-4.171-3.177-1.324-1.873-2.816-3.993-5.895-3.89-2.928.1-4.399 1.97-5.696 3.618-1.232 1.564-2.194 2.802-4.229 2.724a1 1 0 0 0-.072 2c3.017.101 4.545-1.8 5.872-3.487 1.177-1.496 2.193-2.787 4.193-2.855 1.926-.082 2.829 1.115 4.195 3.045 1.297 1.834 2.769 3.914 5.731 4.021 3.103.104 4.596-2.215 5.918-4.267 1.182-1.834 2.202-3.417 4.15-3.484 1.793-.067 2.769 1.35 4.145 3.681 1.297 2.197 2.766 4.686 5.787 4.796 3.125.108 4.634-2.62 5.949-5.035 1.139-2.088 2.214-4.06 4.119-4.126 1.793-.042 2.728 1.595 4.111 4.33 1.292 2.553 2.757 5.445 5.825 5.556l.169.003c3.064 0 4.518-3.075 5.805-5.794 1.139-2.41 2.217-4.68 4.067-4.773v-2z" fill="#000"/><path fill="#3ECC5F" d="M83 183h40v-40H83z"/><path d="M143 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 140.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M83 123h40v-20H83z"/><path d="M133 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 123 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M143 41.75c-.16 0-.33-.02-.49-.05a2.52 2.52 0 0 1-.47-.14c-.15-.06-.29-.14-.431-.23-.13-.09-.259-.2-.38-.31-.109-.12-.219-.24-.309-.38s-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.16.02-.33.05-.49.03-.16.08-.31.139-.47.061-.15.141-.29.231-.43.09-.13.2-.26.309-.38.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.65-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.11.12.22.25.31.38.09.14.17.28.23.43.06.16.11.31.14.47.029.16.05.33.05.49 0 .66-.271 1.31-.73 1.77-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19m20-1.25c-.66 0-1.3-.27-1.771-.73a3.802 3.802 0 0 1-.309-.38c-.09-.14-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.66.27-1.3.729-1.77.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.66-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.459.47.73 1.11.73 1.77 0 .16-.021.33-.05.49-.03.16-.08.32-.14.47-.07.15-.14.29-.23.43-.09.13-.2.26-.31.38-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19" fill="#000"/></g></svg>