smbls 0.15.44 → 0.15.46
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/Input.js +2 -1
- package/src/atoms/Form.js +11 -0
- package/src/atoms/Iframe.js +16 -0
- package/src/atoms/InteractiveComponent.js +82 -0
- package/src/atoms/index.js +3 -0
package/package.json
CHANGED
package/src/Input.js
CHANGED
|
@@ -13,10 +13,11 @@ export const Input = {
|
|
|
13
13
|
fontSize: 'A',
|
|
14
14
|
round: 'C',
|
|
15
15
|
lineHeight: 1,
|
|
16
|
-
padding: 'Z A'
|
|
16
|
+
padding: 'Z A'
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
attr: {
|
|
20
|
+
name: ({ props }) => props.name,
|
|
20
21
|
placeholder: ({ props }) => props.placeholder,
|
|
21
22
|
value: ({ props }) => props.value,
|
|
22
23
|
disabled: ({ props }) => props.disabled || null,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
export const Iframe = {
|
|
4
|
+
tag: 'iframe',
|
|
5
|
+
props: {
|
|
6
|
+
position: 'relative',
|
|
7
|
+
minWidth: 'H',
|
|
8
|
+
minHeight: 'H'
|
|
9
|
+
},
|
|
10
|
+
attr: {
|
|
11
|
+
src: ({ props }) => props.src,
|
|
12
|
+
loading: ({ props }) => props.loading,
|
|
13
|
+
allowfullscreen: ({ props }) => props.allowfullscreen,
|
|
14
|
+
referrerpolicy: ({ props }) => props.referrerpolicy
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const style = {
|
|
4
|
+
appearance: 'none',
|
|
5
|
+
border: 'none',
|
|
6
|
+
cursor: 'pointer',
|
|
7
|
+
fontFamily: 'inherit'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Hoverable = {
|
|
11
|
+
props: {
|
|
12
|
+
transition: 'C defaultBezier',
|
|
13
|
+
transitionProperty: 'opacity, transform',
|
|
14
|
+
opacity: 0.85,
|
|
15
|
+
|
|
16
|
+
':hover': {
|
|
17
|
+
opacity: 0.9,
|
|
18
|
+
transform: 'scale(1.015)'
|
|
19
|
+
},
|
|
20
|
+
':active': {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
transform: 'scale(1.015)'
|
|
23
|
+
},
|
|
24
|
+
'.active': {
|
|
25
|
+
opacity: 1,
|
|
26
|
+
transform: 'scale(1.015)',
|
|
27
|
+
|
|
28
|
+
':hover': { opacity: 1 }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Clickable = {
|
|
34
|
+
extend: Hoverable,
|
|
35
|
+
props: {
|
|
36
|
+
':active': {
|
|
37
|
+
opacity: 1,
|
|
38
|
+
transform: 'scale(1.015)'
|
|
39
|
+
},
|
|
40
|
+
'.active': {
|
|
41
|
+
opacity: 1
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const Focusable = {
|
|
47
|
+
props: {
|
|
48
|
+
border: 'none',
|
|
49
|
+
outline: 'solid, 0, blue .3',
|
|
50
|
+
':focus-visible': {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
outline: 'solid, X, blue .3'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ':not(:focus-visible):invalid': {
|
|
56
|
+
// outline: 'solid, X, red .3'
|
|
57
|
+
// }
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
attr: {
|
|
61
|
+
placeholder: ({ props }) => props.placeholder,
|
|
62
|
+
tabIndex: ({ props }) => props.tabIndex
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const FocusableComponent = {
|
|
67
|
+
extend: Focusable,
|
|
68
|
+
tag: 'button',
|
|
69
|
+
props: {
|
|
70
|
+
fontSize: 'A',
|
|
71
|
+
type: 'button',
|
|
72
|
+
border: 'none',
|
|
73
|
+
textDecoration: 'none',
|
|
74
|
+
lineHeight: '1',
|
|
75
|
+
whiteSpace: 'nowrap',
|
|
76
|
+
fontFamily: 'inherit',
|
|
77
|
+
style
|
|
78
|
+
},
|
|
79
|
+
attr: {
|
|
80
|
+
type: ({ props }) => props.type
|
|
81
|
+
}
|
|
82
|
+
}
|
package/src/atoms/index.js
CHANGED
|
@@ -5,8 +5,11 @@ export * from './Direction'
|
|
|
5
5
|
export * from './Flex'
|
|
6
6
|
export * from './Grid'
|
|
7
7
|
export * from './Img'
|
|
8
|
+
export * from './Form'
|
|
8
9
|
export * from './Media'
|
|
10
|
+
export * from './Iframe'
|
|
9
11
|
export * from './Interaction'
|
|
12
|
+
export * from './InteractiveComponent'
|
|
10
13
|
export * from './Overflow'
|
|
11
14
|
export * from './Position'
|
|
12
15
|
export * from './Picture'
|