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

@salutejs/plasma-new-hope

Package Overview
Dependencies
Maintainers
4
Versions
2503
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salutejs/plasma-new-hope - npm Package Compare versions

Comparing version 0.1.0-canary.691.6113837057.0 to 0.1.0-canary.691.6215207599.0

2

cjs/components/Button/_focused/base.js

@@ -6,3 +6,3 @@ import './base_da6sx2.css';

// TODO: focus-visible
// TODO: focus-visible #711

@@ -9,0 +9,0 @@ var base = "be225ve";

@@ -6,6 +6,2 @@ import './base_1fy999s.css';

// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
var base = "b1mlowkt";

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

@@ -6,3 +6,3 @@ import './base_f62w06.css';

// TODO: maybe move to separate component??
// TODO: maybe move to separate component #722

@@ -9,0 +9,0 @@ var base = "b1jinujn";

@@ -6,6 +6,2 @@ import './base_1f017ww.css';

// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
var base = "bfjp0j3";

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

@@ -16,5 +16,2 @@ import './Button_eqhnh2.css';

var _excluded = ["children", "text", "contentLeft", "contentRight", "isLoading", "loader"];
// import { fontFamily } from './tokens';
var base = "bsc0o8j";

@@ -30,4 +27,3 @@

// TODO: I dpn't like this code =/
// Could we do better ???
// TODO: #720
var _exp2 = function _exp2() {

@@ -34,0 +30,0 @@ return function (props) {

@@ -18,42 +18,15 @@ 'use strict';

}
// console.log('static', res);
return res;
}
// TODO: why I thought about extra???
// TODO: intersection
function getDynamicVariants(config) {
return function (props) {
var res = [];
// console.log(config.variations, props);
for (var _i2 = 0, _Object$entries = Object.entries(config.variations || {}); _i2 < _Object$entries.length; _i2++) {
var _Object$entries$_i = _rollupPluginBabelHelpers.slicedToArray(_Object$entries[_i2], 2),
key = _Object$entries$_i[0],
value = _Object$entries$_i[1];
for (var key in config.variations) {
if (key in props) {
var css = value[props[key]];
// console.log(css);
var variant = config.variations[key];
var css = variant[props[key]];
// no css for { modifier: true }
css && res.push(value[props[key]]);
// key in extra && res.push(extra[key][props[key]]);
// } else if (value[true]) {
// value[true] && res.push(value[true]);
css && res.push(variant[props[key]]);
}
}
// for (const intersection of config.intersections || []) {
// if (Object.keys(intersection.match).every(key => {
// const propMatch = intersection.match[key];
// if (key in props) {
// return props[key] === propMatch;
// }
// return propMatch === true;
// })) {
// res.push(intersection.value);
// }
// }
// console.log('dynamic', res);
return res;

@@ -64,4 +37,2 @@ };

var res = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, baseConfig), userConfig);
// TODO: how we do extend ??
if (res.variations) {

@@ -73,3 +44,2 @@ // copy variations base css

res.variations[key].css = (_baseConfig$variation = baseConfig.variations[key]) === null || _baseConfig$variation === void 0 ? void 0 : _baseConfig$variation.css;
// TODO: fuck me
/* start of bad decision */

@@ -90,5 +60,2 @@ if (!res.variations[key]["true"] && (_baseConfig$variation2 = baseConfig.variations[key]) !== null && _baseConfig$variation2 !== void 0 && _baseConfig$variation2["true"]) {

}
// TODO: intersections
return res;

@@ -95,0 +62,0 @@ }

@@ -13,4 +13,2 @@ 'use strict';

/* eslint-disable no-underscore-dangle */
/** linaria engine */
var _component = function _component(componentConfig) {

@@ -65,3 +63,2 @@ var tag = componentConfig.tag,

};
/** linaria engine */

@@ -68,0 +65,0 @@ // TODO: move to common

import './base_da6sx2.css';
// TODO: focus-visible
// TODO: focus-visible #711

@@ -4,0 +4,0 @@ var base = "be225ve";

import './base_1fy999s.css';
// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
var base = "b1mlowkt";

@@ -7,0 +3,0 @@

import './base_f62w06.css';
// TODO: maybe move to separate component??
// TODO: maybe move to separate component #722

@@ -4,0 +4,0 @@ var base = "b1jinujn";

import './base_1f017ww.css';
// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
var base = "bfjp0j3";

@@ -7,0 +3,0 @@

@@ -12,5 +12,2 @@ import './Button_eqhnh2.css';

var _excluded = ["children", "text", "contentLeft", "contentRight", "isLoading", "loader"];
// import { fontFamily } from './tokens';
var base = "bsc0o8j";

@@ -26,4 +23,3 @@

// TODO: I dpn't like this code =/
// Could we do better ???
// TODO: #720
var _exp2 = function _exp2() {

@@ -30,0 +26,0 @@ return function (props) {

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

import { objectSpread2 as _objectSpread2, slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';

@@ -14,42 +14,15 @@ function getStaticVariants(config) {

}
// console.log('static', res);
return res;
}
// TODO: why I thought about extra???
// TODO: intersection
function getDynamicVariants(config) {
return function (props) {
var res = [];
// console.log(config.variations, props);
for (var _i2 = 0, _Object$entries = Object.entries(config.variations || {}); _i2 < _Object$entries.length; _i2++) {
var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
key = _Object$entries$_i[0],
value = _Object$entries$_i[1];
for (var key in config.variations) {
if (key in props) {
var css = value[props[key]];
// console.log(css);
var variant = config.variations[key];
var css = variant[props[key]];
// no css for { modifier: true }
css && res.push(value[props[key]]);
// key in extra && res.push(extra[key][props[key]]);
// } else if (value[true]) {
// value[true] && res.push(value[true]);
css && res.push(variant[props[key]]);
}
}
// for (const intersection of config.intersections || []) {
// if (Object.keys(intersection.match).every(key => {
// const propMatch = intersection.match[key];
// if (key in props) {
// return props[key] === propMatch;
// }
// return propMatch === true;
// })) {
// res.push(intersection.value);
// }
// }
// console.log('dynamic', res);
return res;

@@ -60,4 +33,2 @@ };

var res = _objectSpread2(_objectSpread2({}, baseConfig), userConfig);
// TODO: how we do extend ??
if (res.variations) {

@@ -69,3 +40,2 @@ // copy variations base css

res.variations[key].css = (_baseConfig$variation = baseConfig.variations[key]) === null || _baseConfig$variation === void 0 ? void 0 : _baseConfig$variation.css;
// TODO: fuck me
/* start of bad decision */

@@ -86,5 +56,2 @@ if (!res.variations[key]["true"] && (_baseConfig$variation2 = baseConfig.variations[key]) !== null && _baseConfig$variation2 !== void 0 && _baseConfig$variation2["true"]) {

}
// TODO: intersections
return res;

@@ -91,0 +58,0 @@ }

@@ -9,4 +9,2 @@ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, toConsumableArray as _toConsumableArray, slicedToArray as _slicedToArray, extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';

/* eslint-disable no-underscore-dangle */
/** linaria engine */
var _component = function _component(componentConfig) {

@@ -61,3 +59,2 @@ var tag = componentConfig.tag,

};
/** linaria engine */

@@ -64,0 +61,0 @@ // TODO: move to common

{
"name": "@salutejs/plasma-new-hope",
"version": "0.1.0-canary.691.6113837057.0",
"version": "0.1.0-canary.691.6215207599.0",
"description": "Salute Design System blueprint",

@@ -18,3 +18,2 @@ "TODO:main": "cjs/index.js",

"scripts": {
"test": "echo \"Error: no test specified\"",
"prepare": "npm run build",

@@ -31,4 +30,3 @@ "build": "npm run build:css && npm run build:styled-components",

"generate:typings:css": "tsc --outDir types --emitDeclarationOnly",
"generate:typings:styled-components": "",
"generate:typings": "npm run generate:typings:css && npm run generate:typings:styled-components",
"generate:typings": "npm run generate:typings:css",
"storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -s .storybook/public -p ${PORT:-7002} -c .storybook",

@@ -99,3 +97,3 @@ "prestorybook:sc": "npm run prebuild:styled-components",

},
"gitHead": "263bdeda1fe66c93b0a8b550d734e3e834e1b639"
"gitHead": "11d89d561328960747ec39643cbcff02cee626a7"
}

@@ -62,16 +62,15 @@ ## HOW TO PLASMA

- [x] tokens-mapping: Dark / Light Theme
- [] tokens-mapping: connect tokens-theme to theme
- [] new-hope: storybook ThemeSwitch
- [] new-hope: storybook ThemeSwitch #704
- [x] new-hope: Button: size
- [] new-hope: Button: pin
- [] new-hope: make hover/active scala token
- [] plasma-b2c: Button: pin
- [] plasma-b2c: Button: pin + focus
- [] new-hope: hovered / actived
- [] new-hope: Button: plasma-b2c
- [] new-hope: sds => sds-eng
- [] new-hope: Button: pin #705
- [] new-hope: make hover/active scale token #706
- [] new-hope: hovered / actived #708
- [] new-hope: Button: plasma-b2c #579
- [] plasma-b2c: Button: pin #579
- [] plasma-b2c: Button: pin + focus #579
- [] new-hope: sds => sds-eng Rename examples #709
- [] new-hope: Button: sds-eng
- [] new-hope: Button: outlined
- [] new-hope: focus-visible => polyfill ??
- [] new-hope: fix mergeConfig extend check example in plasma-b2c
- [] new-hope: Button: outlined #710
- [] new-hope: focus-visible => polyfill #711
- [] new-hope: fix mergeConfig extend check example in plasma-b2c #712
- [x] tokens-mapping: defaults saving

@@ -81,4 +80,4 @@ - [x] tokens-mapping: boolean modifier

- [] tokens-mapping: intersection ???
- [] tokens-mapping: default values for tokens
- [] tokens-mapping: merge tokens with theme
- [] tokens-mapping: default values for tokens #713
- [] tokens-mapping: connect tokens-theme to theme #704
- [] tokens-mapping: Complex tokens: enums => select

@@ -88,25 +87,25 @@ - [x] new-hope: engine: linaria filter props

- [x] ds-generator: examples plasma-new-hope
- [] new-hope: Типизация componentConfig
- [] new-hope: Типизация Button
- [] new-hope: Включить eslint
- [] new-hope: Переписать сборку new-hope на rollup
- [] new-hope: Починить сборку в commonJS
- [] new-hope: Add api-extractor
- [] new-hope: Типизация componentConfig #716
- [] new-hope: Типизация Button #579
- [x] new-hope: Включить eslint
- [] new-hope: Переписать сборку new-hope на rollup #717
- [] new-hope: Починить сборку в commonJS ( "TODO:main": "cjs/index.js",) #718
- [] new-hope: Add api-extractor #719
- [] example-ds: Сборка example-design-system на конфигах new-hope
- [] new-hope: Icon
- [] new-hope: Typography
- [] new-hope: Spin
- [] new-hope: Button: isLoading
- [] new-hope: TextField
- [] new-hope: TextArea
- [] new-hope: Spinner #707
- [] new-hope: Button: isLoading: refactor #720
- [] new-hope: TextField #584
- [] new-hope: TextArea #583
- [x] new-hope: storybook: linaria
- [x] new-hope: storybook: styled-components
- [] example: Переключение engines ???
- [x] example: Переключение engines
- [] tokens-mapping: Включить eslint
- [] example-ds: Dark / Light Theme
- [] plasma-hope: Замена plasma-b2c/web:Button => plasma-new-hope:Button
- [] new-hope: Link
- [] plasma-hope: Замена plasma-b2c/web:Button => plasma-new-hope:Button #579
- [] new-hope: Link #585
- [x] tokens-mapping: Переключение тем
- [] tokens-mapping: AutoComplete токенов из theme-builder
- [] new-hope: Сборка в emotion
- [] new-hope: Сборка в emotion #721
- [] ds-generator: `_config` => `mergedConfig`

@@ -113,0 +112,0 @@ - [] ds-generator: Включить eslint

import { css } from 'styled-components';
// TODO: focus-visible
// TODO: focus-visible #711
export var base = /*#__PURE__*/css([":focus{outline:none;}::before{content:'';position:absolute;display:block;box-sizing:content-box;pointer-events:none;inset:calc(-1 * var(--btn-outline-size));border:var(--btn-outline-size) solid transparent;transition:box-shadow 0.2s ease-in-out 0s;}:focus-visible::before{box-shadow:0 0 0 var(--btn-outline-size) var(--plasma-button-focus-color);}"]);

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

// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
import { css } from 'styled-components';
export var base = /*#__PURE__*/css(["height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));--btn-br:var(--plasma-button-radius,calc(var(--plasma-button-height) / 4));border-radius:var(--btn-br);font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--btn-outline-size:var(--plasma-button-outline-size,0.125rem);::before{border-radius:calc(var(--btn-br) + var(--btn-outline-size));}"]);
import { css } from 'styled-components';
// TODO: maybe move to separate component??
// TODO: maybe move to separate component #722
export var base = /*#__PURE__*/css([""]);
export var yes = /*#__PURE__*/css(["width:var(--plasma-button-height);padding:0;"]);

@@ -1,13 +0,7 @@

// TODO: switch engine
// import { css } from '../../../engines/styled-components';
// import { css } from '../../../engines/linaria';
import { css } from 'styled-components';
export var base = /*#__PURE__*/css(["color:var(--plasma-button-color);background-color:var(--plasma-button-bg-color);:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-bg-color-hover,var(--plasma-button-bg-color));scale:1.02;}:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-bg-color-active,var(--plasma-button-bg-color));scale:0.98;}"]);
// TODO: should we move defaults for token --plasma-button-color-hover default => --plasma-button-color
// from code to plasma-mapping ??
// TODO: #715 background-image: gradients
// TODO: background-image: gradients
/// TODO: tokens: optional / default / func toHover(color) => hoverColor ??
/// TODO: #714 tokens: optional / default / func toHover(color) => hoverColor ??
/*

@@ -14,0 +8,0 @@ { "optional": true, "value": "--plasma-button-focus-color" }

@@ -14,5 +14,2 @@ var _excluded = ["children", "text", "contentLeft", "contentRight", "isLoading", "loader"];

import { base as square, yes } from './_square/base';
// import { fontFamily } from './tokens';
var base = /*#__PURE__*/css(["position:relative;display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);"]);

@@ -26,4 +23,3 @@

// TODO: I dpn't like this code =/
// Could we do better ???
// TODO: #720
var LoadWrap = /*#__PURE__*/styled.div.withConfig({

@@ -30,0 +26,0 @@ componentId: "plasma-new-hope__sc-1e0bctu-1"

@@ -7,8 +7,2 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
export function getStaticVariants(config) {

@@ -25,42 +19,15 @@ if (!config.variations) {

}
// console.log('static', res);
return res;
}
// TODO: why I thought about extra???
// TODO: intersection
export function getDynamicVariants(config) {
return function (props) {
var res = [];
// console.log(config.variations, props);
for (var _i2 = 0, _Object$entries = Object.entries(config.variations || {}); _i2 < _Object$entries.length; _i2++) {
var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
key = _Object$entries$_i[0],
value = _Object$entries$_i[1];
for (var key in config.variations) {
if (key in props) {
var css = value[props[key]];
// console.log(css);
var variant = config.variations[key];
var css = variant[props[key]];
// no css for { modifier: true }
css && res.push(value[props[key]]);
// key in extra && res.push(extra[key][props[key]]);
// } else if (value[true]) {
// value[true] && res.push(value[true]);
css && res.push(variant[props[key]]);
}
}
// for (const intersection of config.intersections || []) {
// if (Object.keys(intersection.match).every(key => {
// const propMatch = intersection.match[key];
// if (key in props) {
// return props[key] === propMatch;
// }
// return propMatch === true;
// })) {
// res.push(intersection.value);
// }
// }
// console.log('dynamic', res);
return res;

@@ -71,4 +38,2 @@ };

var res = _objectSpread(_objectSpread({}, baseConfig), userConfig);
// TODO: how we do extend ??
if (res.variations) {

@@ -80,3 +45,2 @@ // copy variations base css

res.variations[key].css = (_baseConfig$variation = baseConfig.variations[key]) === null || _baseConfig$variation === void 0 ? void 0 : _baseConfig$variation.css;
// TODO: fuck me
/* start of bad decision */

@@ -97,6 +61,3 @@ if (!res.variations[key]["true"] && (_baseConfig$variation2 = baseConfig.variations[key]) !== null && _baseConfig$variation2 !== void 0 && _baseConfig$variation2["true"]) {

}
// TODO: intersections
return res;
}

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

// TODO: how to switch engines ???
// export { styled, css } from './styled-components';
export { mergeConfig } from './common';
// TODO: how to switch engines ???
export { component } from './styled-components';

@@ -1,4 +0,4 @@

// TODO: add collectPackageInfo
// TODO: #723 add collectPackageInfo
export * from './engines';
export * from './components/Button';
import React from 'react';
import { ComponentConfig } from './common';
/** linaria engine */
export declare const _component: (componentConfig: ComponentConfig) => React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
/** linaria engine */
export declare function component(config: ComponentConfig): any;
//# sourceMappingURL=linaria.d.ts.map

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

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

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

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

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

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