@yakad/ui 1.2.92-beta → 1.2.94-beta

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.
@@ -1,2 +1,5 @@
1
1
  import React from "react";
2
- export default function AppBar(props: React.HTMLAttributes<HTMLElement>): JSX.Element;
2
+ export interface AppbarProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ positionSticky?: boolean;
4
+ }
5
+ export default function AppBar(props: AppbarProps): JSX.Element;
package/appBar/appBar.js CHANGED
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { joinClassNames } from "@yakad/lib";
3
3
  import styles from "./appBar.module.css";
4
4
  export default function AppBar(props) {
5
- const joinedClassNames = joinClassNames(styles.header, props.className);
5
+ const joinedClassNames = joinClassNames(styles.header, props.className, props.positionSticky ? styles.Sticky : null);
6
6
  return (React.createElement("header", { ...props, className: joinedClassNames }, props.children));
7
7
  }
8
8
  //# sourceMappingURL=appBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"appBar.js","sourceRoot":"","sources":["appBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAwC;IACnE,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAU,CAAC,CAAC;IAEzE,OAAO,CACH,mCAAY,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACzC,KAAK,CAAC,QAAQ,CACV,CACZ,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"appBar.js","sourceRoot":"","sources":["appBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAMzC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC7C,MAAM,gBAAgB,GAAG,cAAc,CACnC,MAAM,CAAC,MAAM,EACb,KAAK,CAAC,SAAU,EAChB,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAC9C,CAAC;IAEF,OAAO,CACH,mCAAY,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACzC,KAAK,CAAC,QAAQ,CACV,CACZ,CAAC;AACN,CAAC"}
@@ -13,3 +13,7 @@
13
13
  fill: rgb(var(--onSurfaceColor, 28 27 31));
14
14
  user-select: none;
15
15
  }
16
+ .sticky {
17
+ position: sticky;
18
+ top: 0;
19
+ }
package/appBar/appBar.tsx CHANGED
@@ -2,8 +2,16 @@ import React from "react";
2
2
  import { joinClassNames, joinStyles } from "@yakad/lib";
3
3
  import styles from "./appBar.module.css";
4
4
 
5
- export default function AppBar(props: React.HTMLAttributes<HTMLElement>) {
6
- const joinedClassNames = joinClassNames(styles.header, props.className!);
5
+ export interface AppbarProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ positionSticky?: boolean;
7
+ }
8
+
9
+ export default function AppBar(props: AppbarProps) {
10
+ const joinedClassNames = joinClassNames(
11
+ styles.header,
12
+ props.className!,
13
+ props.positionSticky ? styles.Sticky : null
14
+ );
7
15
 
8
16
  return (
9
17
  <header {...props} className={joinedClassNames}>
@@ -2,9 +2,9 @@
2
2
  position: relative;
3
3
  display: flex;
4
4
  align-items: center;
5
- line-height: 3rem;
5
+ line-height: 2rem;
6
6
  font-weight: 700;
7
- padding: 0 var(--padding);
7
+ padding: 0.5rem var(--padding);
8
8
  border: none;
9
9
  background: none;
10
10
  color: inherit;
@@ -12,10 +12,11 @@
12
12
  user-select: none;
13
13
  cursor: pointer;
14
14
  box-sizing: border-box;
15
+ text-decoration: none;
15
16
  }
16
17
  .small {
17
18
  min-width: 3rem;
18
- height: 3rem;
19
+ min-height: 3rem;
19
20
  --padding: 2rem;
20
21
  gap: 0.4rem;
21
22
  font-size: 1.2rem;
@@ -23,7 +24,7 @@
23
24
  }
24
25
  .medium {
25
26
  min-width: 4rem;
26
- height: 4rem;
27
+ min-height: 4rem;
27
28
  --padding: 2.4rem;
28
29
  gap: 0.8rem;
29
30
  font-size: 1.4rem;
@@ -31,7 +32,7 @@
31
32
  }
32
33
  .large {
33
34
  min-width: 5rem;
34
- height: 5rem;
35
+ min-height: 5rem;
35
36
  --padding: 3.2rem;
36
37
  gap: 1.1rem;
37
38
  font-size: 1.8rem;
@@ -1,6 +1,7 @@
1
1
  .card {
2
2
  width: 100%;
3
3
  padding: 3rem;
4
+ margin: auto;
4
5
  box-sizing: border-box;
5
6
  border-radius: 2rem;
6
7
  background: rgb(var(--surfaceContainerHighestColor, 230 224 233));
@@ -1,6 +1,6 @@
1
1
  div.container {
2
2
  display: flex;
3
- flex-direction: inherit;
3
+ flex-direction: column;
4
4
  width: 100%;
5
5
  padding: 2rem;
6
6
  margin: auto;
@@ -1,5 +1,6 @@
1
1
  .gridcontainer {
2
2
  display: grid;
3
+ align-items: center;
3
4
  width: 100%;
4
5
  box-sizing: border-box;
5
6
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.2.92-beta",
3
+ "version": "1.2.94-beta",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {