@entur/tooltip
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -6,12 +6,20 @@ # Change Log | ||
# [1.0.0](https://bitbucket.org/enturas/design-system/compare/@entur/tooltip@0.2.0...@entur/tooltip@1.0.0) (2019-10-22) | ||
### Code Refactoring | ||
- **tooltip:** use named exports instead of default exports ([ad487aa](https://bitbucket.org/enturas/design-system/commits/ad487aa63a591fa979b7d57cb804426cc54ed3b7)) | ||
### BREAKING CHANGES | ||
- **tooltip:** Change from default export to named export (Tooltip) | ||
# 0.2.0 (2019-09-25) | ||
### Bug Fixes | ||
* added tooltip on child-focus ([df9921d](https://bitbucket.org/enturas/design-system/commits/df9921d)) | ||
- added tooltip on child-focus ([df9921d](https://bitbucket.org/enturas/design-system/commits/df9921d)) | ||
### Features | ||
* **tooltip:** tooltip component added ([2c0b449](https://bitbucket.org/enturas/design-system/commits/2c0b449)) | ||
- **tooltip:** tooltip component added ([2c0b449](https://bitbucket.org/enturas/design-system/commits/2c0b449)) |
@@ -1,11 +0,14 @@ | ||
import React from 'react'; | ||
import './styles.scss'; | ||
declare type placements = 'top-left' | 'top' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right'; | ||
interface TooltipProps { | ||
placement: placements; | ||
import React from "react"; | ||
declare type Placements = 'top-left' | 'top' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right'; | ||
declare type TooltipProps = { | ||
/** Plassering av tooltip-en */ | ||
placement: Placements; | ||
/** Innholdet i tooltip-boksen */ | ||
content: string; | ||
/** Elementet som skal ha tooltip-funksjonalitet */ | ||
children: React.ReactNode; | ||
/** Ekstra klassenavn */ | ||
className?: string; | ||
} | ||
}; | ||
declare const Tooltip: React.FC<TooltipProps>; | ||
export default Tooltip; | ||
export { Placements, Tooltip }; |
@@ -59,3 +59,3 @@ 'use strict'; | ||
exports.default = Tooltip; | ||
exports.Tooltip = Tooltip; | ||
//# sourceMappingURL=tooltip.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),r=e(require("classnames"));exports.default=function(e){var a=e.placement,o=e.content,u=e.children,c=e.className,i=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(e,["placement","content","children","className"]),l=t.useState(!1),s=l[0],f=l[1];return n.createElement("div",{className:"entur-tooltip-wrapper",onMouseLeave:function(){return f(!1)}},n.createElement("div",Object.assign({className:r("entur-tooltip",c,"entur-tooltip--"+a),role:"tooltip","aria-hidden":!s},i),o),n.createElement("span",{className:"entur-tooltip--trigger",onMouseOver:function(){return f(!0)},onFocus:function(){return f(!0)},onBlur:function(){return f(!1)},"aria-describedby":o},u))}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),n=e(t),r=e(require("classnames"));exports.Tooltip=function(e){var o=e.placement,a=e.content,u=e.children,c=e.className,i=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}(e,["placement","content","children","className"]),l=t.useState(!1),s=l[0],f=l[1];return n.createElement("div",{className:"entur-tooltip-wrapper",onMouseLeave:function(){return f(!1)}},n.createElement("div",Object.assign({className:r("entur-tooltip",c,"entur-tooltip--"+o),role:"tooltip","aria-hidden":!s},i),a),n.createElement("span",{className:"entur-tooltip--trigger",onMouseOver:function(){return f(!0)},onFocus:function(){return f(!0)},onBlur:function(){return f(!1)},"aria-describedby":a},u))}; | ||
//# sourceMappingURL=tooltip.cjs.production.min.js.map |
@@ -54,3 +54,3 @@ import React, { useState } from 'react'; | ||
export default Tooltip; | ||
export { Tooltip }; | ||
//# sourceMappingURL=tooltip.esm.js.map |
{ | ||
"name": "@entur/tooltip", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"license": "EUPL-1.2", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "b76e024c8c2e90ebd84155451bc8fc7632ffc4de" | ||
"gitHead": "77dbc3aa668a5bcb32c44145191a24849d10e3e8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36231
242
2
13