Socket
Socket
Sign inDemoInstall

@vtex/admin-ui-system

Package Overview
Dependencies
Maintainers
65
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtex/admin-ui-system - npm Package Compare versions

Comparing version 0.1.0-alpha.1 to 0.1.0-alpha.2

8

CHANGELOG.md

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

# [0.1.0-alpha.2](https://github.com/vtex/onda/compare/@vtex/admin-ui-system@0.1.0-alpha.1...@vtex/admin-ui-system@0.1.0-alpha.2) (2020-10-27)
**Note:** Version bump only for package @vtex/admin-ui-system
# [0.1.0-alpha.1](https://github.com/vtex/onda/compare/@vtex/admin-ui-system@0.1.0-alpha.0...@vtex/admin-ui-system@0.1.0-alpha.1) (2020-10-22)

@@ -8,0 +16,0 @@

@@ -27,2 +27,6 @@ 'use strict';

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* omit with array
*/
var omit = function omit(obj) {

@@ -39,3 +43,13 @@ for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {

/**
* Style props that are actually picked
* * They're declared on admin-ui-theme package
* ? Should we receive it as a parameter ?
*/
var availableStyleProps = ['padding', 'margin', 'paddingX', 'paddingY', 'marginX', 'marginY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth'];
/**
* Map with all used css properties
* ! This will probably be deprecated in a near future
*/
var cssProps = {

@@ -560,5 +574,13 @@ _hover: ':hover',

/**
* Props to be omited
* ! We should merge it with availableStyleProps
*/
var omitProps = ['focusable', 'spacing', 'size', 'kind', 'variant', 'orientation', 'wrap', 'colorMode'];
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* omit all css props within a object
*/
function omitCSSProps(props) {

@@ -568,2 +590,6 @@ return omit.apply(void 0, [props].concat(Object.keys(cssProps)));

/**
* Pick a safe htmlProps
*/
function pickHTMLProps(props) {

@@ -581,2 +607,6 @@ var filteredProps = {};

/**
* clean all html props
*/
function cleanProps(props) {

@@ -657,2 +687,6 @@ var legalProps = pickHTMLProps(props);

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* pick with array
*/
var pick = function pick(obj) {

@@ -674,2 +708,6 @@ var object = {};

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Pick all css props within a passed object
*/
function pickCSSProps(props) {

@@ -680,2 +718,14 @@ return pick.apply(void 0, [props].concat(Object.keys(cssProps)));

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Rename keys within a object using a map as reference
* @example
* ```js
* const keysMap = { a: 'b' }
* const obj = { a: 'c', c: 'd' }
*
* renameKeys(keysMap, obj)
* // returns { b: 'c', c: 'd' }
* ```
*/
function renameKeys(keysMap, obj) {

@@ -689,2 +739,7 @@ return Object.keys(obj).reduce(function (acc, key) {

/**
* Return a className after resolve styles, styleProps and stylePatterns
* ? Should we make the name smaller to that it can be used inline ?
*/
function getClassName(_ref) {

@@ -691,0 +746,0 @@ var props = _ref.props,

@@ -25,2 +25,6 @@ import React from 'react';

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* omit with array
*/
var omit = function omit(obj) {

@@ -37,3 +41,13 @@ for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {

/**
* Style props that are actually picked
* * They're declared on admin-ui-theme package
* ? Should we receive it as a parameter ?
*/
var availableStyleProps = ['padding', 'margin', 'paddingX', 'paddingY', 'marginX', 'marginY', 'height', 'width', 'minHeight', 'minWidth', 'maxHeight', 'maxWidth'];
/**
* Map with all used css properties
* ! This will probably be deprecated in a near future
*/
var cssProps = {

@@ -558,5 +572,13 @@ _hover: ':hover',

/**
* Props to be omited
* ! We should merge it with availableStyleProps
*/
var omitProps = ['focusable', 'spacing', 'size', 'kind', 'variant', 'orientation', 'wrap', 'colorMode'];
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* omit all css props within a object
*/
function omitCSSProps(props) {

@@ -566,2 +588,6 @@ return omit.apply(void 0, [props].concat(Object.keys(cssProps)));

/**
* Pick a safe htmlProps
*/
function pickHTMLProps(props) {

@@ -579,2 +605,6 @@ var filteredProps = {};

/**
* clean all html props
*/
function cleanProps(props) {

@@ -655,2 +685,6 @@ var legalProps = pickHTMLProps(props);

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* pick with array
*/
var pick = function pick(obj) {

@@ -672,2 +706,6 @@ var object = {};

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Pick all css props within a passed object
*/
function pickCSSProps(props) {

@@ -678,2 +716,14 @@ return pick.apply(void 0, [props].concat(Object.keys(cssProps)));

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Rename keys within a object using a map as reference
* @example
* ```js
* const keysMap = { a: 'b' }
* const obj = { a: 'c', c: 'd' }
*
* renameKeys(keysMap, obj)
* // returns { b: 'c', c: 'd' }
* ```
*/
function renameKeys(keysMap, obj) {

@@ -687,2 +737,7 @@ return Object.keys(obj).reduce(function (acc, key) {

/**
* Return a className after resolve styles, styleProps and stylePatterns
* ? Should we make the name smaller to that it can be used inline ?
*/
function getClassName(_ref) {

@@ -689,0 +744,0 @@ var props = _ref.props,

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

/**
* Style props that are actually picked
* * They're declared on admin-ui-theme package
* ? Should we receive it as a parameter ?
*/
export declare const availableStyleProps: string[];
/**
* Map with all used css properties
* ! This will probably be deprecated in a near future
*/
export declare const cssProps: {

@@ -3,0 +12,0 @@ _hover: string;

4

dist/constants/omitProps.d.ts

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

/**
* Props to be omited
* ! We should merge it with availableStyleProps
*/
export declare const omitProps: string[];

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

/**
* clean all html props
*/
export declare function cleanProps<P>(props: P): Partial<P>;

12

dist/functions/createElement.d.ts

@@ -23,3 +23,3 @@ import { Ref, ReactNode, ComponentType, PropsWithChildren } from 'react';

* base component
* ✅ do: pass a reakit component
* * ✅ do: pass a reakit component
*/

@@ -29,3 +29,3 @@ component: string | ComponentType<T>;

* optional children
* ℹ️ normally it comes within htmlProps
* * ℹ️ normally it comes within htmlProps
*/

@@ -35,9 +35,9 @@ children?: ReactNode;

* tag to render
* ✅ do: pass a string of a valid html element
* 🚫 dont: pass components
* * ✅ do: pass a string of a valid html element
* ! 🚫 dont: pass components
*/
element?: string;
/**
* HTMLProps
* 🚫 dont: pass illegal props
* * HTMLProps
* ! 🚫 dont: pass illegal props
*/

@@ -44,0 +44,0 @@ htmlProps?: PropsWithChildren<any>;

@@ -7,2 +7,6 @@ import { Theme, SxStyleProp, PropsWithStyles } from '../types';

};
/**
* Return a className after resolve styles, styleProps and stylePatterns
* ? Should we make the name smaller to that it can be used inline ?
*/
export declare function getClassName({ props, themeKey, theme }: GetClassNameParams): string;

@@ -9,0 +13,0 @@ declare type SelectVariantParams = {

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

/**
* omit with array
*/
export declare const omit: (obj: {
[x: string]: any;
}, ...keys: string[]) => {};

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

/**
* omit all css props within a object
*/
export declare function omitCSSProps(props: any): {};

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

/**
* pick with array
*/
export declare const pick: (obj: {
[x: string]: any;
}, ...props: string[]) => {};

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

/**
* Pick all css props within a passed object
*/
export declare function pickCSSProps(props: any): {};

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

/**
* Pick a safe htmlProps
*/
export declare function pickHTMLProps<P extends object>(props: P): Partial<P>;

@@ -0,1 +1,12 @@

/**
* Rename keys within a object using a map as reference
* @example
* ```js
* const keysMap = { a: 'b' }
* const obj = { a: 'c', c: 'd' }
*
* renameKeys(keysMap, obj)
* // returns { b: 'c', c: 'd' }
* ```
*/
export declare function renameKeys(keysMap: {

@@ -2,0 +13,0 @@ [x: string]: any;

{
"name": "@vtex/admin-ui-system",
"version": "0.1.0-alpha.1",
"version": "0.1.0-alpha.2",
"main": "dist/index.js",

@@ -49,3 +49,3 @@ "module": "dist/admin-ui-system.esm.js",

},
"gitHead": "243139e9565f3a1d6eb425396a286ffa89d5d96c"
"gitHead": "58092014cff446b5cff38048c5f1939b7d392134"
}

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

/**
* Style props that are actually picked
* * They're declared on admin-ui-theme package
* ? Should we receive it as a parameter ?
*/
export const availableStyleProps = [

@@ -16,2 +21,6 @@ 'padding',

/**
* Map with all used css properties
* ! This will probably be deprecated in a near future
*/
export const cssProps = {

@@ -18,0 +27,0 @@ _hover: ':hover',

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

/**
* Props to be omited
* ! We should merge it with availableStyleProps
*/
export const omitProps = [

@@ -2,0 +6,0 @@ 'focusable',

import { omitCSSProps } from './omitCSSProps'
import { pickHTMLProps } from './pickHTMLProps'
/**
* clean all html props
*/
export function cleanProps<P>(props: P): Partial<P> {

@@ -5,0 +8,0 @@ const legalProps = pickHTMLProps((props as unknown) as object)

@@ -12,2 +12,6 @@ import { get, merge, cssResolver, cssExtractor } from './lib'

/**
* Return a className after resolve styles, styleProps and stylePatterns
* ? Should we make the name smaller to that it can be used inline ?
*/
export function getClassName({ props, themeKey, theme }: GetClassNameParams) {

@@ -14,0 +18,0 @@ const draftStyles = selectVariant({ props, themeKey })

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* omit with array
*/
export const omit = (obj: { [x: string]: any }, ...keys: string[]) => {

@@ -4,0 +7,0 @@ return Object.keys(obj).reduce((newObject, key) => {

@@ -6,4 +6,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

/**
* omit all css props within a object
*/
export function omitCSSProps(props: any) {
return omit(props, ...Object.keys(cssProps))
}
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* pick with array
*/
export const pick = (obj: { [x: string]: any }, ...props: string[]) => {

@@ -4,0 +7,0 @@ const object = {}

@@ -5,4 +5,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

/**
* Pick all css props within a passed object
*/
export function pickCSSProps(props: any) {
return pick(props, ...Object.keys(cssProps))
}

@@ -5,2 +5,5 @@ import isPropValid from '@emotion/is-prop-valid'

/**
* Pick a safe htmlProps
*/
export function pickHTMLProps<P extends object>(props: P) {

@@ -7,0 +10,0 @@ const filteredProps: Partial<P> = {}

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Rename keys within a object using a map as reference
* @example
* ```js
* const keysMap = { a: 'b' }
* const obj = { a: 'c', c: 'd' }
*
* renameKeys(keysMap, obj)
* // returns { b: 'c', c: 'd' }
* ```
*/
export function renameKeys(

@@ -3,0 +15,0 @@ keysMap: { [x: string]: any },

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