@bifrostui/react 0.0.8 → 0.2.1-beta.2
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/dist/ScrollView/ScrollView.js +3 -2
- package/dist/Tag/Tag.css +2 -2
- package/dist/Tag/TagGroup.css +29 -2
- package/es/ScrollView/ScrollView.js +3 -2
- package/es/Tag/Tag.css +2 -2
- package/es/Tag/TagGroup.css +29 -2
- package/package.json +6 -6
|
@@ -55,7 +55,8 @@ const ScrollView = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
55
55
|
const container = (0, _react.useRef)(null);
|
|
56
56
|
const handleRef = (0, _utils.useForkRef)(ref, container);
|
|
57
57
|
const onTouchMove = e => {
|
|
58
|
-
|
|
58
|
+
// 会导致埋点工具无法正确区分滑动和点击,必须去掉。
|
|
59
|
+
// e.stopPropagation();
|
|
59
60
|
};
|
|
60
61
|
const scrollVertical = (0, _react.useCallback)((top, isAnimation) => {
|
|
61
62
|
if (top === undefined) return;
|
|
@@ -74,7 +75,7 @@ const ScrollView = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
74
75
|
} else if (container.current) container.current.scrollLeft = left;
|
|
75
76
|
}, []);
|
|
76
77
|
const handleScroll = (0, _react.useCallback)((isInit = false) => {
|
|
77
|
-
const isAnimation =
|
|
78
|
+
const isAnimation = props?.scrollWithAnimation;
|
|
78
79
|
// scrollIntoView
|
|
79
80
|
if (scrollIntoView && typeof scrollIntoView === 'string' && container?.current?.querySelector?.(`#${scrollIntoView}`)) {
|
|
80
81
|
const doScrollIntoView = (id, alignment = 'start', _isAnimation = isAnimation) => {
|
package/dist/Tag/Tag.css
CHANGED
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
border: 1px solid var(--bui-color-border-danger);
|
|
44
44
|
}
|
|
45
45
|
.bui-tag-outlined.bui-tag-vip {
|
|
46
|
-
color: var(--bui-color-
|
|
47
|
-
border: 1px solid
|
|
46
|
+
color: var(--bui-color-red);
|
|
47
|
+
border: 1px solid var(--bui-color-border-primary);
|
|
48
48
|
}
|
|
49
49
|
.bui-tag-contained {
|
|
50
50
|
background-color: var(--bg-color);
|
package/dist/Tag/TagGroup.css
CHANGED
|
@@ -2,13 +2,40 @@
|
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
font-family: var(--bui-font-family);
|
|
4
4
|
}
|
|
5
|
-
.bui-tag-group .bui-tag {
|
|
6
|
-
|
|
5
|
+
.bui-tag-group .bui-tag-outlined {
|
|
6
|
+
background-color: var(--bui-color-white);
|
|
7
|
+
}
|
|
8
|
+
.bui-tag-group .bui-tag-outlined + .bui-tag-contained {
|
|
9
|
+
margin-left: -1px;
|
|
10
|
+
}
|
|
11
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child) {
|
|
12
|
+
position: relative;
|
|
13
|
+
border-right-style: dotted;
|
|
14
|
+
}
|
|
15
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::after {
|
|
16
|
+
top: 0;
|
|
17
|
+
}
|
|
18
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::before {
|
|
19
|
+
bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::after,
|
|
22
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::before {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
right: -1px;
|
|
26
|
+
width: 1px;
|
|
27
|
+
height: 13%;
|
|
28
|
+
color: #fff;
|
|
29
|
+
background-color: #fff;
|
|
30
|
+
border-right-style: solid;
|
|
7
31
|
}
|
|
8
32
|
.bui-tag-group .bui-tag:not(:last-child) {
|
|
9
33
|
border-top-right-radius: 0;
|
|
10
34
|
border-bottom-right-radius: 0;
|
|
11
35
|
}
|
|
36
|
+
.bui-tag-group .bui-tag:not(:last-child):not(.bui-tag-outlined) {
|
|
37
|
+
border-right: 0;
|
|
38
|
+
}
|
|
12
39
|
.bui-tag-group .bui-tag:not(:first-child) {
|
|
13
40
|
border-top-left-radius: 0;
|
|
14
41
|
border-bottom-left-radius: 0;
|
|
@@ -49,7 +49,8 @@ var ScrollView = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
49
49
|
var container = useRef(null);
|
|
50
50
|
var handleRef = useForkRef(ref, container);
|
|
51
51
|
var onTouchMove = function onTouchMove(e) {
|
|
52
|
-
|
|
52
|
+
// 会导致埋点工具无法正确区分滑动和点击,必须去掉。
|
|
53
|
+
// e.stopPropagation();
|
|
53
54
|
};
|
|
54
55
|
var scrollVertical = useCallback(function (top, isAnimation) {
|
|
55
56
|
if (top === undefined) return;
|
|
@@ -70,7 +71,7 @@ var ScrollView = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
70
71
|
var handleScroll = useCallback(function () {
|
|
71
72
|
var _container$current, _container$current$qu;
|
|
72
73
|
var isInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
73
|
-
var isAnimation =
|
|
74
|
+
var isAnimation = props === null || props === void 0 ? void 0 : props.scrollWithAnimation;
|
|
74
75
|
// scrollIntoView
|
|
75
76
|
if (scrollIntoView && typeof scrollIntoView === 'string' && container !== null && container !== void 0 && (_container$current = container.current) !== null && _container$current !== void 0 && (_container$current$qu = _container$current.querySelector) !== null && _container$current$qu !== void 0 && _container$current$qu.call(_container$current, "#".concat(scrollIntoView))) {
|
|
76
77
|
var doScrollIntoView = function doScrollIntoView(id) {
|
package/es/Tag/Tag.css
CHANGED
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
border: 1px solid var(--bui-color-border-danger);
|
|
44
44
|
}
|
|
45
45
|
.bui-tag-outlined.bui-tag-vip {
|
|
46
|
-
color: var(--bui-color-
|
|
47
|
-
border: 1px solid
|
|
46
|
+
color: var(--bui-color-red);
|
|
47
|
+
border: 1px solid var(--bui-color-border-primary);
|
|
48
48
|
}
|
|
49
49
|
.bui-tag-contained {
|
|
50
50
|
background-color: var(--bg-color);
|
package/es/Tag/TagGroup.css
CHANGED
|
@@ -2,13 +2,40 @@
|
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
font-family: var(--bui-font-family);
|
|
4
4
|
}
|
|
5
|
-
.bui-tag-group .bui-tag {
|
|
6
|
-
|
|
5
|
+
.bui-tag-group .bui-tag-outlined {
|
|
6
|
+
background-color: var(--bui-color-white);
|
|
7
|
+
}
|
|
8
|
+
.bui-tag-group .bui-tag-outlined + .bui-tag-contained {
|
|
9
|
+
margin-left: -1px;
|
|
10
|
+
}
|
|
11
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child) {
|
|
12
|
+
position: relative;
|
|
13
|
+
border-right-style: dotted;
|
|
14
|
+
}
|
|
15
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::after {
|
|
16
|
+
top: 0;
|
|
17
|
+
}
|
|
18
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::before {
|
|
19
|
+
bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::after,
|
|
22
|
+
.bui-tag-group .bui-tag-outlined:not(:last-child)::before {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
right: -1px;
|
|
26
|
+
width: 1px;
|
|
27
|
+
height: 13%;
|
|
28
|
+
color: #fff;
|
|
29
|
+
background-color: #fff;
|
|
30
|
+
border-right-style: solid;
|
|
7
31
|
}
|
|
8
32
|
.bui-tag-group .bui-tag:not(:last-child) {
|
|
9
33
|
border-top-right-radius: 0;
|
|
10
34
|
border-bottom-right-radius: 0;
|
|
11
35
|
}
|
|
36
|
+
.bui-tag-group .bui-tag:not(:last-child):not(.bui-tag-outlined) {
|
|
37
|
+
border-right: 0;
|
|
38
|
+
}
|
|
12
39
|
.bui-tag-group .bui-tag:not(:first-child) {
|
|
13
40
|
border-top-left-radius: 0;
|
|
14
41
|
border-bottom-left-radius: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1-beta.2",
|
|
4
4
|
"description": "React components for building mobile application",
|
|
5
5
|
"homepage": "http://bui.taopiaopiao.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"father": "^4.1.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@bifrostui/icons": "^0.
|
|
35
|
-
"@bifrostui/styles": "^0.
|
|
36
|
-
"@bifrostui/types": "^0.
|
|
37
|
-
"@bifrostui/utils": "^0.
|
|
34
|
+
"@bifrostui/icons": "^0.2.1-beta.2",
|
|
35
|
+
"@bifrostui/styles": "^0.2.1-beta.2",
|
|
36
|
+
"@bifrostui/types": "^0.2.1-beta.2",
|
|
37
|
+
"@bifrostui/utils": "^0.2.1-beta.2",
|
|
38
38
|
"clsx": "^1.2.1",
|
|
39
39
|
"dayjs": "^1.11.7",
|
|
40
40
|
"swiper": "^8.1.5"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": "^17.0.0 || ^18.0.0",
|
|
47
47
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e312b87b675a058b880bd51457f00dc417e703a9"
|
|
50
50
|
}
|