@entur/loader
Advanced tools
Comparing version
@@ -11,26 +11,18 @@ 'use strict'; | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : 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 _extends = Object.assign ? Object.assign.bind() : function (n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
return n; | ||
}, _extends.apply(null, 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]; | ||
function _objectWithoutPropertiesLoose(r, e) { | ||
if (null == r) return {}; | ||
var t = {}; | ||
for (var n in r) if ({}.hasOwnProperty.call(r, n)) { | ||
if (e.includes(n)) continue; | ||
t[n] = r[n]; | ||
} | ||
return target; | ||
return t; | ||
} | ||
@@ -37,0 +29,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),a=require("react"),t=require("classnames"),r=require("@entur/typography");function s(){return s=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},s.apply(this,arguments)}function l(e,a){if(null==e)return{};var t,r,s={},l=Object.keys(e);for(r=0;r<l.length;r++)a.indexOf(t=l[r])>=0||(s[t]=e[t]);return s}var n=["children","className","progress"],i=["className","style"],o=function(e){var r=e.className,n=e.style,o=l(e,i);return a.createElement("div",s({className:t("eds-skeleton","eds-skeleton--animate",r),role:"alert","aria-busy":!0,"aria-live":"polite",style:n},o))},c=["className","width","height"],d=["className","size"],m=["className","children","loadingAriaLabel"],u=["color","className"],p=function(e){return a.createElement("span",{className:t("eds-loading-dots__dot","eds-loading-dots__dot--"+e.dotNumber)})},N=["className"];e.warnAboutMissingStyles("loader","typography"),exports.Loader=function(e){var i=e.children,o=e.className,c=e.progress,d=void 0===c?"indeterminate":c,m=l(e,n),u="indeterminate"===d,p={};return u||(p={"--loader-width":d+"%"}),a.createElement("div",s({className:t("eds-loader",o),role:"alert","aria-busy":!0,"aria-live":"polite"},m),i&&a.createElement(r.Heading5,{as:"div",className:"eds-loader__label"},i),a.createElement("div",{className:t("eds-loader__bar",{"eds-loader__bar--indeterminate":u}),style:p}),"indeterminate"!==d&&a.createElement(r.SmallText,{className:"eds-loader__percentage"},d," %"))},exports.LoadingDots=function(e){var r=e.color,n=void 0===r?"blue":r,i=e.className,o=l(e,u);return a.createElement("div",s({className:t("eds-loading-dots","eds-loading-dots--color-"+n,i),style:s({},o.style)},o),a.createElement(p,{dotNumber:"one"}),a.createElement(p,{dotNumber:"two"}),a.createElement(p,{dotNumber:"three"}))},exports.SkeletonCircle=function(e){var r=e.className,n=e.size,i=l(e,d);return a.createElement(o,s({className:t(r,"eds-skeleton-circle"),style:s({width:n,height:n},i.style)},i))},exports.SkeletonRectangle=function(e){var r=e.className,n=e.width,i=e.height,d=l(e,c);return a.createElement(o,s({className:t("eds-skeleton-rectangle",r),style:s({width:n,height:i},d.style)},d))},exports.SkeletonWrapper=function(e){var r=e.className,n=e.children,i=e.loadingAriaLabel,o=void 0===i?"Laster inn innhold …":i,c=l(e,m);return a.createElement("div",s({className:t("eds-skeleton-wrapper",r),role:"alert","aria-busy":!0,"aria-live":"polite","aria-label":o},c),n)},exports.Spinner=function(e){var r=e.className,n=l(e,N);return a.createElement(a.Fragment,null,a.createElement("div",s({className:t("eds-spinner",r),style:s({},n.style)},n)))}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),a=require("react"),r=require("classnames"),t=require("@entur/typography");function l(){return l=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l.apply(null,arguments)}function s(e,a){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(a.includes(t))continue;r[t]=e[t]}return r}var n=["children","className","progress"],i=["className","style"],o=function(e){var t=e.className,n=e.style,o=s(e,i);return a.createElement("div",l({className:r("eds-skeleton","eds-skeleton--animate",t),role:"alert","aria-busy":!0,"aria-live":"polite",style:n},o))},c=["className","width","height"],d=["className","size"],m=["className","children","loadingAriaLabel"],u=["color","className"],p=function(e){return a.createElement("span",{className:r("eds-loading-dots__dot","eds-loading-dots__dot--"+e.dotNumber)})},N=["className"];e.warnAboutMissingStyles("loader","typography"),exports.Loader=function(e){var i=e.children,o=e.className,c=e.progress,d=void 0===c?"indeterminate":c,m=s(e,n),u="indeterminate"===d,p={};return u||(p={"--loader-width":d+"%"}),a.createElement("div",l({className:r("eds-loader",o),role:"alert","aria-busy":!0,"aria-live":"polite"},m),i&&a.createElement(t.Heading5,{as:"div",className:"eds-loader__label"},i),a.createElement("div",{className:r("eds-loader__bar",{"eds-loader__bar--indeterminate":u}),style:p}),"indeterminate"!==d&&a.createElement(t.SmallText,{className:"eds-loader__percentage"},d," %"))},exports.LoadingDots=function(e){var t=e.color,n=void 0===t?"blue":t,i=e.className,o=s(e,u);return a.createElement("div",l({className:r("eds-loading-dots","eds-loading-dots--color-"+n,i),style:l({},o.style)},o),a.createElement(p,{dotNumber:"one"}),a.createElement(p,{dotNumber:"two"}),a.createElement(p,{dotNumber:"three"}))},exports.SkeletonCircle=function(e){var t=e.className,n=e.size,i=s(e,d);return a.createElement(o,l({className:r(t,"eds-skeleton-circle"),style:l({width:n,height:n},i.style)},i))},exports.SkeletonRectangle=function(e){var t=e.className,n=e.width,i=e.height,d=s(e,c);return a.createElement(o,l({className:r("eds-skeleton-rectangle",t),style:l({width:n,height:i},d.style)},d))},exports.SkeletonWrapper=function(e){var t=e.className,n=e.children,i=e.loadingAriaLabel,o=void 0===i?"Laster inn innhold …":i,c=s(e,m);return a.createElement("div",l({className:r("eds-skeleton-wrapper",t),role:"alert","aria-busy":!0,"aria-live":"polite","aria-label":o},c),n)},exports.Spinner=function(e){var t=e.className,n=s(e,N);return a.createElement(a.Fragment,null,a.createElement("div",l({className:r("eds-spinner",t),style:l({},n.style)},n)))}; | ||
//# sourceMappingURL=loader.cjs.production.min.js.map |
@@ -7,26 +7,18 @@ import { warnAboutMissingStyles } from '@entur/utils'; | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : 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 _extends = Object.assign ? Object.assign.bind() : function (n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
return n; | ||
}, _extends.apply(null, 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]; | ||
function _objectWithoutPropertiesLoose(r, e) { | ||
if (null == r) return {}; | ||
var t = {}; | ||
for (var n in r) if ({}.hasOwnProperty.call(r, n)) { | ||
if (e.includes(n)) continue; | ||
t[n] = r[n]; | ||
} | ||
return target; | ||
return t; | ||
} | ||
@@ -33,0 +25,0 @@ |
{ | ||
"name": "@entur/loader", | ||
"version": "0.5.15-alpha.0", | ||
"version": "0.5.15-beta.0", | ||
"license": "EUPL-1.2", | ||
@@ -30,8 +30,11 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@entur/tokens": "^3.17.3", | ||
"@entur/typography": "^1.8.50-alpha.0", | ||
"@entur/utils": "^1.0.0-alpha.0", | ||
"@entur/tokens": "^3.17.4-beta.0", | ||
"@entur/typography": "^1.8.50-beta.0", | ||
"@entur/utils": "^0.12.2-beta.0", | ||
"classnames": "^2.3.1" | ||
}, | ||
"gitHead": "b653c119e54372ec210ed20aa99ded642f114c69" | ||
"devDependencies": { | ||
"dts-cli": "2.0.5" | ||
}, | ||
"gitHead": "b213fa4fd10a1a07abada3fa987b7ee2ed110ac2" | ||
} |
@@ -5,3 +5,3 @@ # Loader | ||
> 💡 Looking for the [documentation](https://design.entur.no/komponenter/feedback/loaders)? | ||
> 💡 Looking for the [documentation](https://design.entur.no/komponenter/feedback/loader)? | ||
@@ -18,2 +18,2 @@ ## Installation | ||
Please refer to the [documentation](https://design.entur.no/komponenter/feedback/loaders) for usage information. | ||
Please refer to the [documentation](https://design.entur.no/komponenter/feedback/loader) for usage information. |
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
Sorry, the diff of this file is not supported yet
78685
0.73%1
Infinity%814
-1.93%- Removed
Updated
Updated