@fremtind/jkl-typography-react
Advanced tools
Comparing version 2.3.18 to 2.4.0
@@ -0,72 +1,7 @@ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
function makeTypographyComponent(variant, textStyle, modifier) { | ||
@@ -103,56 +38,2 @@ return function typography(_ref) { | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var classnames = createCommonjsModule(function (module) { | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
/* global define */ | ||
(function () { | ||
var hasOwn = {}.hasOwnProperty; | ||
function classNames () { | ||
var classes = []; | ||
for (var i = 0; i < arguments.length; i++) { | ||
var arg = arguments[i]; | ||
if (!arg) continue; | ||
var argType = typeof arg; | ||
if (argType === 'string' || argType === 'number') { | ||
classes.push(arg); | ||
} else if (Array.isArray(arg) && arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} else if (argType === 'object') { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
} | ||
} | ||
return classes.join(' '); | ||
} | ||
if ( module.exports) { | ||
classNames.default = classNames; | ||
module.exports = classNames; | ||
} else { | ||
window.classNames = classNames; | ||
} | ||
}()); | ||
}); | ||
var classnames_1 = classnames.named; | ||
var warningHasBeenShown = false; | ||
@@ -175,3 +56,3 @@ var Link = function Link(_ref) { | ||
return /*#__PURE__*/React.createElement("a", _extends({ | ||
className: classnames("jkl-link", className, { | ||
className: classNames("jkl-link", className, { | ||
"jkl-link--negative": negative, | ||
@@ -192,3 +73,3 @@ "jkl-link--external": external | ||
inverted = _ref.inverted; | ||
var componentClassName = classnames("jkl-form-support-label", className, { | ||
var componentClassName = classNames("jkl-form-support-label", className, { | ||
"jkl-form-support-label--compact": forceCompact, | ||
@@ -227,3 +108,3 @@ "jkl-form-support-label--error": errorLabel, | ||
htmlFor = _ref.htmlFor; | ||
var className = classnames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var className = classNames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var C = standAlone ? "label" : "span"; | ||
@@ -230,0 +111,0 @@ |
@@ -1,7 +0,1 @@ | ||
import e from"react";function n(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function t(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},l=Object.keys(e);for(t=0;t<l.length;t++)r=l[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t<l.length;t++)r=l[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function o(n,o,l){return function(a){var s=a.children,i=a.className,c=t(a,["children","className"]),p=(l||n).replace(/^\w/,(function(e){return e.toUpperCase()}));"development"===process.env.NODE_ENV&&console.warn('ATTENTION! The typographic components in jkl-core, like "'.concat(p,'", are deprecated. Please stop using them and start using typographic CSS classes or the jkl-text-style Sass mixin instead. Refer to the documentation for more info.'));var u=n;return e.createElement(u,r({className:"".concat(o," ").concat(i||"")},c),s)}}var l=o("h1","jkl-title-large"),a=o("h2","jkl-title-small"),s=o("h3","jkl-heading-large"),i=o("h4","jkl-heading-medium"),c=o("h5","jkl-heading-small"),p=o("p","jkl-lead","lead"),u=o("p","jkl-body","body"),m=o("p","jkl-small","small"),d=o("p","jkl-micro","micro");var f=function(e,n){return e(n={exports:{}},n.exports),n.exports}((function(e){ | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
!function(){var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var l=typeof o;if("string"===l||"number"===l)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===l)for(var s in o)n.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()})),h=(f.named,!1),b=function(n){var o=n.negative,l=void 0!==o&&o,a=n.external,s=void 0!==a&&a,i=n.children,c=n.className,p=void 0===c?"":c,u=t(n,["negative","external","children","className"]);return"production"===process.env.NODE_ENV||h||(console.warn("WARNING: This version of the Link component is deprecated! Please use the Link component found in @fremtind/jkl-core instead"),h=!0),e.createElement("a",r({className:f("jkl-link",p,{"jkl-link--negative":l,"jkl-link--external":s})},u),i)},v=!1,j=function(n){var r=n.id,t=n.helpLabel,o=n.errorLabel,l=n.forceCompact,a=n.className,s=n.srOnly,i=n.inverted,c=f("jkl-form-support-label",a,{"jkl-form-support-label--compact":l,"jkl-form-support-label--error":o,"jkl-form-support-label--help":!o,"jkl-form-support-label--sr-only":s,"jkl-form-support-label--inverted":i});return"production"===process.env.NODE_ENV||v||(console.warn("WARNING: This version of the SupportLabel component is deprecated! Please use the SupportLabel component found in @fremtind/jkl-core instead"),v=!0),o||t?e.createElement("span",{id:r,className:c},o||t):null},k=!1;function N(r){var t,o=r.variant,l=void 0===o?"medium":o,a=r.forceCompact,s=r.srOnly,i=r.children,c=r.standAlone,p=r.htmlFor,u=f("jkl-label",(n(t={},"jkl-label--".concat(l),l),n(t,"jkl-label--compact",a),n(t,"jkl-label--sr-only",s),t)),m=c?"label":"span";return!c&&p&&(p=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),"production"===process.env.NODE_ENV||k||(console.warn("WARNING: This version of the Label component is deprecated! Please use the Label component found in @fremtind/jkl-core instead"),k=!0),e.createElement(m,{className:u,htmlFor:p},i)}export{u as Body,l as H1,a as H2,s as H3,i as H4,c as H5,N as Label,p as Lead,b as Link,d as Micro,m as Small,j as SupportLabel}; | ||
import e from"@babel/runtime/helpers/extends";import o from"@babel/runtime/helpers/objectWithoutProperties";import n from"react";import l from"classnames";import r from"@babel/runtime/helpers/defineProperty";function t(l,r,t){return function(a){var s=a.children,i=a.className,c=o(a,["children","className"]),p=(t||l).replace(/^\w/,(function(e){return e.toUpperCase()}));"development"===process.env.NODE_ENV&&console.warn('ATTENTION! The typographic components in jkl-core, like "'.concat(p,'", are deprecated. Please stop using them and start using typographic CSS classes or the jkl-text-style Sass mixin instead. Refer to the documentation for more info.'));var m=l;return n.createElement(m,e({className:"".concat(r," ").concat(i||"")},c),s)}}var a=t("h1","jkl-title-large"),s=t("h2","jkl-title-small"),i=t("h3","jkl-heading-large"),c=t("h4","jkl-heading-medium"),p=t("h5","jkl-heading-small"),m=t("p","jkl-lead","lead"),d=t("p","jkl-body","body"),u=t("p","jkl-small","small"),h=t("p","jkl-micro","micro"),f=!1,k=function(r){var t=r.negative,a=void 0!==t&&t,s=r.external,i=void 0!==s&&s,c=r.children,p=r.className,m=void 0===p?"":p,d=o(r,["negative","external","children","className"]);return"production"===process.env.NODE_ENV||f||(console.warn("WARNING: This version of the Link component is deprecated! Please use the Link component found in @fremtind/jkl-core instead"),f=!0),n.createElement("a",e({className:l("jkl-link",m,{"jkl-link--negative":a,"jkl-link--external":i})},d),c)},b=!1,N=function(e){var o=e.id,r=e.helpLabel,t=e.errorLabel,a=e.forceCompact,s=e.className,i=e.srOnly,c=e.inverted,p=l("jkl-form-support-label",s,{"jkl-form-support-label--compact":a,"jkl-form-support-label--error":t,"jkl-form-support-label--help":!t,"jkl-form-support-label--sr-only":i,"jkl-form-support-label--inverted":c});return"production"===process.env.NODE_ENV||b||(console.warn("WARNING: This version of the SupportLabel component is deprecated! Please use the SupportLabel component found in @fremtind/jkl-core instead"),b=!0),t||r?n.createElement("span",{id:o,className:p},t||r):null},j=!1;function v(e){var o,t=e.variant,a=void 0===t?"medium":t,s=e.forceCompact,i=e.srOnly,c=e.children,p=e.standAlone,m=e.htmlFor,d=l("jkl-label",(r(o={},"jkl-label--".concat(a),a),r(o,"jkl-label--compact",s),r(o,"jkl-label--sr-only",i),o)),u=p?"label":"span";return!p&&m&&(m=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),"production"===process.env.NODE_ENV||j||(console.warn("WARNING: This version of the Label component is deprecated! Please use the Label component found in @fremtind/jkl-core instead"),j=!0),n.createElement(u,{className:d,htmlFor:m},c)}export{d as Body,a as H1,s as H2,i as H3,c as H4,p as H5,v as Label,m as Lead,k as Link,h as Micro,u as Small,N as SupportLabel}; |
@@ -7,73 +7,8 @@ 'use strict'; | ||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends')); | ||
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties')); | ||
var React = _interopDefault(require('react')); | ||
var classNames = _interopDefault(require('classnames')); | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
function makeTypographyComponent(variant, textStyle, modifier) { | ||
@@ -110,56 +45,2 @@ return function typography(_ref) { | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var classnames = createCommonjsModule(function (module) { | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
/* global define */ | ||
(function () { | ||
var hasOwn = {}.hasOwnProperty; | ||
function classNames () { | ||
var classes = []; | ||
for (var i = 0; i < arguments.length; i++) { | ||
var arg = arguments[i]; | ||
if (!arg) continue; | ||
var argType = typeof arg; | ||
if (argType === 'string' || argType === 'number') { | ||
classes.push(arg); | ||
} else if (Array.isArray(arg) && arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} else if (argType === 'object') { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
} | ||
} | ||
return classes.join(' '); | ||
} | ||
if ( module.exports) { | ||
classNames.default = classNames; | ||
module.exports = classNames; | ||
} else { | ||
window.classNames = classNames; | ||
} | ||
}()); | ||
}); | ||
var classnames_1 = classnames.named; | ||
var warningHasBeenShown = false; | ||
@@ -182,3 +63,3 @@ var Link = function Link(_ref) { | ||
return /*#__PURE__*/React.createElement("a", _extends({ | ||
className: classnames("jkl-link", className, { | ||
className: classNames("jkl-link", className, { | ||
"jkl-link--negative": negative, | ||
@@ -199,3 +80,3 @@ "jkl-link--external": external | ||
inverted = _ref.inverted; | ||
var componentClassName = classnames("jkl-form-support-label", className, { | ||
var componentClassName = classNames("jkl-form-support-label", className, { | ||
"jkl-form-support-label--compact": forceCompact, | ||
@@ -234,3 +115,3 @@ "jkl-form-support-label--error": errorLabel, | ||
htmlFor = _ref.htmlFor; | ||
var className = classnames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var className = classNames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var C = standAlone ? "label" : "span"; | ||
@@ -237,0 +118,0 @@ |
@@ -0,72 +1,7 @@ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
function makeTypographyComponent(variant, textStyle, modifier) { | ||
@@ -103,56 +38,2 @@ return function typography(_ref) { | ||
function createCommonjsModule(fn, module) { | ||
return module = { exports: {} }, fn(module, module.exports), module.exports; | ||
} | ||
var classnames = createCommonjsModule(function (module) { | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
/* global define */ | ||
(function () { | ||
var hasOwn = {}.hasOwnProperty; | ||
function classNames () { | ||
var classes = []; | ||
for (var i = 0; i < arguments.length; i++) { | ||
var arg = arguments[i]; | ||
if (!arg) continue; | ||
var argType = typeof arg; | ||
if (argType === 'string' || argType === 'number') { | ||
classes.push(arg); | ||
} else if (Array.isArray(arg) && arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} else if (argType === 'object') { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
} | ||
} | ||
return classes.join(' '); | ||
} | ||
if ( module.exports) { | ||
classNames.default = classNames; | ||
module.exports = classNames; | ||
} else { | ||
window.classNames = classNames; | ||
} | ||
}()); | ||
}); | ||
var classnames_1 = classnames.named; | ||
var warningHasBeenShown = false; | ||
@@ -175,3 +56,3 @@ var Link = function Link(_ref) { | ||
return /*#__PURE__*/React.createElement("a", _extends({ | ||
className: classnames("jkl-link", className, { | ||
className: classNames("jkl-link", className, { | ||
"jkl-link--negative": negative, | ||
@@ -192,3 +73,3 @@ "jkl-link--external": external | ||
inverted = _ref.inverted; | ||
var componentClassName = classnames("jkl-form-support-label", className, { | ||
var componentClassName = classNames("jkl-form-support-label", className, { | ||
"jkl-form-support-label--compact": forceCompact, | ||
@@ -227,3 +108,3 @@ "jkl-form-support-label--error": errorLabel, | ||
htmlFor = _ref.htmlFor; | ||
var className = classnames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var className = classNames("jkl-label", (_classNames = {}, _defineProperty(_classNames, "jkl-label--".concat(variant), variant), _defineProperty(_classNames, "jkl-label--compact", forceCompact), _defineProperty(_classNames, "jkl-label--sr-only", srOnly), _classNames)); | ||
var C = standAlone ? "label" : "span"; | ||
@@ -230,0 +111,0 @@ |
@@ -1,7 +0,1 @@ | ||
import e from"react";function n(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function t(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},l=Object.keys(e);for(t=0;t<l.length;t++)r=l[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t<l.length;t++)r=l[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function o(n,o,l){return function(a){var s=a.children,i=a.className,c=t(a,["children","className"]),p=(l||n).replace(/^\w/,(function(e){return e.toUpperCase()}));"development"===process.env.NODE_ENV&&console.warn('ATTENTION! The typographic components in jkl-core, like "'.concat(p,'", are deprecated. Please stop using them and start using typographic CSS classes or the jkl-text-style Sass mixin instead. Refer to the documentation for more info.'));var u=n;return e.createElement(u,r({className:"".concat(o," ").concat(i||"")},c),s)}}var l=o("h1","jkl-title-large"),a=o("h2","jkl-title-small"),s=o("h3","jkl-heading-large"),i=o("h4","jkl-heading-medium"),c=o("h5","jkl-heading-small"),p=o("p","jkl-lead","lead"),u=o("p","jkl-body","body"),m=o("p","jkl-small","small"),d=o("p","jkl-micro","micro");var f=function(e,n){return e(n={exports:{}},n.exports),n.exports}((function(e){ | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
!function(){var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var l=typeof o;if("string"===l||"number"===l)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===l)for(var s in o)n.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()})),h=(f.named,!1),b=function(n){var o=n.negative,l=void 0!==o&&o,a=n.external,s=void 0!==a&&a,i=n.children,c=n.className,p=void 0===c?"":c,u=t(n,["negative","external","children","className"]);return"production"===process.env.NODE_ENV||h||(console.warn("WARNING: This version of the Link component is deprecated! Please use the Link component found in @fremtind/jkl-core instead"),h=!0),e.createElement("a",r({className:f("jkl-link",p,{"jkl-link--negative":l,"jkl-link--external":s})},u),i)},v=!1,j=function(n){var r=n.id,t=n.helpLabel,o=n.errorLabel,l=n.forceCompact,a=n.className,s=n.srOnly,i=n.inverted,c=f("jkl-form-support-label",a,{"jkl-form-support-label--compact":l,"jkl-form-support-label--error":o,"jkl-form-support-label--help":!o,"jkl-form-support-label--sr-only":s,"jkl-form-support-label--inverted":i});return"production"===process.env.NODE_ENV||v||(console.warn("WARNING: This version of the SupportLabel component is deprecated! Please use the SupportLabel component found in @fremtind/jkl-core instead"),v=!0),o||t?e.createElement("span",{id:r,className:c},o||t):null},k=!1;function N(r){var t,o=r.variant,l=void 0===o?"medium":o,a=r.forceCompact,s=r.srOnly,i=r.children,c=r.standAlone,p=r.htmlFor,u=f("jkl-label",(n(t={},"jkl-label--".concat(l),l),n(t,"jkl-label--compact",a),n(t,"jkl-label--sr-only",s),t)),m=c?"label":"span";return!c&&p&&(p=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),"production"===process.env.NODE_ENV||k||(console.warn("WARNING: This version of the Label component is deprecated! Please use the Label component found in @fremtind/jkl-core instead"),k=!0),e.createElement(m,{className:u,htmlFor:p},i)}export{u as Body,l as H1,a as H2,s as H3,i as H4,c as H5,N as Label,p as Lead,b as Link,d as Micro,m as Small,j as SupportLabel}; | ||
import e from"@babel/runtime/helpers/extends";import o from"@babel/runtime/helpers/objectWithoutProperties";import n from"react";import l from"classnames";import r from"@babel/runtime/helpers/defineProperty";function t(l,r,t){return function(a){var s=a.children,i=a.className,c=o(a,["children","className"]),p=(t||l).replace(/^\w/,(function(e){return e.toUpperCase()}));"development"===process.env.NODE_ENV&&console.warn('ATTENTION! The typographic components in jkl-core, like "'.concat(p,'", are deprecated. Please stop using them and start using typographic CSS classes or the jkl-text-style Sass mixin instead. Refer to the documentation for more info.'));var m=l;return n.createElement(m,e({className:"".concat(r," ").concat(i||"")},c),s)}}var a=t("h1","jkl-title-large"),s=t("h2","jkl-title-small"),i=t("h3","jkl-heading-large"),c=t("h4","jkl-heading-medium"),p=t("h5","jkl-heading-small"),m=t("p","jkl-lead","lead"),d=t("p","jkl-body","body"),u=t("p","jkl-small","small"),h=t("p","jkl-micro","micro"),f=!1,k=function(r){var t=r.negative,a=void 0!==t&&t,s=r.external,i=void 0!==s&&s,c=r.children,p=r.className,m=void 0===p?"":p,d=o(r,["negative","external","children","className"]);return"production"===process.env.NODE_ENV||f||(console.warn("WARNING: This version of the Link component is deprecated! Please use the Link component found in @fremtind/jkl-core instead"),f=!0),n.createElement("a",e({className:l("jkl-link",m,{"jkl-link--negative":a,"jkl-link--external":i})},d),c)},b=!1,N=function(e){var o=e.id,r=e.helpLabel,t=e.errorLabel,a=e.forceCompact,s=e.className,i=e.srOnly,c=e.inverted,p=l("jkl-form-support-label",s,{"jkl-form-support-label--compact":a,"jkl-form-support-label--error":t,"jkl-form-support-label--help":!t,"jkl-form-support-label--sr-only":i,"jkl-form-support-label--inverted":c});return"production"===process.env.NODE_ENV||b||(console.warn("WARNING: This version of the SupportLabel component is deprecated! Please use the SupportLabel component found in @fremtind/jkl-core instead"),b=!0),t||r?n.createElement("span",{id:o,className:p},t||r):null},j=!1;function v(e){var o,t=e.variant,a=void 0===t?"medium":t,s=e.forceCompact,i=e.srOnly,c=e.children,p=e.standAlone,m=e.htmlFor,d=l("jkl-label",(r(o={},"jkl-label--".concat(a),a),r(o,"jkl-label--compact",s),r(o,"jkl-label--sr-only",i),o)),u=p?"label":"span";return!p&&m&&(m=void 0,"production"!==process.env.NODE_ENV&&console.warn("WARNING: The standard Label component renders as a <span> element, which does not take a htmlFor prop. If you want the Label to belong to a specific input, use the standAlone prop, which renders as a <label> element instead. In most cases the Label component should not be used directly, as it is part of all our input components.")),"production"===process.env.NODE_ENV||j||(console.warn("WARNING: This version of the Label component is deprecated! Please use the Label component found in @fremtind/jkl-core instead"),j=!0),n.createElement(u,{className:d,htmlFor:m},c)}export{d as Body,a as H1,s as H2,i as H3,c as H4,p as H5,v as Label,m as Lead,k as Link,h as Micro,u as Small,N as SupportLabel}; |
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.4.0](https://github.com/fremtind/jokul/compare/@fremtind/jkl-typography-react@2.3.18...@fremtind/jkl-typography-react@2.4.0) (2020-07-29) | ||
### Features | ||
* **build:** use @babel/runtime instead of inlining helpers in each file ([bbadce5](https://github.com/fremtind/jokul/commit/bbadce52ba4da5d540b479b07273332587bed436)), closes [#1136](https://github.com/fremtind/jokul/issues/1136) | ||
## 2.3.18 (2020-07-08) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@fremtind/jkl-typography-react", | ||
"version": "2.3.18", | ||
"version": "2.4.0", | ||
"publishConfig": { | ||
@@ -40,3 +40,5 @@ "access": "public" | ||
"dependencies": { | ||
"@fremtind/jkl-core": "^4.8.0" | ||
"@babel/runtime": "^7.9.0", | ||
"@fremtind/jkl-core": "^4.9.0", | ||
"classnames": "^2.2.6" | ||
}, | ||
@@ -56,3 +58,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "bcd9aa0bc572427d843935c7ed4cd67185e8b621" | ||
"gitHead": "4fb5d732a85a32d7c79d0502e530adbdfbd49eab" | ||
} |
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
46263
7
413
+ Added@babel/runtime@^7.9.0
+ Addedclassnames@^2.2.6
Updated@fremtind/jkl-core@^4.9.0