@cypress-design/react-tooltip 0.6.0 → 0.6.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/ReadMe.md +16 -15
- package/Tooltip.rootstory.tsx +4 -4
- package/Tooltip.tsx +0 -1
- package/TooltipReact.cy.tsx +2 -2
- package/dist/Tooltip.d.ts +0 -1
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/index.es.mjs +3 -1
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +3 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,5 +2,5 @@ $ yarn build:module && yarn build:types
|
|
|
2
2
|
$ rollup -c ./rollup.config.mjs
|
|
3
3
|
[36m
|
|
4
4
|
[1m./index.ts[22m → [1m./dist/index.umd.js, ./dist/index.es.mjs[22m...[39m
|
|
5
|
-
[32mcreated [1m./dist/index.umd.js, ./dist/index.es.mjs[22m in [
|
|
5
|
+
[32mcreated [1m./dist/index.umd.js, ./dist/index.es.mjs[22m in [1m29.8s[22m[39m
|
|
6
6
|
$ tsc --project ./tsconfig.build.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @cypress-design/react-tooltip
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#245](https://github.com/cypress-io/cypress-design/pull/245) [`d52d023`](https://github.com/cypress-io/cypress-design/commit/d52d02301bb851d514661a8c258d0c4ae5baf171) Thanks [@elevatebart](https://github.com/elevatebart)! - use tailwind to rollup classes in the final package
|
|
8
|
+
|
|
9
|
+
## 0.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`08ba16d`](https://github.com/cypress-io/cypress-design/commit/08ba16da4a8663676ee96ac4950938857bd0d9a3) Thanks [@elevatebart](https://github.com/elevatebart)! - fix wind-keep plugin
|
|
14
|
+
|
|
3
15
|
## 0.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/ReadMe.md
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
# Tooltip
|
|
2
2
|
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
Use the tooltip component to display a message when the user hovers over an element.
|
|
6
|
-
For accessibility, it also triggers on focus.
|
|
7
|
-
|
|
8
|
-
To allow focus, one has to add `tabIndex="0"` to the Tooltip element.
|
|
9
|
-
|
|
10
|
-
```jsx live
|
|
11
|
-
export const comp = () => (
|
|
12
|
-
<Tooltip tabIndex="0" popper={<b>popper</b>}>
|
|
13
|
-
<span>Focus me</span>
|
|
14
|
-
</Tooltip>
|
|
15
|
-
)
|
|
16
|
-
```
|
|
17
|
-
|
|
18
3
|
## Install
|
|
19
4
|
|
|
20
5
|
```bash
|
|
@@ -26,3 +11,19 @@ or with yarn
|
|
|
26
11
|
```bash
|
|
27
12
|
yarn add @cypress-design/react-tooltip
|
|
28
13
|
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import Tooltip from '@cypress-design/react-tooltip'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
> tip: To allow focus, one has to add `tabIndex="0"` to the Tooltip element.
|
|
22
|
+
|
|
23
|
+
```jsx live
|
|
24
|
+
export const comp = () => (
|
|
25
|
+
<Tooltip tabIndex="0" popper={<b>popper</b>}>
|
|
26
|
+
<span>Focus me</span>
|
|
27
|
+
</Tooltip>
|
|
28
|
+
)
|
|
29
|
+
```
|
package/Tooltip.rootstory.tsx
CHANGED
|
@@ -6,12 +6,12 @@ export default ({
|
|
|
6
6
|
color = 'light',
|
|
7
7
|
placement,
|
|
8
8
|
disabled,
|
|
9
|
-
|
|
9
|
+
tabindex,
|
|
10
10
|
}: {
|
|
11
11
|
color?: 'light' | 'dark'
|
|
12
12
|
placement?: Placement
|
|
13
13
|
disabled?: boolean
|
|
14
|
-
|
|
14
|
+
tabindex?: number
|
|
15
15
|
} = {}) => (
|
|
16
16
|
<div className="flex flex-col items-center center gap-20">
|
|
17
17
|
<Tooltip
|
|
@@ -19,7 +19,7 @@ export default ({
|
|
|
19
19
|
popper={<div className="p-4 text-gray-800 bg-jade-200">PopovDyn</div>}
|
|
20
20
|
color={color}
|
|
21
21
|
placement={placement}
|
|
22
|
-
tabIndex={
|
|
22
|
+
tabIndex={tabindex}
|
|
23
23
|
disabled={disabled}
|
|
24
24
|
>
|
|
25
25
|
<div>Hover Me (dynamic: {placement?.toString()})</div>
|
|
@@ -51,7 +51,7 @@ export default ({
|
|
|
51
51
|
placement={placement}
|
|
52
52
|
key={placement}
|
|
53
53
|
color={color}
|
|
54
|
-
tabIndex={
|
|
54
|
+
tabIndex={tabindex}
|
|
55
55
|
disabled={disabled}
|
|
56
56
|
popper={
|
|
57
57
|
<div className="p-4 text-gray-800 bg-jade-200">
|
package/Tooltip.tsx
CHANGED
package/TooltipReact.cy.tsx
CHANGED
|
@@ -7,8 +7,8 @@ import assertions from '../assertions'
|
|
|
7
7
|
|
|
8
8
|
describe('Tooltip', { viewportHeight: 800, viewportWidth: 800 }, () => {
|
|
9
9
|
function mountStory(options: Parameters<typeof TooltipStory>[0] = {}) {
|
|
10
|
-
mount(<TooltipStory {...options}
|
|
10
|
+
mount(<TooltipStory {...options} tabindex={1} />)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
assertions(mountStory)
|
|
13
|
+
assertions(mountStory, 'react')
|
|
14
14
|
})
|
package/dist/Tooltip.d.ts
CHANGED
package/dist/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"./","sources":["Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAaV,MAAM,qCAAqC,CAAA;AAE5C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"./","sources":["Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAaV,MAAM,qCAAqC,CAAA;AAE5C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AASD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAC5B,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAiL/C,CAAA;AAED,eAAe,OAAO,CAAA"}
|
package/dist/index.es.mjs
CHANGED
|
@@ -16,6 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
16
16
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
17
|
PERFORMANCE OF THIS SOFTWARE.
|
|
18
18
|
***************************************************************************** */
|
|
19
|
+
/* global Reflect, Promise */
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
var __assign = function() {
|
|
21
23
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -33536,4 +33538,4 @@ var Tooltip = function (_a) {
|
|
|
33536
33538
|
export { Tooltip as default };
|
|
33537
33539
|
//# sourceMappingURL=index.es.mjs.map
|
|
33538
33540
|
|
|
33539
|
-
/* <
|
|
33541
|
+
/* <wind-keep class="container stroke-none fill-white block text-gray-900 shadow-gray-100 border-transparent bg-white fill-gray-900 text-white shadow-gray-800 bg-gray-900 rounded shadow border invisible absolute z-10 transform filter text-[16px] leading-[24px] min-w-[160px] text-center p-[8px] relative z-20 drop-shadow"> */
|