@micromag/element-scroll 0.3.755 → 0.3.756
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 +4 -4
- package/package.json +2 -2
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-scroll-container
|
|
1
|
+
.micromag-element-scroll-container .micromag-element-scroll-scrollable{scrollbar-width:none}.micromag-element-scroll-container .micromag-element-scroll-scrollable::-webkit-scrollbar{display:none}.micromag-element-scroll-container{height:100%;margin:0 auto;min-height:inherit;position:relative}.micromag-element-scroll-container .micromag-element-scroll-scrollable{height:100%;left:0;min-height:inherit;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;-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-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.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-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.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-container.micromag-element-scroll-disabled .micromag-element-scroll-scrollable{overflow:visible;position:static}.micromag-element-scroll-container.micromag-element-scroll-disabled .micromag-element-scroll-scrollee{margin:0}.micromag-element-scroll-arrowContainer{bottom:0;height:5rem;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .3s ease;transition:opacity .3s ease;width:100%;z-index:3}.micromag-element-scroll-withShadow .micromag-element-scroll-arrowContainer:after{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(28,28,28,0)),to(rgba(28,28,28,.85)));background-image:linear-gradient(180deg,rgba(28,28,28,0),rgba(28,28,28,.85));content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:2}.micromag-element-scroll-arrow{-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;display:inline-block;height:auto;position:relative;top:1rem;width:1rem;z-index:3}.micromag-element-scroll-arrow path{stroke:#1c1c1c;stroke-width:20}@-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","
|
|
9
|
+
var styles = {"container":"micromag-element-scroll-container","scrollable":"micromag-element-scroll-scrollable","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","disabled":"micromag-element-scroll-disabled","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,
|
|
@@ -149,13 +149,13 @@ function Scroll(_ref) {
|
|
|
149
149
|
}
|
|
150
150
|
}, [scrolleeRef, scrollPosition]);
|
|
151
151
|
return /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.
|
|
152
|
+
className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles.disabled, disabled), styles[verticalAlign], verticalAlign !== null && scrolleeHeight < scrollableHeight), styles.withArrow, showArrow && withArrow), styles.withShadow, withShadow), "className", className)]),
|
|
153
153
|
style: finalStyle
|
|
154
154
|
}, /*#__PURE__*/React.createElement("div", Object.assign({
|
|
155
|
-
className: classNames([styles.scrollable,
|
|
155
|
+
className: classNames([styles.scrollable, scrollableClassName]),
|
|
156
156
|
ref: scrollableRef
|
|
157
157
|
}, bind()), /*#__PURE__*/React.createElement("div", {
|
|
158
|
-
className: classNames([styles.scrollee,
|
|
158
|
+
className: classNames([styles.scrollee, scrolleeClassName]),
|
|
159
159
|
ref: scrolleeRef
|
|
160
160
|
}, children)), !disabled && showArrow ? /*#__PURE__*/React.createElement("div", {
|
|
161
161
|
className: styles.arrowContainer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-scroll",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.756",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public",
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "5c7dfc5008ce258a94964174ff6cae668de64df1"
|
|
75
75
|
}
|