@zuzjs/ui 0.3.2 → 0.3.4
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/README.md +0 -0
- package/dist/hooks.js +89 -0
- package/dist/styles.css +37 -62
- package/dist/ui.js +665 -0
- package/jest.config.js +0 -0
- package/package.json +16 -18
- package/rollup.config.js +30 -47
- package/src/comps/box.tsx +24 -28
- package/src/comps/button.tsx +23 -47
- package/src/comps/crumb.tsx +9 -0
- package/src/comps/form.tsx +57 -88
- package/src/comps/heading.tsx +25 -31
- package/src/comps/icon.tsx +24 -36
- package/src/comps/input.tsx +24 -224
- package/src/comps/select.tsx +23 -63
- package/src/comps/spinner.tsx +23 -35
- package/src/comps/stylesheet.tsx +5 -0
- package/src/context/AppContext.tsx +2 -2
- package/src/context/AppProvider.tsx +68 -105
- package/src/context/createSlice.tsx +15 -39
- package/src/context/index.tsx +4 -5
- package/src/core/css.ts +1 -0
- package/src/core/index.tsx +241 -0
- package/src/core/styles.ts +378 -371
- package/src/hooks/index.tsx +2 -10
- package/src/hooks/useDispatch.tsx +36 -36
- package/src/hooks/useStore.tsx +24 -26
- package/src/hooks.tsx +8 -0
- package/src/scss/mixins.scss +2 -2
- package/src/scss/props.scss +91 -69
- package/src/scss/{style.scss → styles.scss} +102 -132
- package/src/ui.tsx +13 -0
- package/tsconfig.json +0 -0
- package/tsconfig.lib.json +0 -0
- package/tsconfig.spec.json +0 -0
- package/dist/index.js +0 -1868
- package/src/actions/addForm.tsx +0 -0
- package/src/actions/index.tsx +0 -29
- package/src/actions/redo.tsx +0 -1
- package/src/actions/reset.tsx +0 -1
- package/src/actions/undo.tsx +0 -1
- package/src/comps/app.tsx +0 -34
- package/src/comps/checkbox.tsx +0 -74
- package/src/comps/component.tsx +0 -32
- package/src/comps/contextmenu.tsx +0 -60
- package/src/comps/cover.tsx +0 -34
- package/src/comps/image.tsx +0 -34
- package/src/comps/masonry.tsx +0 -192
- package/src/comps/mediaplayer.tsx +0 -12
- package/src/comps/placeholder.tsx +0 -58
- package/src/comps/root.tsx +0 -32
- package/src/comps/spacer.tsx +0 -20
- package/src/comps/text.tsx +0 -27
- package/src/comps/toaster.tsx +0 -117
- package/src/comps/tweet.tsx +0 -48
- package/src/context/_AppProvider.tsx +0 -116
- package/src/context/combineReducers.tsx +0 -47
- package/src/context/combineState.tsx +0 -14
- package/src/context/reduceReducers.tsx +0 -6
- package/src/context/store/appbase.tsx +0 -19
- package/src/context/store/lang.tsx +0 -26
- package/src/context/store/theme.tsx +0 -54
- package/src/core/defaultTheme.ts +0 -90
- package/src/core/extractCurrentDesignState.tsx +0 -0
- package/src/core/index.ts +0 -431
- package/src/core/router.ts +0 -86
- package/src/hooks/useAppReducer.tsx +0 -40
- package/src/hooks/useChooseEffect.tsx +0 -6
- package/src/hooks/useContextMenu.tsx +0 -123
- package/src/hooks/useDevice.tsx +0 -164
- package/src/hooks/useImage.tsx +0 -84
- package/src/hooks/useLang.tsx +0 -9
- package/src/hooks/useMediaPlayer.tsx +0 -27
- package/src/hooks/useNavigator.tsx +0 -6
- package/src/hooks/useRender.tsx +0 -29
- package/src/hooks/useResizeObserver.tsx +0 -84
- package/src/hooks/useRouter.tsx +0 -45
- package/src/hooks/useSelector.tsx +0 -9
- package/src/hooks/useTheme.tsx +0 -9
- package/src/hooks/useToast.tsx +0 -11
- package/src/index.tsx +0 -35
- package/src/kit/Builder.tsx +0 -18
- package/src/kit/Component.tsx +0 -32
- package/src/kit/Header.tsx +0 -21
- package/src/redux/slices/app.js +0 -26
- package/src/redux/slices/form.js +0 -46
- package/src/redux/store.js +0 -33
- package/src/scss/constants.scss +0 -4
package/src/hooks/index.tsx
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as useStore } from './useStore'
|
|
4
|
-
export { default as useDispatch } from './useDispatch'
|
|
5
|
-
export { default as useResizeObserver } from './useResizeObserver'
|
|
6
|
-
export { default as useDevice } from './useDevice'
|
|
7
|
-
export { default as useToast } from './useToast'
|
|
8
|
-
export { default as useLang } from './useLang'
|
|
9
|
-
export { default as useContextMenu } from './useContextMenu'
|
|
10
|
-
export { default as useRender } from './useRender'
|
|
1
|
+
export { default as useStore } from './useStore'
|
|
2
|
+
export { default as useDispatch } from './useDispatch'
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { useContext } from 'react'
|
|
2
|
-
import AppContext from '../context'
|
|
3
|
-
|
|
4
|
-
const useDispatch = (key? : string) => {
|
|
5
|
-
|
|
6
|
-
const state = useContext(AppContext)
|
|
7
|
-
const dispatch = state['dispatch'];
|
|
8
|
-
|
|
9
|
-
const prepareState = (prevState, nextState) => {
|
|
10
|
-
const nextKeys = Object.keys(nextState)
|
|
11
|
-
nextKeys.map(k => {
|
|
12
|
-
if(prevState[k] !== nextState[k]){
|
|
13
|
-
prevState[k] = nextState[k]
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
...prevState,
|
|
18
|
-
...nextState
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if(key){
|
|
23
|
-
return (payload = {}) => {
|
|
24
|
-
|
|
25
|
-
dispatch({
|
|
26
|
-
action: key,
|
|
27
|
-
payload: {
|
|
28
|
-
[key] : prepareState(state[key], payload)
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return dispatch;
|
|
35
|
-
}
|
|
36
|
-
|
|
1
|
+
import { useContext } from 'react'
|
|
2
|
+
import AppContext from '../context'
|
|
3
|
+
|
|
4
|
+
const useDispatch = (key? : string) => {
|
|
5
|
+
|
|
6
|
+
const state = useContext(AppContext)
|
|
7
|
+
const dispatch = state['dispatch'];
|
|
8
|
+
|
|
9
|
+
const prepareState = (prevState, nextState) => {
|
|
10
|
+
const nextKeys = Object.keys(nextState)
|
|
11
|
+
nextKeys.map(k => {
|
|
12
|
+
if(prevState[k] !== nextState[k]){
|
|
13
|
+
prevState[k] = nextState[k]
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
...prevState,
|
|
18
|
+
...nextState
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if(key){
|
|
23
|
+
return (payload = {}) => {
|
|
24
|
+
|
|
25
|
+
dispatch({
|
|
26
|
+
action: key,
|
|
27
|
+
payload: {
|
|
28
|
+
[key] : prepareState(state[key], payload)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return dispatch;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
37
|
export default useDispatch
|
package/src/hooks/useStore.tsx
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { useContext } from 'react'
|
|
2
|
-
import AppContext from '../context'
|
|
3
|
-
import { STORE_KEY } from '../context/AppProvider'
|
|
4
|
-
|
|
5
|
-
const useStore = (callback? : any, withFilter = true) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
1
|
+
import { useContext } from 'react'
|
|
2
|
+
import AppContext from '../context'
|
|
3
|
+
import { STORE_KEY } from '../context/AppProvider'
|
|
4
|
+
|
|
5
|
+
const useStore = (callback? : any, withFilter = true) => {
|
|
6
|
+
|
|
7
|
+
let _state = useContext(AppContext)
|
|
8
|
+
let state = withFilter ? {} : _state
|
|
9
|
+
|
|
10
|
+
if(withFilter){
|
|
11
|
+
const filters = ['defaultState', 'theme', 'dispatch', `${STORE_KEY}base`,`${STORE_KEY}forms`]
|
|
12
|
+
Object.keys(_state).map(k => {
|
|
13
|
+
if(filters.indexOf(k) == -1){
|
|
14
|
+
state[k] = _state[k]
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if("function" == typeof callback){
|
|
20
|
+
return callback(state)
|
|
21
|
+
}
|
|
22
|
+
return state
|
|
23
|
+
}
|
|
24
|
+
|
|
27
25
|
export default useStore
|
package/src/hooks.tsx
ADDED
package/src/scss/mixins.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@mixin anim($duration: 0.3s) {
|
|
2
|
-
transition: all $duration linear 0s;
|
|
1
|
+
@mixin anim($duration: 0.3s) {
|
|
2
|
+
transition: all $duration linear 0s;
|
|
3
3
|
}
|
package/src/scss/props.scss
CHANGED
|
@@ -1,70 +1,92 @@
|
|
|
1
|
-
*, *:before, *:after{
|
|
2
|
-
-moz-box-sizing: border-box;
|
|
3
|
-
-webkit-box-sizing: border-box;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
}
|
|
6
|
-
*, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td{margin: 0;padding: 0;}
|
|
7
|
-
table{border-collapse: collapse; border-spacing: 0;}
|
|
8
|
-
fieldset, img {border: 0}
|
|
9
|
-
address, caption, cite, code, dfn, em, strong, th, var {font-style: normal; font-weight: normal}
|
|
10
|
-
ol, ul, li{list-style: none;}
|
|
11
|
-
caption, th{text-align: left;}
|
|
12
|
-
h1, h2, h3, h4, h5, h6{font-size: 100%; font-weight: normal;}
|
|
13
|
-
div, img, button, input, textarea, select{outline: none}
|
|
14
|
-
strong{font-weight: bold}
|
|
15
|
-
em{font-style: italic;}
|
|
16
|
-
a img{border: none;}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
&.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
*, *:before, *:after{
|
|
2
|
+
-moz-box-sizing: border-box;
|
|
3
|
+
-webkit-box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
*, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td{margin: 0;padding: 0;}
|
|
7
|
+
table{border-collapse: collapse; border-spacing: 0;}
|
|
8
|
+
fieldset, img {border: 0}
|
|
9
|
+
address, caption, cite, code, dfn, em, strong, th, var {font-style: normal; font-weight: normal}
|
|
10
|
+
ol, ul, li{list-style: none;}
|
|
11
|
+
caption, th{text-align: left;}
|
|
12
|
+
h1, h2, h3, h4, h5, h6{font-size: 100%; font-weight: normal;}
|
|
13
|
+
div, img, button, input, textarea, select{outline: none}
|
|
14
|
+
strong{font-weight: bold}
|
|
15
|
+
em{font-style: italic;}
|
|
16
|
+
a img{border: none;}
|
|
17
|
+
|
|
18
|
+
button{cursor: pointer;}
|
|
19
|
+
.grid{ display: grid; }
|
|
20
|
+
.fixed{
|
|
21
|
+
position: fixed;
|
|
22
|
+
&.fill{
|
|
23
|
+
top: 0px;
|
|
24
|
+
left: 0px;
|
|
25
|
+
right: 0px;
|
|
26
|
+
bottom: 0px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.rel{ position: relative; }
|
|
30
|
+
.abs{
|
|
31
|
+
position: absolute;
|
|
32
|
+
&.abc{
|
|
33
|
+
top: 50%;
|
|
34
|
+
left: 50%;
|
|
35
|
+
transform: translate(-50%, -50%);
|
|
36
|
+
}
|
|
37
|
+
&.fill{
|
|
38
|
+
top: 0px;
|
|
39
|
+
left: 0px;
|
|
40
|
+
right: 0px;
|
|
41
|
+
bottom: 0px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sticky{ position: sticky; }
|
|
46
|
+
.block{display: block;}
|
|
47
|
+
.iblock{display: inline-block;}
|
|
48
|
+
.tdnh, .tdn{ text-decoration: none; }
|
|
49
|
+
.tdnh:hover, .tdh:hover{ text-decoration: underline; }
|
|
50
|
+
|
|
51
|
+
.flex{
|
|
52
|
+
display: flex;
|
|
53
|
+
&.ass{align-self: flex-start;}
|
|
54
|
+
&.asc{align-self: center;}
|
|
55
|
+
&.ase{align-self: flex-end;}
|
|
56
|
+
&.ais{align-items: flex-start;}
|
|
57
|
+
&.aic{align-items: center;}
|
|
58
|
+
&.aie{align-items: flex-end;}
|
|
59
|
+
&.jcs{justify-content: flex-start;}
|
|
60
|
+
&.jcc{justify-content: center;}
|
|
61
|
+
&.jce{justify-content: flex-end;}
|
|
62
|
+
&.col{flex-direction: column;}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
COLORS
|
|
67
|
+
It will generate .cfff { color: #fff; } from 'fff'
|
|
68
|
+
*/
|
|
69
|
+
$colors: 'fff','111','222','333','444','555','666','777','888','999';
|
|
70
|
+
@each $n in $colors{
|
|
71
|
+
.c#{$n} { color: unquote("#"+#{$n}); }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
FONT SIZES
|
|
76
|
+
It will generate .s10 { font-size: 12px; } from '12'
|
|
77
|
+
*/
|
|
78
|
+
@for $i from 10 through 72 {
|
|
79
|
+
@if $i % 2 == 0 {
|
|
80
|
+
.s#{$i} { font-size: #{$i}px; }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/*
|
|
85
|
+
BoldSize
|
|
86
|
+
It will generate .b400 { font-weight: 400; } from '400'
|
|
87
|
+
*/
|
|
88
|
+
$bsizes: 100,200,300,400,500,600,700,800,900;
|
|
89
|
+
.bold{ font-weight: bold; }
|
|
90
|
+
@each $n in $bsizes{
|
|
91
|
+
.b#{$n} { font-weight: #{$n}; }
|
|
70
92
|
}
|
|
@@ -1,133 +1,103 @@
|
|
|
1
|
-
@import './
|
|
2
|
-
@import './
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
transform: rotate(0deg);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
transform: rotate(360deg);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
left: 20px;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.zuz-contextmenu{
|
|
109
|
-
width: 220px;
|
|
110
|
-
border-radius: 5px;
|
|
111
|
-
padding: 4px;
|
|
112
|
-
background: rgba(34,34,34,0.5);
|
|
113
|
-
border: 1px rgba(255,255,255,0.25) solid;
|
|
114
|
-
box-shadow: 0px 1px 3px rgba(0, 0, 0, .45);
|
|
115
|
-
backdrop-filter: blur(20px);
|
|
116
|
-
button{
|
|
117
|
-
border: 0px;
|
|
118
|
-
text-align: left;
|
|
119
|
-
padding: 4px 6px;
|
|
120
|
-
background: rgba(0, 0, 0, 0);
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
color: #fff;
|
|
123
|
-
border-radius: 4px;
|
|
124
|
-
&:hover{
|
|
125
|
-
background: #5183ff;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
.line{
|
|
129
|
-
height: 1px;
|
|
130
|
-
background: rgba(255,255,255,0.25);
|
|
131
|
-
margin: 4px 6px;
|
|
132
|
-
}
|
|
1
|
+
@import './mixins.scss';
|
|
2
|
+
@import './props.scss';
|
|
3
|
+
|
|
4
|
+
@keyframes rotate-loop {
|
|
5
|
+
from {
|
|
6
|
+
-ms-transform: rotate(0deg);
|
|
7
|
+
-moz-transform: rotate(0deg);
|
|
8
|
+
-webkit-transform: rotate(0deg);
|
|
9
|
+
-o-transform: rotate(0deg);
|
|
10
|
+
transform: rotate(0deg);
|
|
11
|
+
}
|
|
12
|
+
to {
|
|
13
|
+
-ms-transform: rotate(360deg);
|
|
14
|
+
-moz-transform: rotate(360deg);
|
|
15
|
+
-webkit-transform: rotate(360deg);
|
|
16
|
+
-o-transform: rotate(360deg);
|
|
17
|
+
transform: rotate(360deg);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.zuz-spinner{
|
|
22
|
+
.zuz-loader{
|
|
23
|
+
animation: rotate-loop 0.5s linear infinite;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.button{
|
|
28
|
+
border: 0px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.zuz-checkbox{
|
|
32
|
+
opacity: 0; // hides checkbox
|
|
33
|
+
position: absolute;
|
|
34
|
+
& + label {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
user-select: none;
|
|
38
|
+
transition: .4s ease;
|
|
39
|
+
height: 26px;
|
|
40
|
+
width: 44px;
|
|
41
|
+
border-radius: 60px;
|
|
42
|
+
background: #eee;
|
|
43
|
+
&:before {
|
|
44
|
+
content: "";
|
|
45
|
+
position: absolute;
|
|
46
|
+
display: block;
|
|
47
|
+
transition: .2s cubic-bezier(.24, 0, .5, 1);
|
|
48
|
+
height: 26px;
|
|
49
|
+
width: 44px;
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
border-radius: 30px;
|
|
53
|
+
}
|
|
54
|
+
&:after {
|
|
55
|
+
content: "";
|
|
56
|
+
position: absolute;
|
|
57
|
+
display: block;
|
|
58
|
+
transition: .35s cubic-bezier(.54, 1.60, .5, 1);
|
|
59
|
+
background: #fff;
|
|
60
|
+
height: 22px;
|
|
61
|
+
width: 22px;
|
|
62
|
+
top: 2px;
|
|
63
|
+
left: 2px;
|
|
64
|
+
border-radius: 60px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
&:checked {
|
|
68
|
+
& + label:before {
|
|
69
|
+
background: green; // Active Color
|
|
70
|
+
transition: width .2s cubic-bezier(0, 0, 0, .1);
|
|
71
|
+
}
|
|
72
|
+
& + label:after {
|
|
73
|
+
left: 20px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.zuz-contextmenu{
|
|
79
|
+
width: 220px;
|
|
80
|
+
border-radius: 5px;
|
|
81
|
+
padding: 4px;
|
|
82
|
+
background: rgba(34,34,34,0.5);
|
|
83
|
+
border: 1px rgba(255,255,255,0.25) solid;
|
|
84
|
+
box-shadow: 0px 1px 3px rgba(0, 0, 0, .45);
|
|
85
|
+
backdrop-filter: blur(20px);
|
|
86
|
+
button{
|
|
87
|
+
border: 0px;
|
|
88
|
+
text-align: left;
|
|
89
|
+
padding: 4px 6px;
|
|
90
|
+
background: rgba(0, 0, 0, 0);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
color: #fff;
|
|
93
|
+
border-radius: 4px;
|
|
94
|
+
&:hover{
|
|
95
|
+
background: #5183ff;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
.line{
|
|
99
|
+
height: 1px;
|
|
100
|
+
background: rgba(255,255,255,0.25);
|
|
101
|
+
margin: 4px 6px;
|
|
102
|
+
}
|
|
133
103
|
}
|
package/src/ui.tsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './scss/styles.scss'
|
|
2
|
+
|
|
3
|
+
export * from "./core"
|
|
4
|
+
|
|
5
|
+
export { default as Stylesheet } from "./comps/stylesheet"
|
|
6
|
+
export { default as Box } from "./comps/box"
|
|
7
|
+
export { default as Heading } from "./comps/heading"
|
|
8
|
+
export { default as Input } from "./comps/input"
|
|
9
|
+
export { default as Button } from "./comps/button"
|
|
10
|
+
export { default as Form } from "./comps/form"
|
|
11
|
+
export { default as Icon } from "./comps/icon"
|
|
12
|
+
export { default as Spinner } from "./comps/spinner"
|
|
13
|
+
export { default as Select } from "./comps/select"
|
package/tsconfig.json
CHANGED
|
File without changes
|
package/tsconfig.lib.json
CHANGED
|
File without changes
|
package/tsconfig.spec.json
CHANGED
|
File without changes
|