@micromag/element-scroll 0.3.184 → 0.3.187
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/assets/css/styles.css +1 -1
- package/es/index.js +9 -6
- package/lib/index.js +9 -6
- package/package.json +3 -3
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-scroll-container.micromag-element-scroll-withScroll .micromag-element-scroll-scrollable{scrollbar-width:none}.micromag-element-scroll-container.micromag-element-scroll-withScroll .micromag-element-scroll-scrollable::-webkit-scrollbar{display:none}.micromag-element-scroll-container{position:relative;height:100%;min-height:inherit;margin:0 auto}.micromag-element-scroll-container .micromag-element-scroll-scrollable{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;min-height:inherit}.micromag-element-scroll-
|
|
1
|
+
.micromag-element-scroll-container.micromag-element-scroll-withScroll .micromag-element-scroll-scrollable{scrollbar-width:none}.micromag-element-scroll-container.micromag-element-scroll-withScroll .micromag-element-scroll-scrollable::-webkit-scrollbar{display:none}.micromag-element-scroll-container{position:relative;height:100%;min-height:inherit;margin:0 auto}.micromag-element-scroll-container.micromag-element-scroll-withScroll .micromag-element-scroll-scrollable{overflow-x:hidden;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}.micromag-element-scroll-container.micromag-element-scroll-withScroll.micromag-element-scroll-containOverscroll .micromag-element-scroll-scrollable{-ms-scroll-chaining:none;overscroll-behavior:contain}.micromag-element-scroll-container.micromag-element-scroll-top .micromag-element-scroll-scrollee{margin-bottom:auto}.micromag-element-scroll-container.micromag-element-scroll-middle .micromag-element-scroll-scrollee{margin:auto 0}.micromag-element-scroll-container.micromag-element-scroll-bottom .micromag-element-scroll-scrollee{margin-top:auto}.micromag-element-scroll-container.micromag-element-scroll-withArrow .micromag-element-scroll-arrowContainer{opacity:1}.micromag-element-scroll-scrollable{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;min-height:inherit}.micromag-element-scroll-arrowContainer{position:absolute;z-index:2;bottom:0;left:0;width:100%;height:5rem;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;opacity:0;text-align:center;pointer-events:none}.micromag-element-scroll-withShadow .micromag-element-scroll-arrowContainer:after{content:"";position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;background-image:-webkit-gradient(linear,left top, left bottom,from(rgba(28,28,28,0)),to(rgba(28,28,28,.85)));background-image:-o-linear-gradient(top,rgba(28,28,28,0),rgba(28,28,28,.85));background-image:linear-gradient(180deg,rgba(28,28,28,0),rgba(28,28,28,.85))}.micromag-element-scroll-arrow{position:relative;top:1rem;z-index:2;display:inline-block;width:1rem;height:auto;-webkit-animation:micromag-element-scroll-upAndDown .75s cubic-bezier(.4,0,.6,1) infinite alternate;animation:micromag-element-scroll-upAndDown .75s cubic-bezier(.4,0,.6,1) infinite alternate;color:#fff}.micromag-element-scroll-arrow path{stroke-width:20;stroke:#1c1c1c}@-webkit-keyframes micromag-element-scroll-upAndDown{0%{-webkit-transform:translateY(-30%);transform:translateY(-30%)}to{-webkit-transform:translateY(30%);transform:translateY(30%)}}@keyframes micromag-element-scroll-upAndDown{0%{-webkit-transform:translateY(-30%);transform:translateY(-30%)}to{-webkit-transform:translateY(30%);transform:translateY(30%)}}
|
package/es/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import React, { useState, useRef, useEffect } from 'react';
|
|
7
7
|
import { useDimensionObserver } from '@micromag/core/hooks';
|
|
8
8
|
|
|
9
|
-
var styles = {"container":"micromag-element-scroll-container","withScroll":"micromag-element-scroll-withScroll","scrollable":"micromag-element-scroll-scrollable","
|
|
9
|
+
var styles = {"container":"micromag-element-scroll-container","withScroll":"micromag-element-scroll-withScroll","scrollable":"micromag-element-scroll-scrollable","containOverscroll":"micromag-element-scroll-containOverscroll","top":"micromag-element-scroll-top","scrollee":"micromag-element-scroll-scrollee","middle":"micromag-element-scroll-middle","bottom":"micromag-element-scroll-bottom","withArrow":"micromag-element-scroll-withArrow","arrowContainer":"micromag-element-scroll-arrowContainer","withShadow":"micromag-element-scroll-withShadow","arrow":"micromag-element-scroll-arrow","upAndDown":"micromag-element-scroll-upAndDown"};
|
|
10
10
|
|
|
11
11
|
var propTypes = {
|
|
12
12
|
width: PropTypes.number,
|
|
@@ -18,8 +18,9 @@ var propTypes = {
|
|
|
18
18
|
onScrolledBottom: PropTypes.func,
|
|
19
19
|
onScrolledNotBottom: PropTypes.func,
|
|
20
20
|
contain: PropTypes.bool,
|
|
21
|
-
scrollContainerRef: PropTypes.any
|
|
22
|
-
|
|
21
|
+
scrollContainerRef: PropTypes.any,
|
|
22
|
+
// eslint-disable-line
|
|
23
|
+
withShadow: PropTypes.bool
|
|
23
24
|
};
|
|
24
25
|
var defaultProps = {
|
|
25
26
|
width: null,
|
|
@@ -31,7 +32,8 @@ var defaultProps = {
|
|
|
31
32
|
onScrolledBottom: null,
|
|
32
33
|
onScrolledNotBottom: null,
|
|
33
34
|
contain: false,
|
|
34
|
-
scrollContainerRef: null
|
|
35
|
+
scrollContainerRef: null,
|
|
36
|
+
withShadow: false
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
function Scroll(_ref) {
|
|
@@ -46,7 +48,8 @@ function Scroll(_ref) {
|
|
|
46
48
|
onScrolledBottom = _ref.onScrolledBottom,
|
|
47
49
|
onScrolledNotBottom = _ref.onScrolledNotBottom,
|
|
48
50
|
contain = _ref.contain,
|
|
49
|
-
scrollContainerRef = _ref.scrollContainerRef
|
|
51
|
+
scrollContainerRef = _ref.scrollContainerRef,
|
|
52
|
+
withShadow = _ref.withShadow;
|
|
50
53
|
var finalStyle = {
|
|
51
54
|
width: width,
|
|
52
55
|
height: height
|
|
@@ -129,7 +132,7 @@ function Scroll(_ref) {
|
|
|
129
132
|
}
|
|
130
133
|
}, [scrollableHeight, scrolleeHeight, setWithArrow, disabled]);
|
|
131
134
|
return /*#__PURE__*/React.createElement("div", {
|
|
132
|
-
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.withScroll, !disabled), _defineProperty(_ref3, styles.containOverscroll, contain), _defineProperty(_ref3, className, className !== null), _defineProperty(_ref3, styles[verticalAlign], verticalAlign !== null), _defineProperty(_ref3, styles.withArrow, withArrow), _ref3)]),
|
|
135
|
+
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.withScroll, !disabled), _defineProperty(_ref3, styles.containOverscroll, contain), _defineProperty(_ref3, className, className !== null), _defineProperty(_ref3, styles[verticalAlign], verticalAlign !== null), _defineProperty(_ref3, styles.withArrow, withArrow), _defineProperty(_ref3, styles.withShadow, withShadow), _ref3)]),
|
|
133
136
|
style: finalStyle
|
|
134
137
|
}, /*#__PURE__*/React.createElement("div", Object.assign({
|
|
135
138
|
className: styles.scrollable,
|
package/lib/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
16
16
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
18
|
|
|
19
|
-
var styles = {"container":"micromag-element-scroll-container","withScroll":"micromag-element-scroll-withScroll","scrollable":"micromag-element-scroll-scrollable","
|
|
19
|
+
var styles = {"container":"micromag-element-scroll-container","withScroll":"micromag-element-scroll-withScroll","scrollable":"micromag-element-scroll-scrollable","containOverscroll":"micromag-element-scroll-containOverscroll","top":"micromag-element-scroll-top","scrollee":"micromag-element-scroll-scrollee","middle":"micromag-element-scroll-middle","bottom":"micromag-element-scroll-bottom","withArrow":"micromag-element-scroll-withArrow","arrowContainer":"micromag-element-scroll-arrowContainer","withShadow":"micromag-element-scroll-withShadow","arrow":"micromag-element-scroll-arrow","upAndDown":"micromag-element-scroll-upAndDown"};
|
|
20
20
|
|
|
21
21
|
var propTypes = {
|
|
22
22
|
width: PropTypes__default["default"].number,
|
|
@@ -28,8 +28,9 @@ var propTypes = {
|
|
|
28
28
|
onScrolledBottom: PropTypes__default["default"].func,
|
|
29
29
|
onScrolledNotBottom: PropTypes__default["default"].func,
|
|
30
30
|
contain: PropTypes__default["default"].bool,
|
|
31
|
-
scrollContainerRef: PropTypes__default["default"].any
|
|
32
|
-
|
|
31
|
+
scrollContainerRef: PropTypes__default["default"].any,
|
|
32
|
+
// eslint-disable-line
|
|
33
|
+
withShadow: PropTypes__default["default"].bool
|
|
33
34
|
};
|
|
34
35
|
var defaultProps = {
|
|
35
36
|
width: null,
|
|
@@ -41,7 +42,8 @@ var defaultProps = {
|
|
|
41
42
|
onScrolledBottom: null,
|
|
42
43
|
onScrolledNotBottom: null,
|
|
43
44
|
contain: false,
|
|
44
|
-
scrollContainerRef: null
|
|
45
|
+
scrollContainerRef: null,
|
|
46
|
+
withShadow: false
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
function Scroll(_ref) {
|
|
@@ -56,7 +58,8 @@ function Scroll(_ref) {
|
|
|
56
58
|
onScrolledBottom = _ref.onScrolledBottom,
|
|
57
59
|
onScrolledNotBottom = _ref.onScrolledNotBottom,
|
|
58
60
|
contain = _ref.contain,
|
|
59
|
-
scrollContainerRef = _ref.scrollContainerRef
|
|
61
|
+
scrollContainerRef = _ref.scrollContainerRef,
|
|
62
|
+
withShadow = _ref.withShadow;
|
|
60
63
|
var finalStyle = {
|
|
61
64
|
width: width,
|
|
62
65
|
height: height
|
|
@@ -139,7 +142,7 @@ function Scroll(_ref) {
|
|
|
139
142
|
}
|
|
140
143
|
}, [scrollableHeight, scrolleeHeight, setWithArrow, disabled]);
|
|
141
144
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
142
|
-
className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles.withScroll, !disabled), _defineProperty__default["default"](_ref3, styles.containOverscroll, contain), _defineProperty__default["default"](_ref3, className, className !== null), _defineProperty__default["default"](_ref3, styles[verticalAlign], verticalAlign !== null), _defineProperty__default["default"](_ref3, styles.withArrow, withArrow), _ref3)]),
|
|
145
|
+
className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles.withScroll, !disabled), _defineProperty__default["default"](_ref3, styles.containOverscroll, contain), _defineProperty__default["default"](_ref3, className, className !== null), _defineProperty__default["default"](_ref3, styles[verticalAlign], verticalAlign !== null), _defineProperty__default["default"](_ref3, styles.withArrow, withArrow), _defineProperty__default["default"](_ref3, styles.withShadow, withShadow), _ref3)]),
|
|
143
146
|
style: finalStyle
|
|
144
147
|
}, /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
145
148
|
className: styles.scrollable,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-scroll",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.187",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.187",
|
|
56
56
|
"@use-gesture/react": "^10.2.4",
|
|
57
57
|
"classnames": "^2.2.6",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "db3cc46d717c8588e90155a8f58240d481273278"
|
|
67
67
|
}
|