@yakad/ui 1.3.41 → 1.3.42
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/appBar/appBar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface AppBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
position?: "initial" | "sticky" | "autohide";
|
|
4
|
+
align?: "start" | "center" | "end";
|
|
5
5
|
blur?: boolean;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
package/dist/appBar/appBar.js
CHANGED
|
@@ -13,11 +13,11 @@ import React, { forwardRef, useEffect, useState } from "react";
|
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import styles from "./appBar.module.css";
|
|
15
15
|
export const AppBar = forwardRef((_a, ref) => {
|
|
16
|
-
var {
|
|
16
|
+
var { position = "initial", align, blur, className, children } = _a, restProps = __rest(_a, ["position", "align", "blur", "className", "children"]);
|
|
17
17
|
const [show, setShow] = useState(true);
|
|
18
18
|
const [lastScrollY, setLastScrollY] = useState(0);
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
if (
|
|
20
|
+
if (position !== "autohide")
|
|
21
21
|
return;
|
|
22
22
|
const handleScroll = () => {
|
|
23
23
|
const currentScrollY = window.scrollY;
|
|
@@ -33,11 +33,12 @@ export const AppBar = forwardRef((_a, ref) => {
|
|
|
33
33
|
};
|
|
34
34
|
window.addEventListener("scroll", handleScroll);
|
|
35
35
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
36
|
-
}, [lastScrollY,
|
|
36
|
+
}, [lastScrollY, position]);
|
|
37
37
|
const joinedClassNames = classNames(styles.header, {
|
|
38
|
-
[styles.sticky]: sticky,
|
|
38
|
+
[styles.sticky]: position === "sticky" || position === "autohide",
|
|
39
|
+
[styles.hidden]: position === "autohide" && !show,
|
|
40
|
+
[styles[align]]: align,
|
|
39
41
|
[styles.blur]: blur,
|
|
40
|
-
[styles.hidden]: autohide && !show,
|
|
41
42
|
}, className);
|
|
42
43
|
return (React.createElement("header", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
43
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appBar.js","sourceRoot":"","sources":["../../src/appBar/appBar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"appBar.js","sourceRoot":"","sources":["../../src/appBar/appBar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AASzC,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC5B,CACI,EAOC,EACD,GAAG,EACL,EAAE;QATA,EACI,QAAQ,GAAG,SAAS,EACpB,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,OAEX,EADM,SAAS,cANhB,sDAOC,CADe;IAIhB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,QAAQ,KAAK,UAAU;YAAE,OAAO;QAEpC,MAAM,YAAY,GAAG,GAAG,EAAE;YACtB,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC;YAEtC,IAAI,cAAc,GAAG,WAAW,IAAI,cAAc,GAAG,EAAE,EAAE,CAAC;gBACtD,cAAc;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACJ,YAAY;gBACZ,OAAO,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;YAED,cAAc,CAAC,cAAc,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,MAAM,EACb;QACI,CAAC,MAAM,CAAC,MAAM,CAAC,EACX,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,UAAU;QACpD,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,KAAK,UAAU,IAAI,CAAC,IAAI;QACjD,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC,EAAE,KAAK;QAChC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI;KACtB,EACD,SAAS,CACZ,CAAC;IAEF,OAAO,CACH,8CAAQ,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACvD,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -17,11 +17,25 @@
|
|
|
17
17
|
user-select: none;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.start {
|
|
21
|
+
justify-content: flex-start;
|
|
22
|
+
}
|
|
23
|
+
.center {
|
|
24
|
+
justify-content: center;
|
|
25
|
+
}
|
|
26
|
+
.end {
|
|
27
|
+
justify-content: flex-end;
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
.header.sticky {
|
|
21
31
|
position: sticky;
|
|
22
32
|
top: 0;
|
|
23
33
|
}
|
|
24
34
|
|
|
35
|
+
.header.hidden {
|
|
36
|
+
transform: translateY(-100%);
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
.header.blur {
|
|
26
40
|
background-color: color-mix(
|
|
27
41
|
in srgb,
|
|
@@ -30,7 +44,3 @@
|
|
|
30
44
|
);
|
|
31
45
|
backdrop-filter: blur(0.5rem);
|
|
32
46
|
}
|
|
33
|
-
|
|
34
|
-
.header.hidden {
|
|
35
|
-
transform: translateY(-100%);
|
|
36
|
-
}
|
package/dist/footer/footer.d.ts
CHANGED
package/dist/footer/footer.js
CHANGED
|
@@ -13,8 +13,8 @@ import React, { forwardRef } from "react";
|
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import styles from "./footer.module.css";
|
|
15
15
|
export const Footer = forwardRef((_a, ref) => {
|
|
16
|
-
var {
|
|
17
|
-
const joinedClassNames = classNames(styles.footer, { [styles
|
|
16
|
+
var { position = "initial", align, blur, className, children } = _a, restProps = __rest(_a, ["position", "align", "blur", "className", "children"]);
|
|
17
|
+
const joinedClassNames = classNames(styles.footer, { [styles.sticky]: position === "sticky" }, { [styles[align]]: align }, { [styles.blur]: blur }, className);
|
|
18
18
|
return (React.createElement("footer", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }), children));
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/footer/footer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AASzC,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC5B,
|
|
1
|
+
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/footer/footer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AASzC,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC5B,CACI,EAOC,EACD,GAAG,EACL,EAAE;QATA,EACI,QAAQ,GAAG,SAAS,EACpB,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,OAEX,EADM,SAAS,cANhB,sDAOC,CADe;IAIhB,MAAM,gBAAgB,GAAG,UAAU,CAC/B,MAAM,CAAC,MAAM,EACb,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,KAAK,QAAQ,EAAE,EAC1C,EAAE,CAAC,MAAM,CAAC,KAAe,CAAC,CAAC,EAAE,KAAK,EAAE,EACpC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EACvB,SAAS,CACZ,CAAC;IAEF,OAAO,CACH,8CAAQ,GAAG,EAAE,GAAG,IAAM,SAAS,IAAE,SAAS,EAAE,gBAAgB,KACvD,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CACJ,CAAC"}
|