@salutejs/plasma-new-hope
Advanced tools
Comparing version 0.1.0-canary.696.6189637245.0 to 0.1.0-canary.736.6250995389.0
@@ -8,2 +8,3 @@ 'use strict'; | ||
var Link = require('./components/Link/Link.js'); | ||
var Spinner = require('./components/Spinner/Spinner.js'); | ||
var common = require('./engines/common.js'); | ||
@@ -18,4 +19,6 @@ | ||
exports.linkRoot = Link.linkRoot; | ||
exports.spinnerConfig = Spinner.spinnerConfig; | ||
exports.spinnerRoot = Spinner.spinnerRoot; | ||
exports.component = common.component; | ||
exports.mergeConfig = common.mergeConfig; | ||
//# sourceMappingURL=index.js.map |
export { css } from './engines/index.js'; | ||
export { buttonConfig, buttonRoot } from './components/Button/Button.js'; | ||
export { linkConfig, linkRoot } from './components/Link/Link.js'; | ||
export { spinnerConfig, spinnerRoot } from './components/Spinner/Spinner.js'; | ||
export { component, mergeConfig } from './engines/common.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@salutejs/plasma-new-hope", | ||
"version": "0.1.0-canary.696.6189637245.0", | ||
"version": "0.1.0-canary.736.6250995389.0", | ||
"description": "Salute Design System blueprint", | ||
@@ -95,5 +95,6 @@ "TODO:main": "cjs/index.js", | ||
"@linaria/core": "^4.5.4", | ||
"@linaria/react": "^4.5.4" | ||
"@linaria/react": "^4.5.4", | ||
"@salutejs/plasma-core": "1.131.0-canary.736.6250995389.0" | ||
}, | ||
"gitHead": "dee4299b2c6551041234588b459fb4f0d3126183" | ||
"gitHead": "9ae96403901741bf3c1c85133e3e0a7ab7569dd7" | ||
} |
@@ -0,1 +1,2 @@ | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -23,28 +24,42 @@ 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."); } | ||
export function argTypesFromConfig(config) { | ||
var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
var defaults = config.defaults, | ||
variations = config.variations; | ||
var filteredVariations = Object.entries(variations).filter(function (_ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
key = _ref2[0]; | ||
return !exclude.includes(key); | ||
}); | ||
var argTypes = {}; | ||
for (var _i = 0, _Object$entries = Object.entries(variations); _i < _Object$entries.length; _i++) { | ||
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), | ||
key = _Object$entries$_i[0], | ||
val = _Object$entries$_i[1]; | ||
var control = { | ||
control: {} | ||
}; | ||
if (val["true"]) { | ||
control.control.type = 'boolean'; | ||
control.defaultValue = false; | ||
} else { | ||
control.control.type = 'select'; | ||
control.options = Object.keys(val).filter(function (name) { | ||
return name !== 'css'; | ||
}); | ||
var _iterator = _createForOfIteratorHelper(filteredVariations), | ||
_step; | ||
try { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var _step$value = _slicedToArray(_step.value, 2), | ||
key = _step$value[0], | ||
val = _step$value[1]; | ||
var control = { | ||
control: {} | ||
}; | ||
if (val["true"]) { | ||
control.control.type = 'boolean'; | ||
control.defaultValue = false; | ||
} else { | ||
control.control.type = 'select'; | ||
control.options = Object.keys(val).filter(function (name) { | ||
return name !== 'css'; | ||
}); | ||
} | ||
var defaultValue = defaults[key]; | ||
if (defaultValue) { | ||
control.defaultValue = val["true"] ? Boolean(defaultValue) : defaultValue; | ||
} | ||
argTypes[key] = control; | ||
} | ||
var defaultValue = defaults[key]; | ||
if (defaultValue) { | ||
control.defaultValue = val["true"] ? Boolean(defaultValue) : defaultValue; | ||
} | ||
argTypes[key] = control; | ||
} catch (err) { | ||
_iterator.e(err); | ||
} finally { | ||
_iterator.f(); | ||
} | ||
return argTypes; | ||
} |
@@ -5,2 +5,3 @@ // TODO: add collectPackageInfo | ||
export * from './components/Button'; | ||
export * from './components/Link'; | ||
export * from './components/Link'; | ||
export * from './components/Spinner'; |
@@ -6,3 +6,3 @@ import { ArgTypes, StoryContext, Story as StoryType } from '@storybook/react'; | ||
export declare const WithTheme: (Story: StoryType, context: StoryContext) => JSX.Element; | ||
export declare function argTypesFromConfig<Tag extends HTMLTagList, VariantList extends Variants, VariantsProps extends PropsType<VariantList>, LayoutProps extends React.HTMLAttributes<HTMLElement>>(config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>): ArgTypes<import("@storybook/react").Args>; | ||
export declare function argTypesFromConfig<Tag extends HTMLTagList, VariantList extends Variants, VariantsProps extends PropsType<VariantList>, LayoutProps extends React.HTMLAttributes<HTMLElement>>(config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>, exclude?: string[]): ArgTypes<import("@storybook/react").Args>; | ||
//# sourceMappingURL=_helpers.d.ts.map |
export * from './engines'; | ||
export * from './components/Button'; | ||
export * from './components/Link'; | ||
export * from './components/Spinner'; | ||
//# sourceMappingURL=index.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
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
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
315907
249
3949
5
+ Added@salutejs/plasma-core@1.131.0-canary.736.6250995389.0
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/plugin-syntax-jsx@7.25.9(transitive)
+ Added@emotion/stylis@0.8.5(transitive)
+ Added@emotion/unitless@0.7.5(transitive)
+ Added@popperjs/core@2.9.2(transitive)
+ Added@salutejs/plasma-core@1.131.0-canary.736.6250995389.0(transitive)
+ Added@salutejs/plasma-typo@0.38.0(transitive)
+ Addedbabel-plugin-styled-components@2.1.4(transitive)
+ Addedcamelize@1.0.1(transitive)
+ Addedclassnames@2.5.1(transitive)
+ Addedcss-color-keywords@1.0.0(transitive)
+ Addedcss-to-react-native@3.2.0(transitive)
+ Addedfocus-visible@5.2.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhoist-non-react-statics@3.3.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash.throttle@4.1.1(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedreact-draggable@4.4.3(transitive)
+ Addedreact-fast-compare@3.2.2(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreact-popper@2.3.0(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedshallowequal@1.1.0(transitive)
+ Addedstyled-components@5.3.11(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedwarning@4.0.3(transitive)