@matteodicristofalo/text-animations 1.1.1 → 1.1.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.
|
@@ -30,6 +30,7 @@ export declare const Default: Story;
|
|
|
30
30
|
export declare const SplitByWord: Story;
|
|
31
31
|
export declare const SplitBySentence: Story;
|
|
32
32
|
export declare const Duration: Story;
|
|
33
|
+
export declare const Delay: Story;
|
|
33
34
|
export declare const Stagger: Story;
|
|
34
35
|
export declare const Threshold: Story;
|
|
35
36
|
export declare const NotOnce: Story;
|
package/dist/index.css
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
.split-text-reveal-module_text__-9O5o .split-text-reveal-module_container__mkD-P span {
|
|
18
18
|
min-width: 0.25em;
|
|
19
19
|
transform: translateY(100%);
|
|
20
|
-
transition-delay: var(--var-delay);
|
|
20
|
+
transition-delay: calc(var(--var-delay) + var(--var-stagger));
|
|
21
21
|
transition-duration: var(--var-duration);
|
|
22
22
|
transition-property: transform;
|
|
23
23
|
transition-timing-function: ease-out;
|
package/dist/index.js
CHANGED
|
@@ -123,10 +123,14 @@ function SplitTextReveal(_a) {
|
|
|
123
123
|
"--var-duration": "".concat(transitionDuration, "s"),
|
|
124
124
|
} }, hasBeenMounted ? (React.createElement(React.Fragment, null,
|
|
125
125
|
React.createElement("span", { className: styles$1["sr-only"] }, text),
|
|
126
|
-
splittedText.map(function (el, i) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
splittedText.map(function (el, i) {
|
|
127
|
+
var _a;
|
|
128
|
+
return (React.createElement("span", { key: i, className: styles$1["container"], "aria-hidden": "true" },
|
|
129
|
+
React.createElement("span", { "aria-hidden": "true", style: {
|
|
130
|
+
"--var-delay": "".concat((_a = revealOptions === null || revealOptions === void 0 ? void 0 : revealOptions.delay) !== null && _a !== void 0 ? _a : 0, "s"),
|
|
131
|
+
"--var-stagger": "".concat(round(transitionStagger * i, 3), "s"),
|
|
132
|
+
} }, el)));
|
|
133
|
+
}))) : (React.createElement("span", { className: styles$1["is-hidden"] }, text))));
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
var styles = {"text":"split-text-rotate-module_text__xzran","sr-only":"split-text-rotate-module_sr-only__Dbb9O","container":"split-text-rotate-module_container__EAJkE","char":"split-text-rotate-module_char__PYJ-k"};
|