@symbo.ls/atoms 2.29.60 → 2.29.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Box.js CHANGED
@@ -16,8 +16,8 @@ import {
16
16
  addAdditionalExtend
17
17
  } from '@domql/utils'
18
18
 
19
- import { depth, SHAPES } from './Shape'
20
- import { beforeClassAssign } from './Media'
19
+ import { depth, SHAPES } from './Shape.js'
20
+ import { beforeClassAssign } from './Media.js'
21
21
 
22
22
  import {
23
23
  getTimingFunction,
@@ -68,7 +68,7 @@ const applyAnimationProps = (animation, element) => {
68
68
 
69
69
  const PropsCSS = {
70
70
  class: {
71
- style: el => el.props && el.props.style
71
+ style: (el) => el.props && el.props.style
72
72
  }
73
73
  }
74
74
 
@@ -102,16 +102,17 @@ export const Box = {
102
102
  },
103
103
 
104
104
  attr: {
105
- id: el => el.call('isString', el.props.id) && el.props.id,
106
- title: el => el.call('isString', el.props.title) && el.props.title,
107
- contentEditable: el => el.props.contentEditable || el.props.contenteditable,
108
- dir: el => el.props.dir,
109
- draggable: el => el.props.draggable,
110
- hidden: el => el.props.hidden,
111
- lang: el => el.props.lang,
112
- spellcheck: el => el.props.spellcheck,
113
- tabindex: el => el.props.tabindex,
114
- translate: el => el.props.translate,
105
+ id: (el) => el.call('isString', el.props.id) && el.props.id,
106
+ title: (el) => el.call('isString', el.props.title) && el.props.title,
107
+ contentEditable: (el) =>
108
+ el.props.contentEditable || el.props.contenteditable,
109
+ dir: (el) => el.props.dir,
110
+ draggable: (el) => el.props.draggable,
111
+ hidden: (el) => el.props.hidden,
112
+ lang: (el) => el.props.lang,
113
+ spellcheck: (el) => el.props.spellcheck,
114
+ tabindex: (el) => el.props.tabindex,
115
+ translate: (el) => el.props.translate,
115
116
  'data-testid': (el, s) =>
116
117
  (s.root.ENV === 'testing' || s.root.ENV === 'staging') &&
117
118
  ((el.__ref.path.length > 5
@@ -138,7 +139,7 @@ export const Box = {
138
139
  if (children.$$typeof) return el.call('renderReact', children, el)
139
140
  if (childrenAsDefault && childrenAsDefault !== 'state') {
140
141
  param = deepClone(children)
141
- param = Object.keys(param).map(v => {
142
+ param = Object.keys(param).map((v) => {
142
143
  const val = param[v]
143
144
  return addAdditionalExtend(v, val)
144
145
  })
@@ -146,13 +147,13 @@ export const Box = {
146
147
  } else if (isArray(children)) {
147
148
  param = deepClone(children)
148
149
  if (childrenAsDefault && childrenAsDefault !== 'element') {
149
- param = param.map(v => ({
150
+ param = param.map((v) => ({
150
151
  ...(childExtends && { extend: childExtends }),
151
152
  [childrenAsDefault]: isObjectLike(v)
152
153
  ? v
153
154
  : childrenAsDefault === 'state'
154
- ? { value: v }
155
- : { text: v }
155
+ ? { value: v }
156
+ : { text: v }
156
157
  }))
157
158
  }
158
159
  } else if (isString(children) || isNumber(children)) {
@@ -164,9 +165,9 @@ export const Box = {
164
165
 
165
166
  if (!param) return
166
167
 
167
- const filterReact = param.filter(v => !v.$$typeof)
168
+ const filterReact = param.filter((v) => !v.$$typeof)
168
169
  if (filterReact.length !== param.length) {
169
- const extractedReactComponents = param.filter(v => v.$$typeof)
170
+ const extractedReactComponents = param.filter((v) => v.$$typeof)
170
171
  el.call('renderReact', extractedReactComponents, el)
171
172
  }
172
173
  param = filterReact
@@ -223,7 +224,7 @@ export const Box = {
223
224
 
224
225
  const data = (
225
226
  isArray(param) ? param : isObject(param) ? Object.values(param) : []
226
- ).map(item => (!isObjectLike(item) ? { props: { value: item } } : item))
227
+ ).map((item) => (!isObjectLike(item) ? { props: { value: item } } : item))
227
228
 
228
229
  if (data.length) {
229
230
  const t = setTimeout(() => {
@@ -683,7 +684,7 @@ export const Box = {
683
684
  return {
684
685
  inset: inset
685
686
  .split(' ')
686
- .map(v => deps.getSpacingByKey(v, 'k').k)
687
+ .map((v) => deps.getSpacingByKey(v, 'k').k)
687
688
  .join(' ')
688
689
  }
689
690
  },
@@ -698,7 +699,7 @@ export const Box = {
698
699
  if (typeof verticalInset !== 'string') return
699
700
  const vi = verticalInset
700
701
  .split(' ')
701
- .map(v => deps.getSpacingByKey(v, 'k').k)
702
+ .map((v) => deps.getSpacingByKey(v, 'k').k)
702
703
  return {
703
704
  top: vi[0],
704
705
  bottom: vi[1] || vi[0]
@@ -710,7 +711,7 @@ export const Box = {
710
711
  if (typeof horizontalInset !== 'string') return
711
712
  const vi = horizontalInset
712
713
  .split(' ')
713
- .map(v => deps.getSpacingByKey(v, 'k').k)
714
+ .map((v) => deps.getSpacingByKey(v, 'k').k)
714
715
  return {
715
716
  left: vi[0],
716
717
  right: vi[1] || vi[0]
@@ -824,7 +825,7 @@ export const Box = {
824
825
  depth: ({ props, deps }) =>
825
826
  !isUndefined(props.depth) && deps.depth[props.depth],
826
827
 
827
- theme: element => {
828
+ theme: (element) => {
828
829
  const { props, deps } = element
829
830
  const globalTheme = deps.getSystemGlobalTheme(element)
830
831
  if (!props.theme) return
@@ -843,7 +844,7 @@ export const Box = {
843
844
  )
844
845
  },
845
846
 
846
- color: element => {
847
+ color: (element) => {
847
848
  const { props, deps } = element
848
849
  const globalTheme = deps.getSystemGlobalTheme(element)
849
850
  if (!props.color) return
@@ -852,7 +853,7 @@ export const Box = {
852
853
  }
853
854
  },
854
855
 
855
- background: element => {
856
+ background: (element) => {
856
857
  const { props, deps } = element
857
858
  const globalTheme = deps.getSystemGlobalTheme(element)
858
859
  if (!props.background) return
@@ -861,7 +862,7 @@ export const Box = {
861
862
  }
862
863
  },
863
864
 
864
- backgroundColor: element => {
865
+ backgroundColor: (element) => {
865
866
  const { props, deps } = element
866
867
  const globalTheme = deps.getSystemGlobalTheme(element)
867
868
  if (!props.backgroundColor) return
@@ -922,7 +923,7 @@ export const Box = {
922
923
  border: deps.transformBorder(props.border)
923
924
  },
924
925
 
925
- borderColor: element => {
926
+ borderColor: (element) => {
926
927
  const { props, deps } = element
927
928
  const globalTheme = deps.getSystemGlobalTheme(element)
928
929
  if (!props.borderColor) return
@@ -952,7 +953,7 @@ export const Box = {
952
953
  borderBottom: deps.transformBorder(props.borderBottom)
953
954
  },
954
955
 
955
- shadow: element => {
956
+ shadow: (element) => {
956
957
  const { props, deps } = element
957
958
  const globalTheme = deps.getSystemGlobalTheme(element)
958
959
  if (!props.backgroundImage) return
@@ -1027,7 +1028,7 @@ export const Box = {
1027
1028
 
1028
1029
  // animation
1029
1030
  ...{
1030
- animation: el =>
1031
+ animation: (el) =>
1031
1032
  el.props.animation && {
1032
1033
  animationName: el.deps.applyAnimationProps(el.props.animation, el),
1033
1034
  animationDuration: el.deps.getTimingByKey(
@@ -1043,7 +1044,7 @@ export const Box = {
1043
1044
  animationPlayState: el.props.animationPlayState,
1044
1045
  animationDirection: el.props.animationDirection
1045
1046
  },
1046
- animationName: el =>
1047
+ animationName: (el) =>
1047
1048
  el.props.animationName && {
1048
1049
  animationName: el.deps.applyAnimationProps(el.props.animationName, el)
1049
1050
  },
package/Media.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { merge, isArray, overwriteDeep, overwriteShallow } from '@domql/utils'
4
- import { getSystemGlobalTheme } from './Box'
4
+ import { getSystemGlobalTheme } from './Box.js'
5
5
 
6
6
  export const keySetters = {
7
7
  '@': (key, props, result, element, isSubtree) =>
package/Picture.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { getSystemGlobalTheme } from './Box'
3
+ import { getSystemGlobalTheme } from './Box.js'
4
4
 
5
5
  export const Picture = {
6
6
  deps: { getSystemGlobalTheme },
@@ -9,7 +9,7 @@ export const Picture = {
9
9
  childExtend: {
10
10
  tag: 'source',
11
11
  attr: {
12
- media: element => {
12
+ media: (element) => {
13
13
  const { props, key, context, deps } = element
14
14
  const { MEDIA } = context.designSystem
15
15
  const globalTheme = deps.getSystemGlobalTheme(element)
package/Shape.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { getActiveConfig, getColor } from '@symbo.ls/scratch' // eslint-disable-line no-unused-vars
4
- import { Box } from './Box'
4
+ import { Box } from './Box.js'
5
5
 
6
6
  const CONFIG = getActiveConfig()
7
7
 
package/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  'use strict'
2
2
 
3
- export * from './Box'
4
- export * from './Flex'
5
- export * from './Grid'
6
- export * from './Img'
7
- export * from './Form'
8
- export * from './Media'
9
- export * from './Iframe'
10
- export * from './InteractiveComponent'
11
- export * from './Picture'
12
- export * from './Svg'
13
- export * from './Shape'
14
- export * from './Video'
15
- export * from './Text'
16
- export * from './Hgroup'
3
+ export * from './Box.js'
4
+ export * from './Flex.js'
5
+ export * from './Grid.js'
6
+ export * from './Img.js'
7
+ export * from './Form.js'
8
+ export * from './Media.js'
9
+ export * from './Iframe.js'
10
+ export * from './InteractiveComponent.js'
11
+ export * from './Picture.js'
12
+ export * from './Svg.js'
13
+ export * from './Shape.js'
14
+ export * from './Video.js'
15
+ export * from './Text.js'
16
+ export * from './Hgroup.js'
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.29.60",
3
+ "version": "2.29.61",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "c55341edaa6d160bf3f3a3de09bc681d66a7fde5",
6
+ "gitHead": "53e60f9e1f43297ee433fd51df253fbbbba391be",
7
7
  "dependencies": {
8
- "@domql/state": "^2.29.60",
9
- "@domql/utils": "^2.29.60",
10
- "@symbo.ls/emotion": "^2.29.60",
11
- "@symbo.ls/scratch": "^2.29.60"
8
+ "@domql/state": "^2.29.61",
9
+ "@domql/utils": "^2.29.61",
10
+ "@symbo.ls/emotion": "^2.29.61",
11
+ "@symbo.ls/scratch": "^2.29.61"
12
12
  },
13
13
  "source": "src/index.js",
14
14
  "devDependencies": {