smbls 0.8.29 → 0.8.30
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/package.json +1 -1
- package/src/{Block/index.js → Block.js} +0 -0
- package/src/{Box/index.js → Box.js} +1 -1
- package/src/{Button/index.js → Button.js} +1 -1
- package/src/ButtonSet.js +10 -0
- package/src/DatePicker/index.js +0 -3
- package/src/{Direction/index.js → Direction.js} +0 -0
- package/src/{Flex/index.js → Flex.js} +2 -4
- package/src/{Grid/index.js → Grid.js} +2 -5
- package/src/{Img/index.js → Img.js} +0 -0
- package/src/{Label/index.js → Label.js} +3 -3
- package/src/{Link/index.js → Link.js} +1 -1
- package/src/Media.js +13 -9
- package/src/{Notification/index.js → Notification.js} +1 -1
- package/src/{Overflow/index.js → Overflow.js} +1 -1
- package/src/{Pills/index.js → Pills.js} +1 -5
- package/src/{Position/index.js → Position.js} +0 -0
- package/src/{SVG/index.js → SVG.js} +0 -0
- package/src/{SideBar/index.js → Sidebar.js} +2 -1
- package/src/{Text/index.js → Text.js} +0 -0
- package/src/{Transform/index.js → Transform.js} +1 -1
- package/src/{Transition/index.js → Transition.js} +0 -0
- package/src/Block/style.js +0 -1
- package/src/Button/style.js +0 -4
- package/src/ButtonSet/index.js +0 -14
- package/src/Flex/style.js +0 -5
- package/src/Grid/style.js +0 -5
- package/src/Text/style.js +0 -2
- package/src/Transition/style.js +0 -2
package/package.json
CHANGED
|
File without changes
|
package/src/ButtonSet.js
ADDED
package/src/DatePicker/index.js
CHANGED
|
File without changes
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { mapBasedOnRatio } from '../Block'
|
|
3
|
+
import { mapBasedOnRatio } from './Block'
|
|
5
4
|
|
|
6
5
|
export const Grid = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
props: {},
|
|
6
|
+
props: { display: 'grid' },
|
|
10
7
|
|
|
11
8
|
class: {
|
|
12
9
|
columns: ({ props }) => props.columns ? ({ gridTemplateColumns: props.columns }) : null,
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
import { Block } from '
|
|
3
|
-
import { Shape } from '
|
|
4
|
-
import { Text } from '
|
|
2
|
+
import { Block } from './Block'
|
|
3
|
+
import { Shape } from './Shape'
|
|
4
|
+
import { Text } from './Text'
|
|
5
5
|
|
|
6
6
|
export const Label = {
|
|
7
7
|
proto: [Shape, Block, Text],
|
package/src/Media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { merge } from '@domql/utils'
|
|
3
|
+
import { merge, isArray } from '@domql/utils'
|
|
4
4
|
import { CASES as CONFIG_CASES, MEDIA as CONFIG_MEDIA, getTheme } from '@symbo.ls/scratch'
|
|
5
5
|
|
|
6
6
|
const convertToClass = (subProps, element) => {
|
|
@@ -10,7 +10,11 @@ const convertToClass = (subProps, element) => {
|
|
|
10
10
|
const classnameExec = className[prop]
|
|
11
11
|
if (typeof classnameExec !== 'function') continue
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
let contertedToClass = classnameExec({ props: subProps })
|
|
14
|
+
if (isArray(contertedToClass)) {
|
|
15
|
+
contertedToClass = contertedToClass.reduce((a, c) => merge(a, c), {})
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
for (const finalProp in contertedToClass) subPropsClassname[finalProp] = contertedToClass[finalProp]
|
|
15
19
|
}
|
|
16
20
|
return subPropsClassname
|
|
@@ -38,13 +42,10 @@ const init = (el, s) => {
|
|
|
38
42
|
} else if (screen.slice(0, 1) === '$') {
|
|
39
43
|
const caseKey = screen.slice(1)
|
|
40
44
|
if (!CONFIG_CASES[caseKey]) continue
|
|
41
|
-
|
|
42
45
|
const caseProps = props[screen]
|
|
43
|
-
const execCaseProps = convertToClass(caseProps, el)
|
|
44
|
-
|
|
45
46
|
const { CASE } = className
|
|
46
47
|
if (!CASE) className.CASE = {}
|
|
47
|
-
merge(className.CASE,
|
|
48
|
+
merge(className.CASE, convertToClass(caseProps, el))
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -53,22 +54,25 @@ export const Responsive = {
|
|
|
53
54
|
on: {
|
|
54
55
|
init,
|
|
55
56
|
initUpdate: el => {
|
|
57
|
+
// FORCE STATE UPDATE:
|
|
56
58
|
const { props, class: className } = el
|
|
57
59
|
const rootState = el.__root ? el.__root.state : el.state
|
|
58
60
|
// console.log(props)
|
|
61
|
+
if (el.key !== 'app') return
|
|
59
62
|
|
|
60
63
|
if (props.theme) {
|
|
61
|
-
// console.group(props.theme)
|
|
62
64
|
const { theme } = props
|
|
65
|
+
// console.group(props.theme)
|
|
66
|
+
|
|
67
|
+
const convertTheme = getTheme(theme)
|
|
63
68
|
|
|
64
|
-
for (const key in
|
|
69
|
+
for (const key in convertTheme) {
|
|
65
70
|
if (key.includes('dark') || key.includes('light')) {
|
|
66
71
|
const parse = key.split(': ')[1].split(')')[0]
|
|
67
72
|
if (rootState.globalTheme === parse) {
|
|
68
73
|
props.theme = getTheme(theme[key])
|
|
69
74
|
} else props.theme = theme
|
|
70
75
|
className.MEDIA_FORCED_BY_STATE = props.theme
|
|
71
|
-
props.generatedTheme = true
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
// console.groupEnd(props.theme)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
import Shape from '../Shape'
|
|
3
2
|
|
|
4
3
|
export const Pills = {
|
|
5
4
|
style: {
|
|
@@ -18,13 +17,10 @@ export const Pills = {
|
|
|
18
17
|
},
|
|
19
18
|
childProto: {
|
|
20
19
|
tag: 'div',
|
|
21
|
-
proto: Shape,
|
|
22
20
|
props: {
|
|
23
21
|
round: 42,
|
|
24
22
|
theme: 'White'
|
|
25
23
|
}
|
|
26
24
|
},
|
|
27
|
-
...[
|
|
28
|
-
{}, {}, {}
|
|
29
|
-
]
|
|
25
|
+
...[{}, {}, {}]
|
|
30
26
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/Block/style.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict'
|
package/src/Button/style.js
DELETED
package/src/ButtonSet/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { SquareButton } from '../Button'
|
|
4
|
-
import { Shape } from '../Shape'
|
|
5
|
-
import { Flex } from '../Flex'
|
|
6
|
-
import { Block } from '../Block'
|
|
7
|
-
|
|
8
|
-
export const ButtonSet = {
|
|
9
|
-
tag: 'nav',
|
|
10
|
-
proto: [Shape, Flex, Block],
|
|
11
|
-
childProto: {
|
|
12
|
-
proto: [SquareButton]
|
|
13
|
-
}
|
|
14
|
-
}
|
package/src/Flex/style.js
DELETED
package/src/Grid/style.js
DELETED
package/src/Text/style.js
DELETED
package/src/Transition/style.js
DELETED