Skip to content

Commit 1eaa5b0

Browse files
authored
feat: add CrossFlicking Preset (#901)
* feat: add dragThreshold option * feat: add default structure of CrossFlicking * feat: add data attribute usage to CrossFlicking * chore: backup test * refactor: rename vertical to side * chore: update react-scripts to 5.0.1 * test: fix unit test target name * feat: add react-crossflicking * fix: use externalRenderer on react CrossFlicking * feat: support data attrubite for react-crossflicking * docs: add CrossFlicking demo * refactor: refactor CrossFlicking codes * feat: extend crossflicking events from vanilla flicking * test: add options test for CrossFlicking * chore: remove only in crossflicking test * docs: update CrossFlicking demo * docs: update CrossFlicking demo features * fix: apply element property to CrossGroup * fix: do not trigger change when inputEvent not exist * fix: filter options only in CrossFlicking * test: fix event test with added side events * feat: add sideIndex to changed, willchange event
1 parent 0305df3 commit 1eaa5b0

31 files changed

+25433
-31289
lines changed

docs/docusaurus.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ module.exports = {
5454
label: "Showcases",
5555
position: "left"
5656
},
57+
{
58+
to: "Presets",
59+
label: "Presets",
60+
position: "left"
61+
},
5762
{
5863
type: "docsVersionDropdown",
5964
position: "right",

docs/package-lock.json

Lines changed: 2987 additions & 2715 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "^2.4.3",
18-
"@docusaurus/preset-classic": "^2.4.3",
17+
"@docusaurus/core": "2.4.3",
18+
"@docusaurus/preset-classic": "2.4.3",
1919
"@egjs/flicking-plugins": "^4.6.0",
20-
"@egjs/react-flicking": "^4.11.4",
20+
"@egjs/react-flicking": "^4.12.0-beta.6",
2121
"@egjs/react-grid": "^1.1.2",
2222
"@mdx-js/react": "^1.6.21",
2323
"bulma": "^0.9.2",
2424
"clsx": "^1.1.1",
25-
"docusaurus-plugin-sass": "^0.2.5",
25+
"docusaurus-plugin-sass": "0.2.5",
2626
"react": "^17.0.1",
2727
"react-dom": "^17.0.1",
2828
"react-tabs": "^3.2.2",
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
2+
3+
.demo {
4+
position: relative;
5+
width: 400px;
6+
height: 600px;
7+
margin: 36px auto;
8+
}
9+
10+
.main {
11+
width: 100%;
12+
height: 100%;
13+
-webkit-border-radius: 20px;
14+
border-radius: 20px;
15+
}
16+
17+
18+
.item {
19+
position: relative;
20+
background: black;
21+
}
22+
23+
.img {
24+
width: 100%;
25+
height: 100%;
26+
opacity: 0.6;
27+
object-fit: none;
28+
}
29+
30+
.labels {
31+
position: absolute;
32+
display: flex;
33+
flex-direction: row;
34+
top: 12px;
35+
left: 12px;
36+
right: 0;
37+
z-index: 2;
38+
}
39+
40+
.label {
41+
display: flex;
42+
justify-content: center;
43+
cursor: pointer;
44+
width: 80px;
45+
line-height: 36px;
46+
font-size: 16px;
47+
color: rgba(255, 255, 255, 0.6);
48+
-webkit-border-radius: 100px;
49+
border-radius: 100px;
50+
-webkit-user-select:none;
51+
-moz-user-select:none;
52+
-ms-user-select:none;
53+
user-select:none
54+
}
55+
56+
.label:hover {
57+
color: rgba(255, 255, 255, 1);
58+
}
59+
60+
.selected {
61+
background-color: rgba(255, 255, 255, 0.2);
62+
}
63+
64+
65+
.info {
66+
position: absolute;
67+
z-index: 3;
68+
bottom: 36px;
69+
left: 0;
70+
right: 0;
71+
max-height: 72px;
72+
margin: auto 20px;
73+
transition: all .25s ease-in-out;
74+
}
75+
76+
.name {
77+
overflow: hidden;
78+
display: -webkit-box;
79+
display: -webkit-flex;
80+
display: flex;
81+
-webkit-box-align: center;
82+
-webkit-align-items: center;
83+
align-items: center;
84+
line-height: 42px;
85+
font-size: 30px;
86+
color: rgba(255, 255, 255, 0.6);
87+
}
88+
89+
.headline {
90+
display: block;
91+
display: -webkit-box;
92+
overflow: hidden;
93+
-webkit-box-orient: vertical;
94+
word-break: break-all;
95+
word-wrap: break-word;
96+
margin-top: 8px;
97+
color: #fff;
98+
font-size: 18px;
99+
font-weight: 400;
100+
}
101+
102+
.area {
103+
position: absolute;
104+
left: 0px;
105+
height: 40px;
106+
-webkit-border-radius: 100px;
107+
border-radius: 100px;
108+
transition: width .5s;
109+
}
110+
111+
.page {
112+
position: absolute;
113+
top: 50%;
114+
right: 0;
115+
margin-right: 12px;
116+
transform: translateY(-50%);
117+
display: flex;
118+
flex-direction: column;
119+
z-index: 1;
120+
}
121+
122+
.dot {
123+
overflow: hidden;
124+
width: 5px;
125+
height: 5px;
126+
-webkit-box-flex: 0;
127+
-webkit-flex: 0 0 auto;
128+
flex: 0 0 auto;
129+
-webkit-border-radius: 50%;
130+
border-radius: 50%;
131+
background-color: rgba(255, 255, 255, 0.4);
132+
}
133+
134+
.dot.on {
135+
background-color: rgba(255, 255, 255, 0.8);
136+
}
137+
138+
.dot + .dot {
139+
margin-top: 5px;
140+
}

0 commit comments

Comments
 (0)