Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@entur/loader

Package Overview
Dependencies
Maintainers
10
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/loader - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Change Log

## [0.4.5](https://bitbucket.org/enturas/design-system/compare/@entur/loader@0.4.4...@entur/loader@0.4.5) (2022-02-09)
**Note:** Version bump only for package @entur/loader
## [0.4.4](https://bitbucket.org/enturas/design-system/compare/@entur/loader@0.4.3...@entur/loader@0.4.4) (2021-11-17)

@@ -8,0 +12,0 @@

71

dist/loader.cjs.development.js

@@ -5,9 +5,12 @@ 'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var utils = require('@entur/utils');
var React = _interopDefault(require('react'));
var classNames = _interopDefault(require('classnames'));
var React = require('react');
var classNames = require('classnames');
var typography = require('@entur/typography');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
function _extends() {

@@ -46,2 +49,3 @@ _extends = Object.assign || function (target) {

var _excluded$5 = ["children", "className", "progress"];
var Loader = function Loader(_ref) {

@@ -52,3 +56,3 @@ var children = _ref.children,

progress = _ref$progress === void 0 ? 'indeterminate' : _ref$progress,
rest = _objectWithoutPropertiesLoose(_ref, ["children", "className", "progress"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);

@@ -64,16 +68,16 @@ var isIndeterminate = progress === 'indeterminate';

return React.createElement("div", Object.assign({
className: classNames('eds-loader', className),
return React__default["default"].createElement("div", _extends({
className: classNames__default["default"]('eds-loader', className),
role: "alert",
"aria-busy": true,
"aria-live": "polite"
}, rest), children && React.createElement(typography.Heading5, {
}, rest), children && React__default["default"].createElement(typography.Heading5, {
as: "div",
className: "eds-loader__label"
}, children), React.createElement("div", {
className: classNames('eds-loader__bar', {
}, children), React__default["default"].createElement("div", {
className: classNames__default["default"]('eds-loader__bar', {
'eds-loader__bar--indeterminate': isIndeterminate
}),
style: styles
}), progress !== 'indeterminate' && React.createElement(typography.SmallText, {
}), progress !== 'indeterminate' && React__default["default"].createElement(typography.SmallText, {
className: "eds-loader__percentage"

@@ -83,9 +87,10 @@ }, progress, " %"));

var _excluded$4 = ["className", "style"];
var BaseSkeleton = function BaseSkeleton(_ref) {
var className = _ref.className,
style = _ref.style,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "style"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
return React.createElement("div", Object.assign({
className: classNames('eds-skeleton', 'eds-skeleton--animate', className),
return React__default["default"].createElement("div", _extends({
className: classNames__default["default"]('eds-skeleton', 'eds-skeleton--animate', className),
role: "alert",

@@ -98,2 +103,3 @@ "aria-busy": true,

var _excluded$3 = ["className", "width", "height"];
var SkeletonRectangle = function SkeletonRectangle(_ref) {

@@ -103,6 +109,6 @@ var className = _ref.className,

height = _ref.height,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "width", "height"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
return React.createElement(BaseSkeleton, Object.assign({
className: classNames('eds-skeleton-rectangle', className),
return React__default["default"].createElement(BaseSkeleton, _extends({
className: classNames__default["default"]('eds-skeleton-rectangle', className),
style: _extends({

@@ -115,9 +121,10 @@ width: width,

var _excluded$2 = ["className", "size"];
var SkeletonCircle = function SkeletonCircle(_ref) {
var className = _ref.className,
size = _ref.size,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "size"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
return React.createElement(BaseSkeleton, Object.assign({
className: classNames(className, 'eds-skeleton-circle'),
return React__default["default"].createElement(BaseSkeleton, _extends({
className: classNames__default["default"](className, 'eds-skeleton-circle'),
style: _extends({

@@ -130,9 +137,10 @@ width: size,

var _excluded$1 = ["className", "children"];
var SkeletonWrapper = function SkeletonWrapper(_ref) {
var className = _ref.className,
children = _ref.children,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "children"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
return React.createElement("div", Object.assign({
className: classNames('eds-skeleton-wrapper', className),
return React__default["default"].createElement("div", _extends({
className: classNames__default["default"]('eds-skeleton-wrapper', className),
role: "alert",

@@ -144,2 +152,3 @@ "aria-busy": true,

var _excluded = ["color", "className"];
var LoadingDots = function LoadingDots(_ref) {

@@ -149,12 +158,12 @@ var _ref$color = _ref.color,

className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["color", "className"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
return React.createElement("div", Object.assign({
className: classNames('eds-loading-dots', "eds-loading-dots--color-" + color, className),
return React__default["default"].createElement("div", _extends({
className: classNames__default["default"]('eds-loading-dots', "eds-loading-dots--color-" + color, className),
style: _extends({}, rest.style)
}, rest), React.createElement(LoadingDot, {
}, rest), React__default["default"].createElement(LoadingDot, {
dotNumber: "one"
}), React.createElement(LoadingDot, {
}), React__default["default"].createElement(LoadingDot, {
dotNumber: "two"
}), React.createElement(LoadingDot, {
}), React__default["default"].createElement(LoadingDot, {
dotNumber: "three"

@@ -166,4 +175,4 @@ }));

var dotNumber = _ref2.dotNumber;
return React.createElement("span", {
className: classNames('eds-loading-dots__dot', "eds-loading-dots__dot--" + dotNumber)
return React__default["default"].createElement("span", {
className: classNames__default["default"]('eds-loading-dots__dot', "eds-loading-dots__dot--" + dotNumber)
});

@@ -170,0 +179,0 @@ };

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@entur/utils"),a=e(require("react")),r=e(require("classnames")),s=require("@entur/typography");function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function n(e,t){if(null==e)return{};var a,r,s={},l=Object.keys(e);for(r=0;r<l.length;r++)t.indexOf(a=l[r])>=0||(s[a]=e[a]);return s}var i=function(e){var t=e.className,s=e.style,l=n(e,["className","style"]);return a.createElement("div",Object.assign({className:r("eds-skeleton","eds-skeleton--animate",t),role:"alert","aria-busy":!0,"aria-live":"polite",style:s},l))},o=function(e){return a.createElement("span",{className:r("eds-loading-dots__dot","eds-loading-dots__dot--"+e.dotNumber)})};t.warnAboutMissingStyles("loader","typography"),exports.Loader=function(e){var t=e.children,l=e.className,i=e.progress,o=void 0===i?"indeterminate":i,c=n(e,["children","className","progress"]),d="indeterminate"===o,m={};return d||(m={"--loader-width":o+"%"}),a.createElement("div",Object.assign({className:r("eds-loader",l),role:"alert","aria-busy":!0,"aria-live":"polite"},c),t&&a.createElement(s.Heading5,{as:"div",className:"eds-loader__label"},t),a.createElement("div",{className:r("eds-loader__bar",{"eds-loader__bar--indeterminate":d}),style:m}),"indeterminate"!==o&&a.createElement(s.SmallText,{className:"eds-loader__percentage"},o," %"))},exports.LoadingDots=function(e){var t=e.color,s=void 0===t?"blue":t,i=e.className,c=n(e,["color","className"]);return a.createElement("div",Object.assign({className:r("eds-loading-dots","eds-loading-dots--color-"+s,i),style:l({},c.style)},c),a.createElement(o,{dotNumber:"one"}),a.createElement(o,{dotNumber:"two"}),a.createElement(o,{dotNumber:"three"}))},exports.SkeletonCircle=function(e){var t=e.className,s=e.size,o=n(e,["className","size"]);return a.createElement(i,Object.assign({className:r(t,"eds-skeleton-circle"),style:l({width:s,height:s},o.style)},o))},exports.SkeletonRectangle=function(e){var t=e.className,s=e.width,o=e.height,c=n(e,["className","width","height"]);return a.createElement(i,Object.assign({className:r("eds-skeleton-rectangle",t),style:l({width:s,height:o},c.style)},c))},exports.SkeletonWrapper=function(e){var t=e.className,s=e.children,l=n(e,["className","children"]);return a.createElement("div",Object.assign({className:r("eds-skeleton-wrapper",t),role:"alert","aria-busy":!0,"aria-live":"polite"},l),s)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),t=require("react"),a=require("classnames"),r=require("@entur/typography");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),n=l(a);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},d.apply(this,arguments)}function o(e,t){if(null==e)return{};var a,r,l={},s=Object.keys(e);for(r=0;r<s.length;r++)t.indexOf(a=s[r])>=0||(l[a]=e[a]);return l}var i=["children","className","progress"],c=["className","style"],u=function(e){var t=e.className,a=e.style,r=o(e,c);return s.default.createElement("div",d({className:n.default("eds-skeleton","eds-skeleton--animate",t),role:"alert","aria-busy":!0,"aria-live":"polite",style:a},r))},m=["className","width","height"],f=["className","size"],p=["className","children"],N=["color","className"],v=function(e){return s.default.createElement("span",{className:n.default("eds-loading-dots__dot","eds-loading-dots__dot--"+e.dotNumber)})};e.warnAboutMissingStyles("loader","typography"),exports.Loader=function(e){var t=e.children,a=e.className,l=e.progress,c=void 0===l?"indeterminate":l,u=o(e,i),m="indeterminate"===c,f={};return m||(f={"--loader-width":c+"%"}),s.default.createElement("div",d({className:n.default("eds-loader",a),role:"alert","aria-busy":!0,"aria-live":"polite"},u),t&&s.default.createElement(r.Heading5,{as:"div",className:"eds-loader__label"},t),s.default.createElement("div",{className:n.default("eds-loader__bar",{"eds-loader__bar--indeterminate":m}),style:f}),"indeterminate"!==c&&s.default.createElement(r.SmallText,{className:"eds-loader__percentage"},c," %"))},exports.LoadingDots=function(e){var t=e.color,a=void 0===t?"blue":t,r=e.className,l=o(e,N);return s.default.createElement("div",d({className:n.default("eds-loading-dots","eds-loading-dots--color-"+a,r),style:d({},l.style)},l),s.default.createElement(v,{dotNumber:"one"}),s.default.createElement(v,{dotNumber:"two"}),s.default.createElement(v,{dotNumber:"three"}))},exports.SkeletonCircle=function(e){var t=e.className,a=e.size,r=o(e,f);return s.default.createElement(u,d({className:n.default(t,"eds-skeleton-circle"),style:d({width:a,height:a},r.style)},r))},exports.SkeletonRectangle=function(e){var t=e.className,a=e.width,r=e.height,l=o(e,m);return s.default.createElement(u,d({className:n.default("eds-skeleton-rectangle",t),style:d({width:a,height:r},l.style)},l))},exports.SkeletonWrapper=function(e){var t=e.className,a=e.children,r=o(e,p);return s.default.createElement("div",d({className:n.default("eds-skeleton-wrapper",t),role:"alert","aria-busy":!0,"aria-live":"polite"},r),a)};
//# sourceMappingURL=loader.cjs.production.min.js.map

@@ -39,2 +39,3 @@ import { warnAboutMissingStyles } from '@entur/utils';

var _excluded$5 = ["children", "className", "progress"];
var Loader = function Loader(_ref) {

@@ -45,3 +46,3 @@ var children = _ref.children,

progress = _ref$progress === void 0 ? 'indeterminate' : _ref$progress,
rest = _objectWithoutPropertiesLoose(_ref, ["children", "className", "progress"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);

@@ -57,3 +58,3 @@ var isIndeterminate = progress === 'indeterminate';

return React.createElement("div", Object.assign({
return React.createElement("div", _extends({
className: classNames('eds-loader', className),

@@ -76,8 +77,9 @@ role: "alert",

var _excluded$4 = ["className", "style"];
var BaseSkeleton = function BaseSkeleton(_ref) {
var className = _ref.className,
style = _ref.style,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "style"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
return React.createElement("div", Object.assign({
return React.createElement("div", _extends({
className: classNames('eds-skeleton', 'eds-skeleton--animate', className),

@@ -91,2 +93,3 @@ role: "alert",

var _excluded$3 = ["className", "width", "height"];
var SkeletonRectangle = function SkeletonRectangle(_ref) {

@@ -96,5 +99,5 @@ var className = _ref.className,

height = _ref.height,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "width", "height"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
return React.createElement(BaseSkeleton, Object.assign({
return React.createElement(BaseSkeleton, _extends({
className: classNames('eds-skeleton-rectangle', className),

@@ -108,8 +111,9 @@ style: _extends({

var _excluded$2 = ["className", "size"];
var SkeletonCircle = function SkeletonCircle(_ref) {
var className = _ref.className,
size = _ref.size,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "size"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
return React.createElement(BaseSkeleton, Object.assign({
return React.createElement(BaseSkeleton, _extends({
className: classNames(className, 'eds-skeleton-circle'),

@@ -123,8 +127,9 @@ style: _extends({

var _excluded$1 = ["className", "children"];
var SkeletonWrapper = function SkeletonWrapper(_ref) {
var className = _ref.className,
children = _ref.children,
rest = _objectWithoutPropertiesLoose(_ref, ["className", "children"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
return React.createElement("div", Object.assign({
return React.createElement("div", _extends({
className: classNames('eds-skeleton-wrapper', className),

@@ -137,2 +142,3 @@ role: "alert",

var _excluded = ["color", "className"];
var LoadingDots = function LoadingDots(_ref) {

@@ -142,5 +148,5 @@ var _ref$color = _ref.color,

className = _ref.className,
rest = _objectWithoutPropertiesLoose(_ref, ["color", "className"]);
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
return React.createElement("div", Object.assign({
return React.createElement("div", _extends({
className: classNames('eds-loading-dots', "eds-loading-dots--color-" + color, className),

@@ -147,0 +153,0 @@ style: _extends({}, rest.style)

{
"name": "@entur/loader",
"version": "0.4.4",
"version": "0.4.5",
"license": "EUPL-1.2",

@@ -20,6 +20,6 @@ "main": "dist/index.js",

"scripts": {
"start": "tsdx watch --noClean",
"build": "tsdx build",
"test": "tsdx test --env=jsdom",
"lint": "tsdx lint"
"start": "dts watch --noClean",
"build": "dts build",
"test": "dts test --env=jsdom",
"lint": "dts lint"
},

@@ -31,8 +31,8 @@ "peerDependencies": {

"dependencies": {
"@entur/tokens": "^3.3.0",
"@entur/typography": "^1.6.10",
"@entur/utils": "^0.4.2",
"@entur/tokens": "^3.3.1",
"@entur/typography": "^1.6.11",
"@entur/utils": "^0.4.3",
"classnames": "^2.3.1"
},
"gitHead": "6255452bbbb124b6569095cf08f96143873a7f8e"
"gitHead": "61e643371cfc5653c93160b7c220152e5b2bafeb"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc