@symbo.ls/atoms
Advanced tools
Comparing version 2.10.175 to 2.10.187
{ | ||
"name": "@symbo.ls/atoms", | ||
"version": "2.10.175", | ||
"version": "2.10.187", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "4169de1547799e63d72942c1b3735a7d433226e8", | ||
"gitHead": "00efdf24ddc738cbc544b0df43e5ee0b90d2b9c7", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "@domql/utils": "latest", |
'use strict' | ||
import { exec, isString } from '@domql/utils' | ||
import { exec, isString, isFunction } from '@domql/utils' | ||
import { SHAPES } from './style' | ||
@@ -19,6 +19,5 @@ import { getSpacingBasedOnRatio, getMediaColor } from '@symbo.ls/scratch' | ||
class: { | ||
shape: (element) => { | ||
const { props } = element | ||
shape: ({ props }) => { | ||
const { shape } = props | ||
return shape ? exec(SHAPES[shape], element) : null | ||
return SHAPES[shape]({ props }) | ||
}, | ||
@@ -31,4 +30,3 @@ shapeDirection: ({ props }) => { | ||
}, | ||
shapeDirectionColor: el => { | ||
const { props } = el | ||
shapeDirectionColor: ({ props }) => { | ||
const { background, backgroundColor } = props | ||
@@ -35,0 +33,0 @@ const borderColor = getMediaColor(background || backgroundColor, 'borderColor') |
@@ -19,4 +19,4 @@ 'use strict' | ||
const inheritTransition = (el) => { | ||
const exec = Timing.class.transition(el) | ||
const inheritTransition = ({ props }) => { | ||
const exec = Timing.class.transition({ props }) | ||
return exec && exec['transition'] | ||
@@ -33,4 +33,4 @@ } | ||
tooltip: el => ({ | ||
position: el.props.position || 'relative', | ||
tooltip: ({ props }) => ({ | ||
position: props.position || 'relative', | ||
'&:before': { | ||
@@ -42,4 +42,4 @@ content: '""', | ||
border: `.35em solid`, | ||
borderColor: getComputedBackgroundColor(el), | ||
transition: inheritTransition(el), | ||
borderColor: getComputedBackgroundColor({ props }), | ||
transition: inheritTransition({ props }), | ||
transitionProperty: 'border-color', | ||
@@ -82,3 +82,3 @@ position: 'absolute', | ||
tag: el => ({ | ||
tag: ({ props }) => ({ | ||
position: 'relative', | ||
@@ -88,4 +88,4 @@ '&:before': { | ||
display: 'block', | ||
background: getComputedBackgroundColor(el), | ||
transition: inheritTransition(el), | ||
background: getComputedBackgroundColor({ props }), | ||
transition: inheritTransition({ props }), | ||
transitionProperty: 'background', | ||
@@ -145,4 +145,4 @@ borderRadius: '.25em', | ||
height: '73%', | ||
background: getComputedBackgroundColor(el), | ||
transition: inheritTransition(el), | ||
background: getComputedBackgroundColor({ props }), | ||
transition: inheritTransition({ props }), | ||
transitionProperty: 'background' | ||
@@ -171,3 +171,3 @@ }, | ||
transformOrigin: '50% 50%', | ||
transition: inheritTransition(el), | ||
transition: inheritTransition({ props }), | ||
transitionProperty: 'background' | ||
@@ -177,6 +177,6 @@ | ||
'&:before': { | ||
background: `linear-gradient(225deg, ${getComputedBackgroundColor(el)} 25%, transparent 25%), linear-gradient(315deg, ${getComputedBackgroundColor(el)} 25%, transparent 25%)` | ||
background: `linear-gradient(225deg, ${getComputedBackgroundColor({ props })} 25%, transparent 25%), linear-gradient(315deg, ${getComputedBackgroundColor({ props })} 25%, transparent 25%)` | ||
}, | ||
'&:after': { | ||
background: getComputedBackgroundColor(el), | ||
background: getComputedBackgroundColor({ props }), | ||
borderRadius: '.25em' | ||
@@ -183,0 +183,0 @@ } |
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
40163
1093