smbls 2.7.11 → 2.8.0
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/index.js +9 -0
- package/package.json +11 -35
- package/README.md +0 -35
- package/src/Banner/index.js +0 -23
- package/src/Banner/style.js +0 -27
- package/src/Box.js +0 -16
- package/src/Button.js +0 -48
- package/src/ButtonSet.js +0 -9
- package/src/Collection.js +0 -82
- package/src/DatePicker/index.js +0 -155
- package/src/DatePicker/style.js +0 -18
- package/src/Dropdown.js +0 -51
- package/src/Field.js +0 -41
- package/src/GridLayouts/index.js +0 -20
- package/src/GridLayouts/style.js +0 -47
- package/src/Icon.js +0 -34
- package/src/IconText.js +0 -20
- package/src/Input.js +0 -32
- package/src/Label.js +0 -25
- package/src/Link.js +0 -20
- package/src/Notification.js +0 -46
- package/src/Pills.js +0 -25
- package/src/Range.js +0 -141
- package/src/Select.js +0 -36
- package/src/Sidebar.js +0 -23
- package/src/TextArea.js +0 -15
- package/src/Tooltip.js +0 -37
- package/src/User.js +0 -31
- package/src/__/Media copy.js +0 -121
- package/src/atoms/Animation.js +0 -53
- package/src/atoms/Block.js +0 -151
- package/src/atoms/Direction.js +0 -10
- package/src/atoms/Flex.js +0 -17
- package/src/atoms/Form.js +0 -11
- package/src/atoms/Grid.js +0 -30
- package/src/atoms/Iframe.js +0 -16
- package/src/atoms/Img.js +0 -17
- package/src/atoms/Interaction.js +0 -9
- package/src/atoms/InteractiveComponent.js +0 -78
- package/src/atoms/Media.js +0 -164
- package/src/atoms/Overflow.js +0 -7
- package/src/atoms/Picture.js +0 -31
- package/src/atoms/Position.js +0 -21
- package/src/atoms/Pseudo.js +0 -7
- package/src/atoms/SVG.js +0 -16
- package/src/atoms/Shape/index.js +0 -42
- package/src/atoms/Shape/style.js +0 -204
- package/src/atoms/Text.js +0 -40
- package/src/atoms/Theme.js +0 -136
- package/src/atoms/Timing.js +0 -55
- package/src/atoms/Transform.js +0 -8
- package/src/atoms/XYZ.js +0 -7
- package/src/atoms/index.js +0 -24
- package/src/index.js +0 -32
- package/src/styles.js +0 -6
package/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
export { create } from 'domql'
|
|
4
|
+
export { transformProps } from 'css-in-props'
|
|
5
|
+
export * from '@symbo.ls/init'
|
|
6
|
+
export * from '@symbo.ls/config-default'
|
|
7
|
+
export * from '@symbo.ls/uikit'
|
|
8
|
+
export * from '@symbo.ls/scratch'
|
|
9
|
+
export * from '@symbo.ls/sync-client'
|
package/package.json
CHANGED
|
@@ -1,42 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smbls",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"repository": "https://github.com/symbo-ls/smbls",
|
|
8
|
-
"main": "src/index.js",
|
|
9
|
-
"files": [
|
|
10
|
-
"src"
|
|
11
|
-
],
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"registry": "https://registry.npmjs.org"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"start": "parcel showcase/index.html",
|
|
17
|
-
"build": "parcel build showcase/index.html --public-url .",
|
|
18
|
-
"deploy": "yarn build && gh-pages -d dist",
|
|
19
|
-
"clean": "rm yarn.lock && rm -rf node_modules && rm -rf dist && rm -rf .cache",
|
|
20
|
-
"reinstall": "rm yarn.lock && rm -rf node_modules/rackai && yarn"
|
|
21
|
-
},
|
|
3
|
+
"version": "2.8.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"gitHead": "8c30d75c787deaaaf0cf1a3715116177023a1f65",
|
|
22
7
|
"dependencies": {
|
|
23
|
-
"@
|
|
8
|
+
"@symbo.ls/cli": "latest",
|
|
9
|
+
"@symbo.ls/config-default": "latest",
|
|
24
10
|
"@symbo.ls/init": "latest",
|
|
25
11
|
"@symbo.ls/scratch": "latest",
|
|
26
|
-
"@symbo.ls/
|
|
27
|
-
"@symbo.ls/
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.11.5",
|
|
32
|
-
"@emotion/css": "^11.5.0",
|
|
33
|
-
"babel-eslint": "^10.0.3",
|
|
34
|
-
"eslint": "^6.1.0",
|
|
35
|
-
"parcel-bundler": "^1.12.4",
|
|
36
|
-
"parcel-plugin-svg-sprite": "^1.4.1",
|
|
37
|
-
"standard": "^13.1.0"
|
|
12
|
+
"@symbo.ls/socket-ui": "latest",
|
|
13
|
+
"@symbo.ls/uikit": "latest",
|
|
14
|
+
"css-in-props": "latest",
|
|
15
|
+
"domql": "latest"
|
|
38
16
|
},
|
|
39
|
-
"
|
|
40
|
-
"parser": "babel-eslint"
|
|
41
|
-
}
|
|
17
|
+
"source": "src/index.js"
|
|
42
18
|
}
|
package/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Symbols
|
|
2
|
-
|
|
3
|
-
UI Library in composition of [Scratch](https://github.com/symbo.ls/scratch) and [DOMQL](https://github.com/symbo.ls/domql) or [React](https://github.com/symbo-ls/smbls/tree/main/packages/all/react.js)
|
|
4
|
-
|
|
5
|
-
Check out the [documentation page](https://docs.symbols.app/).
|
|
6
|
-
|
|
7
|
-
[](https://badge.fury.io/js/smbls)
|
|
8
|
-
|
|
9
|
-
### UI Components
|
|
10
|
-
|
|
11
|
-
Library consists with packages. Components can be invoked individually.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Setup
|
|
15
|
-
|
|
16
|
-
1. Installation
|
|
17
|
-
```
|
|
18
|
-
yarn add smbls@^1.1.1
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
2. Import the component from Symbols
|
|
22
|
-
```
|
|
23
|
-
import { Box } from 'smbls'
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
3. Use it inside your DOMQL code
|
|
27
|
-
### DOMQL
|
|
28
|
-
```javascript
|
|
29
|
-
const Header = { props }
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### React
|
|
33
|
-
```javascript
|
|
34
|
-
<Box {...props} />
|
|
35
|
-
```
|
package/src/Banner/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { styleParentMode } from './style'
|
|
4
|
-
|
|
5
|
-
import { Shape, Icon } from '..'
|
|
6
|
-
import { UserBundle } from '../User'
|
|
7
|
-
|
|
8
|
-
export const ParentMode = {
|
|
9
|
-
extend: Shape,
|
|
10
|
-
round: 10,
|
|
11
|
-
theme: 'purple',
|
|
12
|
-
style: styleParentMode,
|
|
13
|
-
icon: {
|
|
14
|
-
extend: Icon,
|
|
15
|
-
props: { icon: 'checkMedium' }
|
|
16
|
-
},
|
|
17
|
-
h2: 'Welcome to parent Mode',
|
|
18
|
-
description: {
|
|
19
|
-
extend: UserBundle,
|
|
20
|
-
users: { ...[{}, {}, {}] },
|
|
21
|
-
span: 'You\'ll now be able to chat with tutor privately. No other participants will see the messages.'
|
|
22
|
-
}
|
|
23
|
-
}
|
package/src/Banner/style.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
export const styleParentMode = {
|
|
4
|
-
boxSizing: 'border-box',
|
|
5
|
-
padding: '3.6em 1.6em 4em 3.6em',
|
|
6
|
-
position: 'relative',
|
|
7
|
-
display: 'block',
|
|
8
|
-
width: '700px',
|
|
9
|
-
'> svg': {
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
top: '1.2em',
|
|
12
|
-
right: '1.2em',
|
|
13
|
-
color: 'rgba(215, 100, 185, .2)'
|
|
14
|
-
},
|
|
15
|
-
'> div': {
|
|
16
|
-
alignItems: 'flex-start',
|
|
17
|
-
'> div': { marginTop: '4px'}
|
|
18
|
-
},
|
|
19
|
-
h2: {
|
|
20
|
-
margin: 0,
|
|
21
|
-
marginBottom: '10px'
|
|
22
|
-
},
|
|
23
|
-
span: {
|
|
24
|
-
maxWidth: `${314 / 14}em`,
|
|
25
|
-
lineHeight: '22px'
|
|
26
|
-
}
|
|
27
|
-
}
|
package/src/Box.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Shape, Position, Theme, Block, Text, Overflow, Timing, Transform, Media, Interaction, XYZ, Animation } from './atoms'
|
|
4
|
-
|
|
5
|
-
const PropsCSS = {
|
|
6
|
-
class: {
|
|
7
|
-
style: ({ props }) => props && props.style
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Box = {
|
|
12
|
-
extend: [Shape, Position, Theme, Block, Text, Overflow, Timing, Transform, Media, PropsCSS, Interaction, XYZ, Animation],
|
|
13
|
-
attr: {
|
|
14
|
-
id: ({ props }) => props.id
|
|
15
|
-
}
|
|
16
|
-
}
|
package/src/Button.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { FocusableComponent } from './atoms'
|
|
4
|
-
import { IconText } from '.'
|
|
5
|
-
|
|
6
|
-
export const Button = {
|
|
7
|
-
extend: [FocusableComponent, IconText],
|
|
8
|
-
tag: 'button',
|
|
9
|
-
props: {
|
|
10
|
-
fontSize: 'A',
|
|
11
|
-
type: 'button',
|
|
12
|
-
border: 'none',
|
|
13
|
-
display: 'inline-flex',
|
|
14
|
-
align: 'center center',
|
|
15
|
-
textDecoration: 'none',
|
|
16
|
-
lineHeight: '1',
|
|
17
|
-
whiteSpace: 'nowrap',
|
|
18
|
-
padding: 'Z A1',
|
|
19
|
-
fontFamily: 'inherit',
|
|
20
|
-
round: 'C2'
|
|
21
|
-
},
|
|
22
|
-
attr: {
|
|
23
|
-
type: ({ props }) => props.type
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const SquareButton = {
|
|
28
|
-
extend: Button,
|
|
29
|
-
props: {
|
|
30
|
-
fontSize: 'A',
|
|
31
|
-
width: 'A',
|
|
32
|
-
padding: 'Z',
|
|
33
|
-
aspectRatio: '1 / 1',
|
|
34
|
-
justifyContent: 'center',
|
|
35
|
-
round: 'Z',
|
|
36
|
-
style: { boxSizing: 'content-box' }
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const CircleButton = {
|
|
41
|
-
extend: SquareButton,
|
|
42
|
-
props: { round: 'C' }
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const KangorooButton = {
|
|
46
|
-
extend: Button,
|
|
47
|
-
childExtend: IconText
|
|
48
|
-
}
|
package/src/ButtonSet.js
DELETED
package/src/Collection.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { isNot, isArray, isObject, isObjectLike, diff, deepClone } from '@domql/utils'
|
|
4
|
-
|
|
5
|
-
export const Collection = {
|
|
6
|
-
define: {
|
|
7
|
-
$setCollection: (param, el, state) => {
|
|
8
|
-
if (!param) return
|
|
9
|
-
|
|
10
|
-
let data = isArray(param) ? param : []
|
|
11
|
-
|
|
12
|
-
if (isObject(param)) {
|
|
13
|
-
for (const obj in param) { data.push(param[obj]) }
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
data = data.map(item => !isObjectLike(item) ? {
|
|
17
|
-
props: { value: item }
|
|
18
|
-
} : item)
|
|
19
|
-
|
|
20
|
-
if (data.length) {
|
|
21
|
-
const t = setTimeout(() => {
|
|
22
|
-
el.set({ tag: 'fragment', ...data }, { preventDefineUpdate: '$setCollection' })
|
|
23
|
-
clearTimeout(t)
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return data
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
$setStateCollection: (param, el, state) => {
|
|
31
|
-
if (!param) return
|
|
32
|
-
if (param.parse) param = param.parse()
|
|
33
|
-
if (isNot(param)('array', 'object')) return
|
|
34
|
-
|
|
35
|
-
if (el.key === 'cnt') {
|
|
36
|
-
if (el.__stateCollectionCache) {
|
|
37
|
-
const d = diff(param, el.__stateCollectionCache) // eslint-disable-line
|
|
38
|
-
} else {
|
|
39
|
-
el.__stateCollectionCache = deepClone(param)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const obj = { tag: 'fragment' }
|
|
44
|
-
|
|
45
|
-
for (const key in param) {
|
|
46
|
-
const value = param[key]
|
|
47
|
-
obj[key] = { state: isObjectLike(value) ? value : { value } }
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const set = () => {
|
|
51
|
-
el.set(obj, { preventDefineUpdate: '$setStateCollection' })
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (el.props.lazyLoad) {
|
|
55
|
-
window.requestAnimationFrame(set)
|
|
56
|
-
} else set()
|
|
57
|
-
|
|
58
|
-
return obj
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
$setPropsCollection: (param, el, state) => {
|
|
62
|
-
if (!param) return
|
|
63
|
-
if (isNot(param)('array', 'object')) return
|
|
64
|
-
|
|
65
|
-
const obj = { tag: 'fragment' }
|
|
66
|
-
for (const key in param) {
|
|
67
|
-
const value = param[key]
|
|
68
|
-
obj[key] = { props: isObjectLike(value) ? value : { value } }
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const set = () => {
|
|
72
|
-
el.set(obj, { preventDefineUpdate: '$setStateCollection' })
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (el.props.lazyLoad) {
|
|
76
|
-
window.requestAnimationFrame(set)
|
|
77
|
-
} else set()
|
|
78
|
-
|
|
79
|
-
return obj
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
package/src/DatePicker/index.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import style from './style'
|
|
4
|
-
|
|
5
|
-
import { SquareButton, Flex, Button, Grid } from '..'
|
|
6
|
-
|
|
7
|
-
const buttonProps = {
|
|
8
|
-
theme: 'transparent',
|
|
9
|
-
color: '--theme-quinary-dark-color',
|
|
10
|
-
':hover': {
|
|
11
|
-
theme: 'quinary .child'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const aside = {
|
|
16
|
-
props: {
|
|
17
|
-
gap: 'X2',
|
|
18
|
-
margin: '-Z - -Z -X2',
|
|
19
|
-
padding: 'Z - Z X2',
|
|
20
|
-
minHeight: '100%',
|
|
21
|
-
height: '100%',
|
|
22
|
-
width: '--spacing-D'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
cnt: {
|
|
26
|
-
extend: Flex,
|
|
27
|
-
props: {
|
|
28
|
-
flow: 'column',
|
|
29
|
-
overflow: 'hidden auto',
|
|
30
|
-
boxSize: '100% --spacing-D',
|
|
31
|
-
top: '0',
|
|
32
|
-
position: 'absolute',
|
|
33
|
-
maxHeight: '100%',
|
|
34
|
-
justifyContent: 'flex-end'
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
childExtend: {
|
|
38
|
-
extend: Button,
|
|
39
|
-
props: {
|
|
40
|
-
...buttonProps,
|
|
41
|
-
fontSize: 'Z1'
|
|
42
|
-
},
|
|
43
|
-
text: ({ state }) => state.value
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const main = {
|
|
50
|
-
extend: Flex,
|
|
51
|
-
|
|
52
|
-
props: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
gap: 'X2',
|
|
55
|
-
flow: 'column',
|
|
56
|
-
|
|
57
|
-
header: {
|
|
58
|
-
align: 'center space-between'
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
header: {
|
|
63
|
-
extend: Flex,
|
|
64
|
-
left: {
|
|
65
|
-
extend: SquareButton,
|
|
66
|
-
props: {
|
|
67
|
-
...buttonProps,
|
|
68
|
-
round: 'C',
|
|
69
|
-
icon: 'arrowAngleLeft'
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
month: {
|
|
73
|
-
tag: 'span',
|
|
74
|
-
text: 'December'
|
|
75
|
-
},
|
|
76
|
-
right: {
|
|
77
|
-
extend: SquareButton,
|
|
78
|
-
props: {
|
|
79
|
-
...buttonProps,
|
|
80
|
-
round: 'C',
|
|
81
|
-
icon: 'arrowAngleRight'
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
days: {
|
|
86
|
-
extend: Flex,
|
|
87
|
-
props: {
|
|
88
|
-
flow: 'column',
|
|
89
|
-
gap: 'X2'
|
|
90
|
-
},
|
|
91
|
-
childExtend: {
|
|
92
|
-
extend: Grid,
|
|
93
|
-
props: {
|
|
94
|
-
columns: 'repeat(7, 1fr)',
|
|
95
|
-
gap: 'X2'
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
weekDays: {
|
|
99
|
-
childExtend: {
|
|
100
|
-
extend: Button,
|
|
101
|
-
props: {
|
|
102
|
-
...buttonProps,
|
|
103
|
-
fontSize: 'Z1',
|
|
104
|
-
padding: 'X2'
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
...[
|
|
108
|
-
{ text: 'Mo' },
|
|
109
|
-
{ text: 'Tu' },
|
|
110
|
-
{ text: 'We' },
|
|
111
|
-
{ text: 'Th' },
|
|
112
|
-
{ text: 'Fr' },
|
|
113
|
-
{ text: 'Sa' },
|
|
114
|
-
{ text: 'Su' }
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
cnt: {
|
|
119
|
-
childExtend: {
|
|
120
|
-
extend: SquareButton,
|
|
121
|
-
|
|
122
|
-
props: ({ key, state }) => ({
|
|
123
|
-
...buttonProps,
|
|
124
|
-
theme: 'quaternary',
|
|
125
|
-
active: key === '18',
|
|
126
|
-
'.active': {
|
|
127
|
-
theme: 'quinary'
|
|
128
|
-
}
|
|
129
|
-
})
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
...new Array(31).fill(undefined).map((_, i) => ({ text: i + 1 }))
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export const DatePicker = {
|
|
138
|
-
style,
|
|
139
|
-
extend: Flex,
|
|
140
|
-
|
|
141
|
-
props: {
|
|
142
|
-
position: 'relative',
|
|
143
|
-
theme: 'quinary',
|
|
144
|
-
transition: 'A all',
|
|
145
|
-
round: 'Z',
|
|
146
|
-
padding: 'Z Z2 Z X2',
|
|
147
|
-
gap: 'X2',
|
|
148
|
-
depth: 16,
|
|
149
|
-
minHeight: '0',
|
|
150
|
-
align: 'stretch center'
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
aside,
|
|
154
|
-
main
|
|
155
|
-
}
|
package/src/DatePicker/style.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
main: {
|
|
5
|
-
'section > header span:nth-child(6)': {
|
|
6
|
-
opacity: 0.5
|
|
7
|
-
},
|
|
8
|
-
'section > header span:nth-child(7)': {
|
|
9
|
-
opacity: 0.5
|
|
10
|
-
},
|
|
11
|
-
'section > div button:nth-child(7n)': {
|
|
12
|
-
opacity: 0.5
|
|
13
|
-
},
|
|
14
|
-
'section > div button:nth-child(7n - 1)': {
|
|
15
|
-
opacity: 0.5
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
package/src/Dropdown.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Flex, Button } from '.'
|
|
4
|
-
|
|
5
|
-
export const DropdownList = {
|
|
6
|
-
extend: Flex,
|
|
7
|
-
|
|
8
|
-
props: {
|
|
9
|
-
padding: '0 Y',
|
|
10
|
-
maxHeight: 'G',
|
|
11
|
-
flow: 'column',
|
|
12
|
-
theme: 'quaternary',
|
|
13
|
-
overflow: 'hidden auto',
|
|
14
|
-
style: { listStyleType: 'none' }
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
childExtend: {
|
|
18
|
-
extend: Button,
|
|
19
|
-
|
|
20
|
-
props: (el, s) => ({
|
|
21
|
-
active: s.active === el.key,
|
|
22
|
-
position: 'relative',
|
|
23
|
-
round: '0',
|
|
24
|
-
align: 'center flex-end',
|
|
25
|
-
flow: 'row-reverse',
|
|
26
|
-
padding: 'Z2 C Z2 Y2',
|
|
27
|
-
margin: '0',
|
|
28
|
-
gap: 'Y2',
|
|
29
|
-
theme: 'quaternary .child',
|
|
30
|
-
|
|
31
|
-
':hover': {
|
|
32
|
-
style: {
|
|
33
|
-
svg: { opacity: '0.5' }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
icon: {
|
|
38
|
-
active: s.active === el.key,
|
|
39
|
-
name: 'checkmark',
|
|
40
|
-
opacity: '0.1',
|
|
41
|
-
'.active': { opacity: '1' }
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
':not(:first-child)': {
|
|
45
|
-
'@dark': { border: 'gray4 .65, solid' },
|
|
46
|
-
'@light': { border: 'gray11, solid' },
|
|
47
|
-
borderWidth: '1px 0 0'
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
}
|
package/src/Field.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { IconText, Input, Focusable } from '.'
|
|
4
|
-
|
|
5
|
-
export const Field = {
|
|
6
|
-
extend: [IconText],
|
|
7
|
-
|
|
8
|
-
props: (el, s) => ({
|
|
9
|
-
value: s[el.key],
|
|
10
|
-
|
|
11
|
-
depth: 16,
|
|
12
|
-
placeholder: '',
|
|
13
|
-
padding: 'A B',
|
|
14
|
-
round: 'C',
|
|
15
|
-
type: 'text',
|
|
16
|
-
position: 'relative',
|
|
17
|
-
width: '16em',
|
|
18
|
-
|
|
19
|
-
style: {
|
|
20
|
-
appearance: 'none',
|
|
21
|
-
outline: 0,
|
|
22
|
-
border: 'none',
|
|
23
|
-
cursor: 'pointer',
|
|
24
|
-
fontFamily: 'inherit',
|
|
25
|
-
boxSizing: 'border-box'
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
input: {
|
|
29
|
-
width: '100%',
|
|
30
|
-
height: '100%',
|
|
31
|
-
border: 'none'
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
svg: {
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
right: '1em'
|
|
37
|
-
}
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
input: { extend: [Focusable, Input] }
|
|
41
|
-
}
|
package/src/GridLayouts/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Button, Link } from '..'
|
|
4
|
-
|
|
5
|
-
import { styleGrid, styleGrid2 } from './style'
|
|
6
|
-
|
|
7
|
-
const componentLink = {
|
|
8
|
-
extend: Link,
|
|
9
|
-
attr: {
|
|
10
|
-
href: '#'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const grid = {
|
|
15
|
-
style: styleGrid
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const grid2 = {
|
|
19
|
-
style: styleGrid2
|
|
20
|
-
}
|
package/src/GridLayouts/style.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
export const styleGrid = {
|
|
4
|
-
display: 'grid',
|
|
5
|
-
gridTemplateColumns: 'repeat(15, 1fr)',
|
|
6
|
-
boxSizing: 'border-box',
|
|
7
|
-
padding: '0 8em',
|
|
8
|
-
marginBottom: '2em',
|
|
9
|
-
rowGap: '10px',
|
|
10
|
-
gridAutoColumns: 'auto',
|
|
11
|
-
gridAutoRows: 'auto',
|
|
12
|
-
gridAutoFlow: 'column',
|
|
13
|
-
'> a': {
|
|
14
|
-
padding: '70px 0',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
background: 'rgba(255, 255, 255, .05)',
|
|
18
|
-
borderRadius: '12px',
|
|
19
|
-
alignItems: 'center'
|
|
20
|
-
},
|
|
21
|
-
'> a:first-child': {
|
|
22
|
-
gridColumn: '1 / span 15'
|
|
23
|
-
},
|
|
24
|
-
'> a:nth-child(2)': {
|
|
25
|
-
gridRow: '2',
|
|
26
|
-
gridColumn: '1 / span 3',
|
|
27
|
-
marginRight: '10px'
|
|
28
|
-
},
|
|
29
|
-
'> a:nth-child(3)': {
|
|
30
|
-
gridRow: '2',
|
|
31
|
-
gridColumn: '4 / span 6',
|
|
32
|
-
marginRight: '10px'
|
|
33
|
-
},
|
|
34
|
-
'> a:nth-child(4)': {
|
|
35
|
-
gridRow: '2',
|
|
36
|
-
gridColumn: '10 / span 15'
|
|
37
|
-
},
|
|
38
|
-
'> a:nth-child(5)': {
|
|
39
|
-
gridRow: '3',
|
|
40
|
-
gridColumn: '1 / span 6',
|
|
41
|
-
marginRight: '10px'
|
|
42
|
-
},
|
|
43
|
-
'> a:nth-child(6)': {
|
|
44
|
-
gridRow: '3',
|
|
45
|
-
gridColumn: '7 / span 15'
|
|
46
|
-
}
|
|
47
|
-
}
|
package/src/Icon.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { SVG } from './atoms'
|
|
4
|
-
import { toCamelCase } from '@symbo.ls/utils'
|
|
5
|
-
|
|
6
|
-
export const Icon = {
|
|
7
|
-
extend: SVG,
|
|
8
|
-
props: ({ key, props, parent, context }) => {
|
|
9
|
-
const { ICONS } = context && context.system
|
|
10
|
-
const iconName = props.inheritedString || props.name || props.icon || key
|
|
11
|
-
const camelCase = toCamelCase(iconName)
|
|
12
|
-
|
|
13
|
-
const isArray = camelCase.split(/([a-z])([A-Z])/g)
|
|
14
|
-
|
|
15
|
-
let activeIconName
|
|
16
|
-
if (props.active) {
|
|
17
|
-
activeIconName = props['.active'].name || props['.active'].icon
|
|
18
|
-
}
|
|
19
|
-
if (parent.props.active && parent.props['.active'] && parent.props['.active'].icon) {
|
|
20
|
-
activeIconName = parent.props['.active'].icon.name || parent.props['.active'].icon.icon || parent.props['.active'].icon
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const iconFromLibrary = ICONS[activeIconName] || ICONS[camelCase] || (ICONS[isArray[0] + isArray[1]]) || ICONS[isArray[0]] || ICONS['noIcon']
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
width: 'A',
|
|
27
|
-
height: 'A',
|
|
28
|
-
display: 'inline-block',
|
|
29
|
-
src: iconFromLibrary,
|
|
30
|
-
style: { fill: 'currentColor' }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
attr: { viewBox: '0 0 24 24' }
|
|
34
|
-
}
|