@20minutes/hela 0.1.65 → 0.1.66
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/assets/scripts/scroll.d.ts +1 -1
- package/dist/components/atoms/ScrollProgressBar/ScrollProgressBar.d.ts +2 -5
- package/dist/index.es.js +25 -32
- package/dist/index.umd.js +1 -1
- package/dist/js/main.min.js +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/scss/abstracts/variables/_variables.scss +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const listenerOfScroll: (
|
|
1
|
+
export declare const listenerOfScroll: () => void;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ColorType } from '../../../types';
|
|
2
|
-
|
|
3
|
-
export interface ScrollProgressBarOptions {
|
|
4
|
-
color?: ColorType;
|
|
5
|
-
hasLimit?: boolean;
|
|
2
|
+
export interface ScrollProgressBarProps {
|
|
6
3
|
variant?: 'article-mobile';
|
|
4
|
+
progressColor?: ColorType;
|
|
7
5
|
}
|
|
8
|
-
export type ScrollProgressBarProps = ScrollProgressBarOptions & BoxProps;
|
|
9
6
|
export declare const ScrollProgressBar: import('../../../types').ComponentWithAs<"div", ScrollProgressBarProps>;
|
package/dist/index.es.js
CHANGED
|
@@ -22435,42 +22435,35 @@ const aS = ({
|
|
|
22435
22435
|
fileName: Fc,
|
|
22436
22436
|
lineNumber: 24,
|
|
22437
22437
|
columnNumber: 5
|
|
22438
|
-
} }, e)), iS = (
|
|
22439
|
-
const
|
|
22440
|
-
let
|
|
22441
|
-
const
|
|
22442
|
-
|
|
22443
|
-
const
|
|
22444
|
-
|
|
22445
|
-
}, lS = (
|
|
22446
|
-
".c-progress"
|
|
22447
|
-
), t = !1) => {
|
|
22448
|
-
e && window.addEventListener("scroll", iS.bind(!1, t));
|
|
22438
|
+
} }, e)), iS = () => {
|
|
22439
|
+
const e = document.documentElement.scrollTop;
|
|
22440
|
+
let t = document.documentElement.scrollHeight - document.documentElement.clientHeight;
|
|
22441
|
+
const n = document.querySelector(".js-limit-scroll-progress-bar");
|
|
22442
|
+
n && (t = n.scrollHeight - document.documentElement.clientHeight + (window.pageYOffset + n.getBoundingClientRect().top));
|
|
22443
|
+
const o = Math.round(e / t * 100), r = document.querySelector(".c-progress__bar");
|
|
22444
|
+
r && (r.style.width = `${o}%`, o >= 100 && (r.style.width = "100%"));
|
|
22445
|
+
}, lS = () => {
|
|
22446
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", iS);
|
|
22449
22447
|
};
|
|
22450
22448
|
var Z0 = "/home/travis/build/20minutes/hela/src/components/atoms/ScrollProgressBar/ScrollProgressBar.tsx";
|
|
22451
22449
|
const Lx = Lr(({
|
|
22452
22450
|
variant: e,
|
|
22453
|
-
|
|
22454
|
-
|
|
22455
|
-
|
|
22456
|
-
},
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
|
|
22461
|
-
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
fileName: Z0,
|
|
22470
|
-
lineNumber: 32,
|
|
22471
|
-
columnNumber: 9
|
|
22472
|
-
} }));
|
|
22473
|
-
});
|
|
22451
|
+
progressColor: t = "ultramarine"
|
|
22452
|
+
}, n) => (ni(() => {
|
|
22453
|
+
lS();
|
|
22454
|
+
}, []), /* @__PURE__ */ m.createElement(Ie, { ref: n, bg: "grey-100", className: Te("c-progress", {
|
|
22455
|
+
[`c-progress--${e}`]: e
|
|
22456
|
+
}), __self: void 0, __source: {
|
|
22457
|
+
fileName: Z0,
|
|
22458
|
+
lineNumber: 21,
|
|
22459
|
+
columnNumber: 7
|
|
22460
|
+
} }, /* @__PURE__ */ m.createElement(Ie, { className: "c-progress__bar", bg: t, style: {
|
|
22461
|
+
width: "0%"
|
|
22462
|
+
}, __self: void 0, __source: {
|
|
22463
|
+
fileName: Z0,
|
|
22464
|
+
lineNumber: 26,
|
|
22465
|
+
columnNumber: 9
|
|
22466
|
+
} }))));
|
|
22474
22467
|
var uS = "/home/travis/build/20minutes/hela/src/components/atoms/Section/Section.tsx";
|
|
22475
22468
|
const zx = ({
|
|
22476
22469
|
inner: e,
|