@telus-uds/components-community.sticky 2.1.4 → 3.0.1
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/CHANGELOG.md +24 -2
- package/jest.config.cjs +1 -1
- package/lib/cjs/Sticky.js +156 -0
- package/lib/cjs/index.js +15 -0
- package/lib/cjs/styles.js +14 -0
- package/lib/esm/styles.js +6 -0
- package/package.json +10 -15
- package/src/styles.js +1 -3
- package/lib/styles.js +0 -112
- /package/lib/{Sticky.js → esm/Sticky.js} +0 -0
- /package/lib/{index.js → esm/index.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-community.sticky
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 10 Feb 2025 17:30:58 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.0.1
|
|
8
|
+
|
|
9
|
+
Mon, 10 Feb 2025 17:30:58 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @telus-uds/components-base to v3.1.0
|
|
14
|
+
- Bump @telus-uds/components-web to v4.1.0
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v4.1.0
|
|
16
|
+
|
|
17
|
+
## 3.0.0
|
|
18
|
+
|
|
19
|
+
Fri, 31 Jan 2025 20:53:28 GMT
|
|
20
|
+
|
|
21
|
+
### Major changes
|
|
22
|
+
|
|
23
|
+
- Add CommonJS builds along with ESM (shahzaibkhalidmalik@outlook.com)
|
|
24
|
+
- Bump @telus-uds/components-base to v3.0.0
|
|
25
|
+
- Bump @telus-uds/components-web to v4.0.0
|
|
26
|
+
- Bump @telus-uds/system-constants to v3.0.0
|
|
27
|
+
- Bump @telus-uds/system-theme-tokens to v4.0.0
|
|
28
|
+
|
|
7
29
|
## 2.1.4
|
|
8
30
|
|
|
9
|
-
Wed, 22 Jan 2025 21:
|
|
31
|
+
Wed, 22 Jan 2025 21:08:36 GMT
|
|
10
32
|
|
|
11
33
|
### Patches
|
|
12
34
|
|
package/jest.config.cjs
CHANGED
|
@@ -11,7 +11,7 @@ module.exports = () => ({
|
|
|
11
11
|
// mock icon imports as in https://jestjs.io/docs/webpack#mocking-css-modules
|
|
12
12
|
'\\.icon.svg': '<rootDir>/__mocks__/iconMock.jsx',
|
|
13
13
|
'\\.css': '<rootDir>/__mocks__/styleMock.js',
|
|
14
|
-
'^@telus-uds/components-base/server$': '<rootDir>/../../../components-base/lib/server.js'
|
|
14
|
+
'^@telus-uds/components-base/server$': '<rootDir>/../../../components-base/lib/cjs/server.js'
|
|
15
15
|
},
|
|
16
16
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
17
17
|
transformIgnorePatterns: [
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
10
|
+
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
11
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function createObserver(ref, callback) {
|
|
15
|
+
let workWithViewport = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
16
|
+
const observer = new IntersectionObserver(_ref => {
|
|
17
|
+
let [e] = _ref;
|
|
18
|
+
const isNotVisibleInViewport = e.intersectionRatio < 1;
|
|
19
|
+
let correctYPosition = true;
|
|
20
|
+
if (workWithViewport) {
|
|
21
|
+
const {
|
|
22
|
+
y
|
|
23
|
+
} = e.boundingClientRect;
|
|
24
|
+
correctYPosition = y < 0;
|
|
25
|
+
}
|
|
26
|
+
callback(isNotVisibleInViewport && correctYPosition);
|
|
27
|
+
});
|
|
28
|
+
observer.observe(ref.current);
|
|
29
|
+
return observer;
|
|
30
|
+
}
|
|
31
|
+
const Sticky = _ref2 => {
|
|
32
|
+
let {
|
|
33
|
+
children,
|
|
34
|
+
variant = 'default',
|
|
35
|
+
vertical = {
|
|
36
|
+
xs: 0,
|
|
37
|
+
sm: 0,
|
|
38
|
+
lg: 0,
|
|
39
|
+
xl: 0
|
|
40
|
+
},
|
|
41
|
+
horizontal = {
|
|
42
|
+
xs: 0,
|
|
43
|
+
sm: 0,
|
|
44
|
+
lg: 0,
|
|
45
|
+
xl: 0
|
|
46
|
+
},
|
|
47
|
+
workWithViewport = true,
|
|
48
|
+
position = 'top',
|
|
49
|
+
shadow = true,
|
|
50
|
+
onStick = () => {},
|
|
51
|
+
throttleTime = 100,
|
|
52
|
+
throttleConfig = {
|
|
53
|
+
trailing: true
|
|
54
|
+
}
|
|
55
|
+
} = _ref2;
|
|
56
|
+
// Position "bottom" does not support the "hidden" variant.
|
|
57
|
+
if (variant === 'hidden' && position === 'bottom') {
|
|
58
|
+
// eslint-disable-next-line no-param-reassign
|
|
59
|
+
variant = 'default';
|
|
60
|
+
}
|
|
61
|
+
const sentinelTopRef = _react.default.useRef();
|
|
62
|
+
const sentinelBottomRef = _react.default.useRef();
|
|
63
|
+
const stickyWrapperRef = _react.default.useRef();
|
|
64
|
+
const [observer, setObserver] = _react.default.useState();
|
|
65
|
+
const onStickThrottled = (0, _lodash.default)(onStick, throttleTime, throttleConfig);
|
|
66
|
+
const sentinelPositionRef = position === 'top' ? sentinelTopRef : sentinelBottomRef;
|
|
67
|
+
_react.default.useEffect(() => {
|
|
68
|
+
if (observer) {
|
|
69
|
+
observer.disconnect();
|
|
70
|
+
}
|
|
71
|
+
if (variant === 'default' || variant === 'hidden') {
|
|
72
|
+
setObserver(createObserver(sentinelPositionRef, intersected => {
|
|
73
|
+
stickyWrapperRef.current?.classList.toggle('sticky-mode', intersected);
|
|
74
|
+
stickyWrapperRef.current?.classList.toggle(position, intersected);
|
|
75
|
+
if (intersected) {
|
|
76
|
+
stickyWrapperRef.current?.classList.remove('pristine');
|
|
77
|
+
}
|
|
78
|
+
onStickThrottled(intersected);
|
|
79
|
+
}, workWithViewport));
|
|
80
|
+
}
|
|
81
|
+
if (variant === 'alternate') {
|
|
82
|
+
setObserver(createObserver(sentinelBottomRef, intersected => {
|
|
83
|
+
stickyWrapperRef.current?.classList.toggle('sticky-mode', intersected);
|
|
84
|
+
stickyWrapperRef.current?.classList.toggle('bottom', intersected);
|
|
85
|
+
onStickThrottled(intersected);
|
|
86
|
+
}, workWithViewport));
|
|
87
|
+
}
|
|
88
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
|
+
}, [variant]);
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
+
className: "sentinelTop",
|
|
93
|
+
ref: sentinelTopRef
|
|
94
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.default, {
|
|
95
|
+
className: `${variant} ${variant === 'hidden' ? 'pristine' : ''}`,
|
|
96
|
+
ref: stickyWrapperRef,
|
|
97
|
+
shadow: shadow,
|
|
98
|
+
position: position,
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: "sticky-element",
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Box, {
|
|
102
|
+
vertical: vertical,
|
|
103
|
+
horizontal: horizontal,
|
|
104
|
+
children: children
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
108
|
+
className: "sentinelBottom",
|
|
109
|
+
ref: sentinelBottomRef
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
Sticky.propTypes = {
|
|
114
|
+
/**
|
|
115
|
+
* Sets top and bottom padding using the theme's spacing scale.
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
vertical: _componentsBase.spacingProps.types.spacingValue,
|
|
119
|
+
/**
|
|
120
|
+
* Sets left and right padding using the theme's spacing scale.
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
horizontal: _componentsBase.spacingProps.types.spacingValue,
|
|
124
|
+
/**
|
|
125
|
+
* Whether the sticky should wait to cross the viewport to stick or not
|
|
126
|
+
* Defaults to true. Set to false for nested container (using overflow)
|
|
127
|
+
*/
|
|
128
|
+
workWithViewport: _propTypes.default.bool,
|
|
129
|
+
/**
|
|
130
|
+
* Sticky accepts any content as children.
|
|
131
|
+
*/
|
|
132
|
+
children: _propTypes.default.node.isRequired,
|
|
133
|
+
variant: _propTypes.default.oneOf(['default', 'alternate', 'hidden']),
|
|
134
|
+
/**
|
|
135
|
+
* Sets whether sticky component is stuck to top or bottom of page.
|
|
136
|
+
* Note: Position "bottom" does not support the "hidden" variant.
|
|
137
|
+
*/
|
|
138
|
+
position: _propTypes.default.oneOf(['top', 'bottom']),
|
|
139
|
+
/**
|
|
140
|
+
* Adds shadow to sticky component.
|
|
141
|
+
*/
|
|
142
|
+
shadow: _propTypes.default.bool,
|
|
143
|
+
/**
|
|
144
|
+
* Callback when sticky is stuck to top or bottom of page.
|
|
145
|
+
*/
|
|
146
|
+
onStick: _propTypes.default.func,
|
|
147
|
+
/**
|
|
148
|
+
* Time in milliseconds to throttle the onStick callback.
|
|
149
|
+
*/
|
|
150
|
+
throttleTime: _propTypes.default.number,
|
|
151
|
+
/**
|
|
152
|
+
* Throttle configuration.
|
|
153
|
+
*/
|
|
154
|
+
throttleConfig: _propTypes.default.object
|
|
155
|
+
};
|
|
156
|
+
var _default = exports.default = Sticky;
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Sticky", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Sticky.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
var _Sticky = _interopRequireDefault(require("./Sticky"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
var _default = exports.default = _Sticky.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
const StickyWrapper = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
11
|
+
displayName: "styles__StickyWrapper",
|
|
12
|
+
componentId: "[object Object]__sc-160gk65-0"
|
|
13
|
+
})(["", " &.sticky-mode{&.alternate,&.default{position:-webkit-sticky;position:sticky;z-index:1;", " ", " ", "}&.hidden{animation:0.3s animateIn forwards;", "}}&.alternate{}&.hidden{position:sticky;pointer-events:none;height:0px;min-height:0px;max-height:0px;animation:0.6s animateOut forwards;&.pristine{display:none;}.sticky-element{background:white;", "}}.sticky-element{background:#ffffff;}@keyframes animateIn{from{height:0%;pointer-events:none;transform:translateY(-100vh);opacity:0;z-index:-1;}to{height:100%;pointer-events:all;transform:translateY(0);opacity:1;z-index:1;}}@keyframes animateOut{from{height:100%;pointer-events:all;transform:translateY(0);opacity:1;z-index:1;}to{height:0%;pointer-events:none;transform:translateY(-100vh);opacity:0;z-index:-1;}}@keyframes shadowIn{from{box-shadow:0px 7px 4px -3px rgb(0,0,0,0);}to{box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);}}@keyframes shadowOut{from{box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);}to{box-shadow:0px 7px 4px -3px rgb(0,0,0,0);}}"], props => props.position === 'top' ? (0, _styledComponents.css)(["top:0;"]) : (0, _styledComponents.css)(["bottom:0;"]), props => props.position === 'top' && (0, _styledComponents.css)(["top:0px;"]), props => props.position === 'bottom' && (0, _styledComponents.css)(["bottom:0px;"]), props => props.shadow && (0, _styledComponents.css)(["box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);"]), props => props.shadow && (0, _styledComponents.css)([".sticky-element{animation:0.3s shadowIn forwards;}"]), props => props.shadow && (0, _styledComponents.css)(["animation:0.6s shadowOut forwards;"]));
|
|
14
|
+
var _default = exports.default = StickyWrapper;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
const StickyWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
3
|
+
displayName: "styles__StickyWrapper",
|
|
4
|
+
componentId: "[object Object]__sc-160gk65-0"
|
|
5
|
+
})(["", " &.sticky-mode{&.alternate,&.default{position:-webkit-sticky;position:sticky;z-index:1;", " ", " ", "}&.hidden{animation:0.3s animateIn forwards;", "}}&.alternate{}&.hidden{position:sticky;pointer-events:none;height:0px;min-height:0px;max-height:0px;animation:0.6s animateOut forwards;&.pristine{display:none;}.sticky-element{background:white;", "}}.sticky-element{background:#ffffff;}@keyframes animateIn{from{height:0%;pointer-events:none;transform:translateY(-100vh);opacity:0;z-index:-1;}to{height:100%;pointer-events:all;transform:translateY(0);opacity:1;z-index:1;}}@keyframes animateOut{from{height:100%;pointer-events:all;transform:translateY(0);opacity:1;z-index:1;}to{height:0%;pointer-events:none;transform:translateY(-100vh);opacity:0;z-index:-1;}}@keyframes shadowIn{from{box-shadow:0px 7px 4px -3px rgb(0,0,0,0);}to{box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);}}@keyframes shadowOut{from{box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);}to{box-shadow:0px 7px 4px -3px rgb(0,0,0,0);}}"], props => props.position === 'top' ? css(["top:0;"]) : css(["bottom:0;"]), props => props.position === 'top' && css(["top:0px;"]), props => props.position === 'bottom' && css(["bottom:0px;"]), props => props.shadow && css(["box-shadow:0px 7px 4px -3px rgb(0,0,0,0.08);"]), props => props.shadow && css([".sticky-element{animation:0.3s shadowIn forwards;}"]), props => props.shadow && css(["animation:0.6s shadowOut forwards;"]));
|
|
6
|
+
export default StickyWrapper;
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "TELUS Digital",
|
|
3
|
-
"type": "module",
|
|
4
3
|
"browserslist": [
|
|
5
4
|
"extends @telus-uds/browserslist-config"
|
|
6
5
|
],
|
|
7
6
|
"dependencies": {
|
|
8
|
-
"@telus-uds/components-base": "^
|
|
9
|
-
"@telus-uds/components-web": "^
|
|
10
|
-
"@telus-uds/system-constants": "^
|
|
11
|
-
"@telus-uds/system-theme-tokens": "^
|
|
7
|
+
"@telus-uds/components-base": "^3.1.0",
|
|
8
|
+
"@telus-uds/components-web": "^4.1.0",
|
|
9
|
+
"@telus-uds/system-constants": "^3.0.0",
|
|
10
|
+
"@telus-uds/system-theme-tokens": "^4.1.0",
|
|
12
11
|
"lodash.throttle": "^4.1.1",
|
|
13
12
|
"prop-types": "^15.7.2",
|
|
14
13
|
"styled-components": "^5.3.10"
|
|
@@ -28,14 +27,8 @@
|
|
|
28
27
|
"react": "^18.2.0",
|
|
29
28
|
"react-dom": "^18.2.0"
|
|
30
29
|
},
|
|
31
|
-
"main": "lib/index.js",
|
|
32
|
-
"module": "lib/index.js",
|
|
33
|
-
"exports": {
|
|
34
|
-
".": {
|
|
35
|
-
"import": "./lib/index.js",
|
|
36
|
-
"default": "./lib/index.js"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
30
|
+
"main": "lib/cjs/index.js",
|
|
31
|
+
"module": "lib/esm/index.js",
|
|
39
32
|
"repository": {
|
|
40
33
|
"type": "git",
|
|
41
34
|
"url": "git+https://github.com/telus/universal-design-system.git"
|
|
@@ -45,11 +38,13 @@
|
|
|
45
38
|
"lint": "telus-standard",
|
|
46
39
|
"lint:fix": "telus-standard --fix",
|
|
47
40
|
"test": "jest",
|
|
48
|
-
"build": "babel src -d lib
|
|
41
|
+
"build:cjs": "babel src -d lib/cjs",
|
|
42
|
+
"build:esm": "babel src -d lib/esm --env-name module",
|
|
43
|
+
"build": "npm run build:cjs && npm run build:esm"
|
|
49
44
|
},
|
|
50
45
|
"sideEffects": false,
|
|
51
46
|
"standard-engine": {
|
|
52
47
|
"skip": true
|
|
53
48
|
},
|
|
54
|
-
"version": "
|
|
49
|
+
"version": "3.0.1"
|
|
55
50
|
}
|
package/src/styles.js
CHANGED
package/lib/styles.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { styledComponents } from '@telus-uds/components-web';
|
|
2
|
-
const {
|
|
3
|
-
styled,
|
|
4
|
-
css
|
|
5
|
-
} = styledComponents;
|
|
6
|
-
const StickyWrapper = styled.div`
|
|
7
|
-
${props => props.position === 'top' ? css`
|
|
8
|
-
top: 0;
|
|
9
|
-
` : css`
|
|
10
|
-
bottom: 0;
|
|
11
|
-
`}
|
|
12
|
-
|
|
13
|
-
&.sticky-mode {
|
|
14
|
-
&.alternate,
|
|
15
|
-
&.default {
|
|
16
|
-
position: -webkit-sticky;
|
|
17
|
-
position: sticky;
|
|
18
|
-
z-index: 1;
|
|
19
|
-
${props => props.position === 'top' && css`
|
|
20
|
-
top: 0px;
|
|
21
|
-
`}
|
|
22
|
-
${props => props.position === 'bottom' && css`
|
|
23
|
-
bottom: 0px;
|
|
24
|
-
`}
|
|
25
|
-
${props => props.shadow && css`
|
|
26
|
-
box-shadow: 0px 7px 4px -3px rgb(0, 0, 0, 0.08);
|
|
27
|
-
`}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.hidden {
|
|
31
|
-
animation: 0.3s animateIn forwards;
|
|
32
|
-
${props => props.shadow && css`
|
|
33
|
-
.sticky-element {
|
|
34
|
-
animation: 0.3s shadowIn forwards;
|
|
35
|
-
}
|
|
36
|
-
`}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
&.alternate {
|
|
40
|
-
}
|
|
41
|
-
&.hidden {
|
|
42
|
-
position: sticky;
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
height: 0px;
|
|
45
|
-
min-height: 0px;
|
|
46
|
-
max-height: 0px;
|
|
47
|
-
animation: 0.6s animateOut forwards;
|
|
48
|
-
&.pristine {
|
|
49
|
-
display: none;
|
|
50
|
-
}
|
|
51
|
-
.sticky-element {
|
|
52
|
-
background: white;
|
|
53
|
-
${props => props.shadow && css`
|
|
54
|
-
animation: 0.6s shadowOut forwards;
|
|
55
|
-
`}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.sticky-element {
|
|
60
|
-
background: #ffffff;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@keyframes animateIn {
|
|
64
|
-
from {
|
|
65
|
-
height: 0%;
|
|
66
|
-
pointer-events: none;
|
|
67
|
-
transform: translateY(-100vh);
|
|
68
|
-
opacity: 0;
|
|
69
|
-
z-index: -1;
|
|
70
|
-
}
|
|
71
|
-
to {
|
|
72
|
-
height: 100%;
|
|
73
|
-
pointer-events: all;
|
|
74
|
-
transform: translateY(0);
|
|
75
|
-
opacity: 1;
|
|
76
|
-
z-index: 1;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
@keyframes animateOut {
|
|
80
|
-
from {
|
|
81
|
-
height: 100%;
|
|
82
|
-
pointer-events: all;
|
|
83
|
-
transform: translateY(0);
|
|
84
|
-
opacity: 1;
|
|
85
|
-
z-index: 1;
|
|
86
|
-
}
|
|
87
|
-
to {
|
|
88
|
-
height: 0%;
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
transform: translateY(-100vh);
|
|
91
|
-
opacity: 0;
|
|
92
|
-
z-index: -1;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
@keyframes shadowIn {
|
|
96
|
-
from {
|
|
97
|
-
box-shadow: 0px 7px 4px -3px rgb(0, 0, 0, 0);
|
|
98
|
-
}
|
|
99
|
-
to {
|
|
100
|
-
box-shadow: 0px 7px 4px -3px rgb(0, 0, 0, 0.08);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
@keyframes shadowOut {
|
|
104
|
-
from {
|
|
105
|
-
box-shadow: 0px 7px 4px -3px rgb(0, 0, 0, 0.08);
|
|
106
|
-
}
|
|
107
|
-
to {
|
|
108
|
-
box-shadow: 0px 7px 4px -3px rgb(0, 0, 0, 0);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
export default StickyWrapper;
|
|
File without changes
|
|
File without changes
|