@nejcm/react-skeleton-emotion
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -153,3 +153,3 @@ 'use strict'; | ||
function _templateObject$2() { | ||
var data = _taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
var data = _taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
@@ -156,0 +156,0 @@ _templateObject$2 = function () { |
@@ -146,3 +146,3 @@ import _extends from '@babel/runtime/helpers/extends'; | ||
function _templateObject$2() { | ||
var data = _taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
var data = _taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
@@ -149,0 +149,0 @@ _templateObject$2 = function () { |
@@ -242,3 +242,3 @@ (function (global, factory) { | ||
function _templateObject$2() { | ||
var data = taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
var data = taggedTemplateLiteral(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]); | ||
@@ -245,0 +245,0 @@ _templateObject$2 = function () { |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("prop-types"),require("react"),require("@emotion/styled")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","@emotion/styled"],n):n((e=e||self).NejcmReactSkeletonEmotion={},e.PropTypes,e.React,e.EmotionStyled)}(this,(function(e,n,t,r){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var a="default"in t?t.default:t;r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var i=function(e,n){return e(n={exports:{}},n.exports),n.exports}((function(e){function n(){return e.exports=n=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},n.apply(this,arguments)}e.exports=n}));var o=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a};var l=function(e,n){if(null==e)return{};var t,r,a=o(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a};var c=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e};function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=function(e){return e?"string"==typeof e?e:"".concat(e,"px"):void 0},m=function(e){var n=e.width,t=e.maxWidth,r=e.minWidth,a=e.height,i=e.maxHeight,o=e.minHeight,c=e.style,s=l(e,["width","maxWidth","minWidth","height","maxHeight","minHeight","style"]);return u({style:u({width:d(n),maxWidth:d(t),minWidth:d(r),height:d(a),maxHeight:d(i),minHeight:d(o)},c)},s)};var f=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))};function p(){var e=f([""]);return p=function(){return e},e}var h=r.div(p());function v(){var e=f([""]);return v=function(){return e},e}var g=r.div(v());function b(){var e=f(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]);return b=function(){return e},e}var y=r.div(b()),O=function(e){var n=e.active,t=void 0===n||n,r=e.darkTheme,o=e.className,c=l(e,["active","darkTheme","className"]);return a.createElement(y,i({className:"skeleton ".concat(o||"").concat(t?" s-active":" s-inactive").concat(r?" s-dark":"")},c))};O.Rectangle=function(e){var n=e.className,t=l(e,["className"]);return a.createElement(g,i({className:"s-rect s-loader ".concat(n||"")},m(t)))},O.Circle=function(e){var n=e.className,t=l(e,["className"]);return a.createElement(h,i({className:"s-circ s-loader ".concat(n||"")},m(t)))};var w=function(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r};var E=function(e){if(Array.isArray(e))return w(e)};var j=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)};var P=function(e,n){if(e){if("string"==typeof e)return w(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,n):void 0}};var N=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var k=function(e){return E(e)||j(e)||P(e)||N()};function x(){var e=f(["\n .s-header {\n height: 2rem;\n margin-bottom: 1.25rem;\n }\n\n .s-line {\n height: 1.25rem;\n margin-bottom: 0.75rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n"]);return x=function(){return e},e}var S=r.div(x()),A=function(e){var n=e.header,t=e.lines,r=void 0===t?3:t,o=e.widths,c=void 0===o?["100%","100%","75%","35%","50%","85%"]:o,s=e.skeletonProps,u=e.className,d=e.children,m=l(e,["header","lines","widths","skeletonProps","className","children"]),f=c.length||0;return a.createElement(O,s,a.createElement(S,i({className:"s-paragraph ".concat(u||"")},m),n&&a.createElement(O.Rectangle,{className:"s-header",width:"50%"}),r>0?k(Array(r)).map((function(e,n){return a.createElement(O.Rectangle,{key:n,className:"s-line",width:c[n%f]||"100%"})})):null,d))};function R(){var e=f(["\n border: solid 1px rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1.25rem;\n\n .s-image {\n margin-bottom: 1rem;\n }\n"]);return R=function(){return e},e}var W=r.div(R());function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function H(){var e=f(["\n display: table;\n width: 100%;\n\n > * {\n display: table-cell;\n\n &:first-of-type {\n padding-right: 1.5rem;\n vertical-align: top;\n }\n\n &:last-of-type {\n width: 100%;\n vertical-align: middle;\n }\n }\n"]);return H=function(){return e},e}var C=r.div(H());function T(){var e=f(["\n .s-label {\n height: 1rem;\n max-width: 150px;\n margin-bottom: 0.3rem;\n }\n .s-input {\n height: 2.5rem;\n margin-bottom: 1.2rem;\n }\n .s-button {\n height: 2.5rem;\n max-width: 175px;\n }\n"]);return T=function(){return e},e}var z=r.div(T());function I(){var e=f(["\n display: flex;\n flex-wrap: wrap;\n margin: -1rem;\n overflow: hidden;\n\n > * {\n flex: 1 1 auto;\n padding: 1rem;\n }\n"]);return I=function(){return e},e}var q=r.div(I());function F(){var e=f(["\n width: 100%;\n border-collapse: collapse;\n\n th,\n td {\n padding: 0.8rem;\n border-bottom: solid 1px rgba(0, 0, 0, 0.1);\n }\n\n th {\n .s-cell {\n display: flex;\n height: 2rem;\n }\n }\n\n td {\n .s-cell {\n display: flex;\n height: 1.25rem;\n }\n }\n"]);return F=function(){return e},e}var M=r.table(F());e.Card=function(e){var n=e.width,t=e.maxWidth,r=e.image,o=e.header,s=e.paragraph,u=e.skeletonProps,m=e.className,f=e.children,p=e.style,h=l(e,["width","maxWidth","image","header","paragraph","skeletonProps","className","children","style"]),v=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({width:d(n),maxWidth:d(t)},p);return a.createElement(O,u,a.createElement(W,i({className:"s-card ".concat(m||""),style:v},h),r?a.createElement(O.Rectangle,{className:"s-image",height:200}):null,o||s?a.createElement(A,{header:o,lines:s?3:0,skeletonProps:u}):null,f))},e.Comment=function(e){var n=e.avatarSize,t=void 0===n?45:n,r=e.avatarCircle,o=void 0===r||r,c=e.lines,s=void 0===c?3:c,u=e.skeletonProps,d=e.className,m=e.children,f=l(e,["avatarSize","avatarCircle","lines","skeletonProps","className","children"]);return a.createElement(O,u,a.createElement(C,i({className:"s-comment ".concat(d||"")},f),a.createElement("div",null,o?a.createElement(O.Circle,{className:"s-avatar",width:t,height:t}):a.createElement(O.Rectangle,{className:"s-avatar",width:t,height:t})),a.createElement("div",null,a.createElement(A,{header:!1,lines:s}),m)))},e.Form=function(e){var n=e.inputs,r=void 0===n?3:n,o=e.inputHeight,c=e.button,s=void 0===c||c,u=e.label,m=void 0===u||u,f=e.widths,p=void 0===f?["100%"]:f,h=e.className,v=e.children,g=e.skeletonProps,b=l(e,["inputs","inputHeight","button","label","widths","className","children","skeletonProps"]),y=p.length||0,w=o?{height:d(o)}:void 0;return a.createElement(O,g,a.createElement(z,i({className:"s-form ".concat(h||"")},b),k(Array(r)).map((function(e,n){return a.createElement(t.Fragment,{key:n},m?a.createElement(O.Rectangle,{className:"s-label"}):null,a.createElement(O.Rectangle,{key:n,className:"s-input",width:p[n%y]||"100%",style:w}))})),s?a.createElement(O.Rectangle,{className:"s-button",style:w}):null,v))},e.Grid=function(e){var n=e.cols,t=void 0===n?3:n,r=e.className,o=e.skeletonProps,c=e.children,s=l(e,["cols","className","skeletonProps","children"]);return a.createElement(O,o,a.createElement(q,i({className:"s-grid ".concat(r||"")},s),t>0?k(Array(t)).map((function(e,n){return a.createElement("div",{key:n},"function"==typeof c?c(n):c)})):null))},e.Paragraph=A,e.Table=function(e){var n=e.head,t=void 0===n||n,r=e.rows,o=void 0===r?3:r,c=e.cols,s=void 0===c?4:c,u=e.widths,d=void 0===u?["100%","100%","75%","35%","50%","85%"]:u,m=e.skeletonProps,f=e.className,p=e.children,h=l(e,["head","rows","cols","widths","skeletonProps","className","children"]),v=Array.isArray(s),g=k(Array(o)),b=v?s:k(Array(s)),y=d.length,w=b.map((function(e,n){return a.createElement("td",{key:"c-".concat(n),style:v?void 0:{width:d[n%y]}},a.createElement(O.Rectangle,{as:"span",width:"100%",className:"s-cell"}))}));return a.createElement(O,m,a.createElement(M,i({className:"s-table ".concat(f||"")},h),t?a.createElement("thead",null,a.createElement("tr",null,b.map((function(e,n){return a.createElement("th",{key:n,align:"left"},e||a.createElement(O.Rectangle,{as:"span",width:"100%",className:"s-cell"}))})))):null,a.createElement("tbody",null,g.map((function(e,n){return a.createElement("tr",{key:n},w)})),p)))},e.default=O,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("prop-types"),require("react"),require("@emotion/styled")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","@emotion/styled"],n):n((e=e||self).NejcmReactSkeletonEmotion={},e.PropTypes,e.React,e.EmotionStyled)}(this,(function(e,n,t,r){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var a="default"in t?t.default:t;r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var i=function(e,n){return e(n={exports:{}},n.exports),n.exports}((function(e){function n(){return e.exports=n=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},n.apply(this,arguments)}e.exports=n}));var o=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a};var l=function(e,n){if(null==e)return{};var t,r,a=o(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a};var c=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e};function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=function(e){return e?"string"==typeof e?e:"".concat(e,"px"):void 0},m=function(e){var n=e.width,t=e.maxWidth,r=e.minWidth,a=e.height,i=e.maxHeight,o=e.minHeight,c=e.style,s=l(e,["width","maxWidth","minWidth","height","maxHeight","minHeight","style"]);return u({style:u({width:d(n),maxWidth:d(t),minWidth:d(r),height:d(a),maxHeight:d(i),minHeight:d(o)},c)},s)};var f=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))};function p(){var e=f([""]);return p=function(){return e},e}var h=r.div(p());function v(){var e=f([""]);return v=function(){return e},e}var g=r.div(v());function b(){var e=f(["\n .s-loader {\n position: relative;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.055);\n\n &:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n rgba(0, 0, 0, 0.07),\n rgba(0, 0, 0, 0)\n );\n transform: translateX(-100%);\n }\n }\n\n &.s-active {\n .s-loader {\n &:after {\n animation: loading 1.75s 0.5s infinite;\n }\n }\n }\n\n &.s-inactive {\n .s-loader {\n &:after {\n animation: none;\n }\n }\n }\n\n &.s-dark {\n .s-loader {\n background-color: rgba(255, 255, 255, 0.175);\n &:after {\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.12),\n rgba(255, 255, 255, 0)\n );\n }\n }\n }\n\n @keyframes loading {\n 100% {\n transform: translateX(100%);\n }\n }\n\n .s-rect {\n border-radius: 2px;\n }\n .s-circ {\n border-radius: 50%;\n }\n"]);return b=function(){return e},e}var y=r.div(b()),O=function(e){var n=e.active,t=void 0===n||n,r=e.darkTheme,o=e.className,c=l(e,["active","darkTheme","className"]);return a.createElement(y,i({className:"skeleton ".concat(o||"").concat(t?" s-active":" s-inactive").concat(r?" s-dark":"")},c))};O.Rectangle=function(e){var n=e.className,t=l(e,["className"]);return a.createElement(g,i({className:"s-rect s-loader ".concat(n||"")},m(t)))},O.Circle=function(e){var n=e.className,t=l(e,["className"]);return a.createElement(h,i({className:"s-circ s-loader ".concat(n||"")},m(t)))};var w=function(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r};var E=function(e){if(Array.isArray(e))return w(e)};var j=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)};var P=function(e,n){if(e){if("string"==typeof e)return w(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,n):void 0}};var N=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var k=function(e){return E(e)||j(e)||P(e)||N()};function x(){var e=f(["\n .s-header {\n height: 2rem;\n margin-bottom: 1.25rem;\n }\n\n .s-line {\n height: 1.25rem;\n margin-bottom: 0.75rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n"]);return x=function(){return e},e}var S=r.div(x()),A=function(e){var n=e.header,t=e.lines,r=void 0===t?3:t,o=e.widths,c=void 0===o?["100%","100%","75%","35%","50%","85%"]:o,s=e.skeletonProps,u=e.className,d=e.children,m=l(e,["header","lines","widths","skeletonProps","className","children"]),f=c.length||0;return a.createElement(O,s,a.createElement(S,i({className:"s-paragraph ".concat(u||"")},m),n&&a.createElement(O.Rectangle,{className:"s-header",width:"50%"}),r>0?k(Array(r)).map((function(e,n){return a.createElement(O.Rectangle,{key:n,className:"s-line",width:c[n%f]||"100%"})})):null,d))};function R(){var e=f(["\n border: solid 1px rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1.25rem;\n\n .s-image {\n margin-bottom: 1rem;\n }\n"]);return R=function(){return e},e}var W=r.div(R());function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function H(){var e=f(["\n display: table;\n width: 100%;\n\n > * {\n display: table-cell;\n\n &:first-of-type {\n padding-right: 1.5rem;\n vertical-align: top;\n }\n\n &:last-of-type {\n width: 100%;\n vertical-align: middle;\n }\n }\n"]);return H=function(){return e},e}var C=r.div(H());function T(){var e=f(["\n .s-label {\n height: 1rem;\n max-width: 150px;\n margin-bottom: 0.3rem;\n }\n .s-input {\n height: 2.5rem;\n margin-bottom: 1.2rem;\n }\n .s-button {\n height: 2.5rem;\n max-width: 175px;\n }\n"]);return T=function(){return e},e}var z=r.div(T());function I(){var e=f(["\n display: flex;\n flex-wrap: wrap;\n margin: -1rem;\n overflow: hidden;\n\n > * {\n flex: 1 1 auto;\n padding: 1rem;\n }\n"]);return I=function(){return e},e}var q=r.div(I());function F(){var e=f(["\n width: 100%;\n border-collapse: collapse;\n\n th,\n td {\n padding: 0.8rem;\n border-bottom: solid 1px rgba(0, 0, 0, 0.1);\n }\n\n th {\n .s-cell {\n display: flex;\n height: 2rem;\n }\n }\n\n td {\n .s-cell {\n display: flex;\n height: 1.25rem;\n }\n }\n"]);return F=function(){return e},e}var M=r.table(F());e.Card=function(e){var n=e.width,t=e.maxWidth,r=e.image,o=e.header,s=e.paragraph,u=e.skeletonProps,m=e.className,f=e.children,p=e.style,h=l(e,["width","maxWidth","image","header","paragraph","skeletonProps","className","children","style"]),v=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){c(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({width:d(n),maxWidth:d(t)},p);return a.createElement(O,u,a.createElement(W,i({className:"s-card ".concat(m||""),style:v},h),r?a.createElement(O.Rectangle,{className:"s-image",height:200}):null,o||s?a.createElement(A,{header:o,lines:s?3:0,skeletonProps:u}):null,f))},e.Comment=function(e){var n=e.avatarSize,t=void 0===n?45:n,r=e.avatarCircle,o=void 0===r||r,c=e.lines,s=void 0===c?3:c,u=e.skeletonProps,d=e.className,m=e.children,f=l(e,["avatarSize","avatarCircle","lines","skeletonProps","className","children"]);return a.createElement(O,u,a.createElement(C,i({className:"s-comment ".concat(d||"")},f),a.createElement("div",null,o?a.createElement(O.Circle,{className:"s-avatar",width:t,height:t}):a.createElement(O.Rectangle,{className:"s-avatar",width:t,height:t})),a.createElement("div",null,a.createElement(A,{header:!1,lines:s}),m)))},e.Form=function(e){var n=e.inputs,r=void 0===n?3:n,o=e.inputHeight,c=e.button,s=void 0===c||c,u=e.label,m=void 0===u||u,f=e.widths,p=void 0===f?["100%"]:f,h=e.className,v=e.children,g=e.skeletonProps,b=l(e,["inputs","inputHeight","button","label","widths","className","children","skeletonProps"]),y=p.length||0,w=o?{height:d(o)}:void 0;return a.createElement(O,g,a.createElement(z,i({className:"s-form ".concat(h||"")},b),k(Array(r)).map((function(e,n){return a.createElement(t.Fragment,{key:n},m?a.createElement(O.Rectangle,{className:"s-label"}):null,a.createElement(O.Rectangle,{key:n,className:"s-input",width:p[n%y]||"100%",style:w}))})),s?a.createElement(O.Rectangle,{className:"s-button",style:w}):null,v))},e.Grid=function(e){var n=e.cols,t=void 0===n?3:n,r=e.className,o=e.skeletonProps,c=e.children,s=l(e,["cols","className","skeletonProps","children"]);return a.createElement(O,o,a.createElement(q,i({className:"s-grid ".concat(r||"")},s),t>0?k(Array(t)).map((function(e,n){return a.createElement("div",{key:n},"function"==typeof c?c(n):c)})):null))},e.Paragraph=A,e.Table=function(e){var n=e.head,t=void 0===n||n,r=e.rows,o=void 0===r?3:r,c=e.cols,s=void 0===c?4:c,u=e.widths,d=void 0===u?["100%","100%","75%","35%","50%","85%"]:u,m=e.skeletonProps,f=e.className,p=e.children,h=l(e,["head","rows","cols","widths","skeletonProps","className","children"]),v=Array.isArray(s),g=k(Array(o)),b=v?s:k(Array(s)),y=d.length,w=b.map((function(e,n){return a.createElement("td",{key:"c-".concat(n),style:v?void 0:{width:d[n%y]}},a.createElement(O.Rectangle,{as:"span",width:"100%",className:"s-cell"}))}));return a.createElement(O,m,a.createElement(M,i({className:"s-table ".concat(f||"")},h),t?a.createElement("thead",null,a.createElement("tr",null,b.map((function(e,n){return a.createElement("th",{key:n,align:"left"},e||a.createElement(O.Rectangle,{as:"span",width:"100%",className:"s-cell"}))})))):null,a.createElement("tbody",null,g.map((function(e,n){return a.createElement("tr",{key:n},w)})),p)))},e.default=O,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=react-skeleton-emotion.umd.min.js.map |
{ | ||
"name": "@nejcm/react-skeleton-emotion", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"author": "Nejc Mursic <nmursi2@gmail.com> (https://github.com/nejcm)", | ||
@@ -48,3 +48,2 @@ "description": "React skeleton loader that allows customization with some predefined templates.", | ||
"peerDependencies": { | ||
"@babel/runtime": ">=7", | ||
"@emotion/styled": ">=10", | ||
@@ -57,10 +56,10 @@ "@emotion/core": ">=10", | ||
"dependencies": { | ||
"@babel/runtime": "^7.10.2" | ||
"@babel/runtime": "^7.10.4" | ||
}, | ||
"devDependencies": { | ||
"@babel/compat-data": "^7.10.1", | ||
"@babel/helpers": "^7.10.1", | ||
"@babel/plugin-proposal-class-properties": "^7.10.1", | ||
"@babel/plugin-transform-runtime": "^7.10.1", | ||
"@babel/preset-typescript": "^7.10.1", | ||
"@babel/compat-data": "^7.10.4", | ||
"@babel/helpers": "^7.10.4", | ||
"@babel/plugin-proposal-class-properties": "^7.10.4", | ||
"@babel/plugin-transform-runtime": "^7.10.4", | ||
"@babel/preset-typescript": "^7.10.4", | ||
"@emotion/styled": "^10.0.27", | ||
@@ -74,3 +73,3 @@ "@emotion/core": "^10.0.28", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/react": "^16.9.35", | ||
"@types/react": "^16.9.41", | ||
"babel-loader": "^8.1.0", | ||
@@ -85,17 +84,17 @@ "babel-plugin-minify-dead-code-elimination": "^0.5.1", | ||
"dotenv": "^8.2.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-kentcdodds": "^14.13.0", | ||
"eslint": "^7.4.0", | ||
"eslint-config-kentcdodds": "^14.14.1", | ||
"eslint-config-react-app": "^5.2.1", | ||
"eslint-loader": "^4.0.2", | ||
"eslint-plugin-babel": "5.3.0", | ||
"eslint-plugin-flowtype": "^5.1.3", | ||
"eslint-plugin-babel": "5.3.1", | ||
"eslint-plugin-flowtype": "^5.2.0", | ||
"eslint-plugin-html": "^6.0.2", | ||
"eslint-plugin-import": "^2.21.1", | ||
"eslint-plugin-jsx-a11y": "6.2.3", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-jsx-a11y": "6.3.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.20.0", | ||
"eslint-plugin-react-hooks": "^4.0.4", | ||
"eslint-plugin-react": "^7.20.3", | ||
"eslint-plugin-react-hooks": "^4.0.6", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"kcd-scripts": "^6.2.1", | ||
"kcd-scripts": "^6.2.4", | ||
"prettier": "^2.0.5", | ||
@@ -107,9 +106,9 @@ "prop-types": "^15.7.2", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.15.0", | ||
"rollup": "^2.21.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"semantic-release": "^17.0.8", | ||
"semantic-release": "^17.1.1", | ||
"serve": "^11.3.2", | ||
"style-loader": "^1.2.1", | ||
"typescript": "^3.9.5" | ||
"typescript": "^3.9.6" | ||
}, | ||
@@ -116,0 +115,0 @@ "browserslist": [ |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
158918
6
Updated@babel/runtime@^7.10.4