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

@ndla/core

Package Overview
Dependencies
Maintainers
5
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndla/core - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

es/animations.js
import spacing from './spacing';
var DURATION_DEFAULT = '400ms';
export default {

@@ -13,4 +11,4 @@ durations: {

fadeInLeft: function fadeInLeft(duration) {
return '\n animation-duration: ' + (duration || DURATION_DEFAULT) + ';\n animation-name: fadeIn;\n @keyframes fadeIn {\n 0% {\n transform: translateX(-' + spacing.small + ');\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }';
return "\n animation-duration: ".concat(duration || DURATION_DEFAULT, ";\n animation-name: fadeIn;\n @keyframes fadeIn {\n 0% {\n transform: translateX(-").concat(spacing.small, ");\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }");
}
};

@@ -1,11 +0,9 @@

export default {
mobile: '20em',
mobileWide: '29.75em',
tablet: '37.5625em',
tabletWide: '48em',
desktop: '61.3125em',
wide: '81.3125em',
ultraWide: '100.0625em'
mobile: "20em",
mobileWide: "29.75em",
tablet: "37.5625em",
tabletWide: "48em",
desktop: "61.3125em",
wide: "81.3125em",
ultraWide: "100.0625em"
};

@@ -1,3 +0,1 @@

var brandLight = '#ceddea';

@@ -7,3 +5,2 @@ var brandDark = '#184673';

var brandGreyLightest = '#f8f8f8';
export default {

@@ -20,2 +17,3 @@ /**

dark: brandDark,
/**

@@ -38,9 +36,7 @@ * NDLA Grays

},
subjectMaterial: {
light: '#dde9d0',
dark: '#5c6a4f',
additional: 'rgba(221,233,208,0.4)'
additional: "rgba(221,233,208,0.4)"
},
externalLearningResource: {

@@ -50,11 +46,9 @@ background: '#d0e8de',

dark: '#4f7d76',
additional: 'rgba(208,232,222,0.4)'
additional: "rgba(208,232,222,0.4)"
},
sourceMaterial: {
light: '#dce5e0',
dark: '#636e68',
additional: 'rgba(220,229,224,0.4)'
additional: "rgba(220,229,224,0.4)"
},
tasksAndActivities: {

@@ -64,5 +58,4 @@ background: '#f8e0c4',

dark: '#d98229',
additional: 'rgba(251,237,220,0.4)'
additional: "rgba(251,237,220,0.4)"
},
assessmentResource: {

@@ -72,5 +65,4 @@ background: '#efd5d5',

dark: '#c0676f',
additional: 'rgba(245,231,229,0.4)'
additional: "rgba(245,231,229,0.4)"
},
learningPath: {

@@ -80,3 +72,3 @@ background: '#f2efef',

dark: '#797979',
backgroundAdditional: 'rgba(232,227,227,0.4)'
backgroundAdditional: "rgba(232,227,227,0.4)"
},

@@ -96,7 +88,7 @@

red: '#d1372e',
redLight: 'rgba(209,55,46,0.3)',
redLight: "rgba(209,55,46,0.3)",
green: '#5cbc80',
greenLight: 'rgba(92,188,128,0.3)',
greenLight: "rgba(92,188,128,0.3)",
yellow: '#ead854',
yellowLight: 'rgba(234,216,84,0.3)'
yellowLight: "rgba(234,216,84,0.3)"
},

@@ -108,3 +100,2 @@ tableBg: '#f9fafb',

*/
link: 'inset 0 -1px',

@@ -118,5 +109,7 @@ linkHover: 'none',

background: {
default: '#ffffff' /* old: EFF0F2 (gray) */
, dark: '#e6e6e6',
darker: '#ccc',
default: '#ffffff'
/* old: EFF0F2 (gray) */
,
dark: "#e6e6e6",
darker: "#ccc",
backgroundGray: brandGreyLightest,

@@ -123,0 +116,0 @@ grayDark: '#e4e4e4'

@@ -11,4 +11,4 @@ export default {

sizes: function sizes(fontSize, lineHeightFactor) {
return lineHeightFactor ? "font-size: " + parseFloat(fontSize) + "px;\n line-height: " + parseFloat(lineHeightFactor) * parseFloat(fontSize) + "px;" : "font-size: " + parseFloat(fontSize) + "px;";
return lineHeightFactor ? "font-size: ".concat(parseFloat(fontSize), "px;\n line-height: ").concat(parseFloat(lineHeightFactor) * parseFloat(fontSize), "px;") : "font-size: ".concat(parseFloat(fontSize), "px;");
}
};
import facepaint from 'facepaint';
import breakpoints from './breakpoints';
export default {
tablet: facepaint(['@media (min-width: ' + breakpoints.tablet + ')']),
desktop: facepaint(['@media (min-width: ' + breakpoints.desktop + ')']),
mobile: facepaint(['@media (min-width: ' + breakpoints.mobile + ')']),
tablet: facepaint(["@media (min-width: ".concat(breakpoints.tablet, ")")]),
desktop: facepaint(["@media (min-width: ".concat(breakpoints.desktop, ")")]),
mobile: facepaint(["@media (min-width: ".concat(breakpoints.mobile, ")")]),
range: function range(_ref) {
var from = _ref.from,
until = _ref.until;
return '' + (from ? '@media (min-width: ' + from + ')' : '') + (from && until ? ' and ' : '') + (!from && until ? '@media ' : '') + (until ? '(max-width: ' + until + ')' : '');
return "".concat(from ? "@media (min-width: ".concat(from, ")") : '').concat(from && until ? ' and ' : '').concat(!from && until ? '@media ' : '').concat(until ? "(max-width: ".concat(until, ")") : '');
}
};
var spacingUnit = 26;
export default {
xsmall: spacingUnit / 4 + "px",
small: spacingUnit / 2 + "px",
normal: spacingUnit + "px",
medium: spacingUnit * 1.25 + "px",
large: spacingUnit * 2 + "px"
xsmall: "".concat(spacingUnit / 4, "px"),
small: "".concat(spacingUnit / 2, "px"),
normal: "".concat(spacingUnit, "px"),
medium: "".concat(spacingUnit * 1.25, "px"),
large: "".concat(spacingUnit * 2, "px")
};

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

'use strict';
"use strict";

@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", {

var _spacing = require('./spacing');
var _spacing = require("./spacing");

@@ -15,3 +15,2 @@ var _spacing2 = _interopRequireDefault(_spacing);

var DURATION_DEFAULT = '400ms';
exports.default = {

@@ -25,4 +24,4 @@ durations: {

fadeInLeft: function fadeInLeft(duration) {
return '\n animation-duration: ' + (duration || DURATION_DEFAULT) + ';\n animation-name: fadeIn;\n @keyframes fadeIn {\n 0% {\n transform: translateX(-' + _spacing2.default.small + ');\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }';
return "\n animation-duration: ".concat(duration || DURATION_DEFAULT, ";\n animation-name: fadeIn;\n @keyframes fadeIn {\n 0% {\n transform: translateX(-").concat(_spacing2.default.small, ");\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }");
}
};

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

'use strict';
"use strict";

@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {

exports.default = {
mobile: '20em',
mobileWide: '29.75em',
tablet: '37.5625em',
tabletWide: '48em',
desktop: '61.3125em',
wide: '81.3125em',
ultraWide: '100.0625em'
mobile: "20em",
mobileWide: "29.75em",
tablet: "37.5625em",
tabletWide: "48em",
desktop: "61.3125em",
wide: "81.3125em",
ultraWide: "100.0625em"
};

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

'use strict';
"use strict";

@@ -6,4 +6,2 @@ Object.defineProperty(exports, "__esModule", {

});
var brandLight = '#ceddea';

@@ -13,3 +11,2 @@ var brandDark = '#184673';

var brandGreyLightest = '#f8f8f8';
exports.default = {

@@ -26,2 +23,3 @@ /**

dark: brandDark,
/**

@@ -44,9 +42,7 @@ * NDLA Grays

},
subjectMaterial: {
light: '#dde9d0',
dark: '#5c6a4f',
additional: 'rgba(221,233,208,0.4)'
additional: "rgba(221,233,208,0.4)"
},
externalLearningResource: {

@@ -56,11 +52,9 @@ background: '#d0e8de',

dark: '#4f7d76',
additional: 'rgba(208,232,222,0.4)'
additional: "rgba(208,232,222,0.4)"
},
sourceMaterial: {
light: '#dce5e0',
dark: '#636e68',
additional: 'rgba(220,229,224,0.4)'
additional: "rgba(220,229,224,0.4)"
},
tasksAndActivities: {

@@ -70,5 +64,4 @@ background: '#f8e0c4',

dark: '#d98229',
additional: 'rgba(251,237,220,0.4)'
additional: "rgba(251,237,220,0.4)"
},
assessmentResource: {

@@ -78,5 +71,4 @@ background: '#efd5d5',

dark: '#c0676f',
additional: 'rgba(245,231,229,0.4)'
additional: "rgba(245,231,229,0.4)"
},
learningPath: {

@@ -86,3 +78,3 @@ background: '#f2efef',

dark: '#797979',
backgroundAdditional: 'rgba(232,227,227,0.4)'
backgroundAdditional: "rgba(232,227,227,0.4)"
},

@@ -102,7 +94,7 @@

red: '#d1372e',
redLight: 'rgba(209,55,46,0.3)',
redLight: "rgba(209,55,46,0.3)",
green: '#5cbc80',
greenLight: 'rgba(92,188,128,0.3)',
greenLight: "rgba(92,188,128,0.3)",
yellow: '#ead854',
yellowLight: 'rgba(234,216,84,0.3)'
yellowLight: "rgba(234,216,84,0.3)"
},

@@ -114,3 +106,2 @@ tableBg: '#f9fafb',

*/
link: 'inset 0 -1px',

@@ -124,5 +115,7 @@ linkHover: 'none',

background: {
default: '#ffffff' /* old: EFF0F2 (gray) */
, dark: '#e6e6e6',
darker: '#ccc',
default: '#ffffff'
/* old: EFF0F2 (gray) */
,
dark: "#e6e6e6",
darker: "#ccc",
backgroundGray: brandGreyLightest,

@@ -129,0 +122,0 @@ grayDark: '#e4e4e4'

@@ -16,4 +16,4 @@ "use strict";

sizes: function sizes(fontSize, lineHeightFactor) {
return lineHeightFactor ? "font-size: " + parseFloat(fontSize) + "px;\n line-height: " + parseFloat(lineHeightFactor) * parseFloat(fontSize) + "px;" : "font-size: " + parseFloat(fontSize) + "px;";
return lineHeightFactor ? "font-size: ".concat(parseFloat(fontSize), "px;\n line-height: ").concat(parseFloat(lineHeightFactor) * parseFloat(fontSize), "px;") : "font-size: ".concat(parseFloat(fontSize), "px;");
}
};

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

'use strict';
"use strict";

@@ -7,5 +7,5 @@ Object.defineProperty(exports, "__esModule", {

var _breakpoints = require('./breakpoints');
var _breakpoints = require("./breakpoints");
Object.defineProperty(exports, 'breakpoints', {
Object.defineProperty(exports, "breakpoints", {
enumerable: true,

@@ -17,5 +17,5 @@ get: function get() {

var _colors = require('./colors');
var _colors = require("./colors");
Object.defineProperty(exports, 'colors', {
Object.defineProperty(exports, "colors", {
enumerable: true,

@@ -27,5 +27,5 @@ get: function get() {

var _fonts = require('./fonts');
var _fonts = require("./fonts");
Object.defineProperty(exports, 'fonts', {
Object.defineProperty(exports, "fonts", {
enumerable: true,

@@ -37,5 +37,5 @@ get: function get() {

var _spacing = require('./spacing');
var _spacing = require("./spacing");
Object.defineProperty(exports, 'spacing', {
Object.defineProperty(exports, "spacing", {
enumerable: true,

@@ -47,5 +47,5 @@ get: function get() {

var _mq = require('./mq');
var _mq = require("./mq");
Object.defineProperty(exports, 'mq', {
Object.defineProperty(exports, "mq", {
enumerable: true,

@@ -57,5 +57,5 @@ get: function get() {

var _misc = require('./misc');
var _misc = require("./misc");
Object.defineProperty(exports, 'misc', {
Object.defineProperty(exports, "misc", {
enumerable: true,

@@ -67,5 +67,5 @@ get: function get() {

var _shadows = require('./shadows');
var _shadows = require("./shadows");
Object.defineProperty(exports, 'shadows', {
Object.defineProperty(exports, "shadows", {
enumerable: true,

@@ -77,5 +77,5 @@ get: function get() {

var _animations = require('./animations');
var _animations = require("./animations");
Object.defineProperty(exports, 'animations', {
Object.defineProperty(exports, "animations", {
enumerable: true,

@@ -82,0 +82,0 @@ get: function get() {

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

'use strict';
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", {

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

'use strict';
"use strict";

@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {

var _facepaint = require('facepaint');
var _facepaint = require("facepaint");
var _facepaint2 = _interopRequireDefault(_facepaint);
var _breakpoints = require('./breakpoints');
var _breakpoints = require("./breakpoints");

@@ -19,10 +19,10 @@ var _breakpoints2 = _interopRequireDefault(_breakpoints);

exports.default = {
tablet: (0, _facepaint2.default)(['@media (min-width: ' + _breakpoints2.default.tablet + ')']),
desktop: (0, _facepaint2.default)(['@media (min-width: ' + _breakpoints2.default.desktop + ')']),
mobile: (0, _facepaint2.default)(['@media (min-width: ' + _breakpoints2.default.mobile + ')']),
tablet: (0, _facepaint2.default)(["@media (min-width: ".concat(_breakpoints2.default.tablet, ")")]),
desktop: (0, _facepaint2.default)(["@media (min-width: ".concat(_breakpoints2.default.desktop, ")")]),
mobile: (0, _facepaint2.default)(["@media (min-width: ".concat(_breakpoints2.default.mobile, ")")]),
range: function range(_ref) {
var from = _ref.from,
until = _ref.until;
return '' + (from ? '@media (min-width: ' + from + ')' : '') + (from && until ? ' and ' : '') + (!from && until ? '@media ' : '') + (until ? '(max-width: ' + until + ')' : '');
return "".concat(from ? "@media (min-width: ".concat(from, ")") : '').concat(from && until ? ' and ' : '').concat(!from && until ? '@media ' : '').concat(until ? "(max-width: ".concat(until, ")") : '');
}
};

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

'use strict';
"use strict";

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", {

@@ -7,9 +7,8 @@ "use strict";

var spacingUnit = 26;
exports.default = {
xsmall: spacingUnit / 4 + "px",
small: spacingUnit / 2 + "px",
normal: spacingUnit + "px",
medium: spacingUnit * 1.25 + "px",
large: spacingUnit * 2 + "px"
xsmall: "".concat(spacingUnit / 4, "px"),
small: "".concat(spacingUnit / 2, "px"),
normal: "".concat(spacingUnit, "px"),
medium: "".concat(spacingUnit * 1.25, "px"),
large: "".concat(spacingUnit * 2, "px")
};
{
"name": "@ndla/core",
"version": "0.4.0",
"version": "0.4.1",
"description": "UI component library for NDLA.",

@@ -8,11 +8,3 @@ "license": "GPL-3.0",

"module": "es/index.js",
"jsnext:main": "es/index.js",
"sideEffects": false,
"scripts": {
"build": "npm run build:commonjs && npm run build:es",
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --quiet --out-dir lib --ignore __tests__",
"build:es": "cross-env BABEL_ENV=es babel src --quiet --out-dir es --ignore __tests__",
"clean": "rimraf lib es",
"prepublish": "npm run clean && npm run build"
},
"repository": {

@@ -19,0 +11,0 @@ "type": "git",

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