@yakad/ui 1.2.58-beta → 1.2.60-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.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface BackgroundProps extends React.HTMLAttributes<HTMLElement> {
3
+ variant?: "dotted" | "gradient";
4
+ backgroundfixed?: boolean;
5
+ backgroundimage?: string;
6
+ }
7
+ declare function Background(props: BackgroundProps): JSX.Element;
8
+ export default Background;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { joinClassNames, joinStyles } from "@yakad/lib";
3
+ import styles from "./background.module.css";
4
+ function Background(props) {
5
+ const joinedClassNames = joinClassNames(styles.div, props.variant ? styles[props.variant] : "", props.backgroundfixed ? styles.fixed : "", props.backgroundimage ? styles.image : "", props.className);
6
+ const joinedStyles = joinStyles(props.backgroundimage
7
+ ? { backgroundImage: `url(${props.backgroundimage})` }
8
+ : {}, props.style);
9
+ return (React.createElement("div", { style: joinedStyles, className: joinedClassNames }, props.children));
10
+ }
11
+ export default Background;
12
+ //# sourceMappingURL=background.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background.js","sourceRoot":"","sources":["background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAO7C,SAAS,UAAU,CAAC,KAAsB;IACtC,MAAM,gBAAgB,GAAG,cAAc,CACnC,MAAM,CAAC,GAAG,EACV,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAC1C,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EACzC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EACzC,KAAK,CAAC,SAAU,CACnB,CAAC;IACF,MAAM,YAAY,GAAG,UAAU,CAC3B,KAAK,CAAC,eAAe;QACjB,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,KAAK,CAAC,eAAe,GAAG,EAAE;QACtD,CAAC,CAAC,EAAE,EACR,KAAK,CAAC,KAAM,CACf,CAAC;IAEF,OAAO,CACH,6BAAK,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,IAChD,KAAK,CAAC,QAAQ,CACb,CACT,CAAC;AACN,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,29 @@
1
+ .div {
2
+ width: 100%;
3
+ background-position: center;
4
+ }
5
+ .div.dotted {
6
+ border-bottom: 1px solid rgb(203 213 224);
7
+ background-color: rgb(var(--surfaceContainerHighestColor, 230 224 233));
8
+ background-image: radial-gradient(
9
+ rgb(var(--surfaceContainerLowestColor, 255 255 255)) 0.8px,
10
+ rgb(var(--surfaceContainerHighestColor, 230 224 233)) 0.5px
11
+ );
12
+ background-size: 10px 10px;
13
+ box-shadow: inset 0px -11px 16px -10px rgb(125 125 125);
14
+ }
15
+ .div.gradient {
16
+ background: linear-gradient(
17
+ 90deg,
18
+ rgb(var(--primaryColor, 11 87 208)) 27%,
19
+ rgb(var(--primaryContainerColor, 211 227 253)) 100%
20
+ );
21
+ }
22
+
23
+ .div.fixed {
24
+ background-attachment: fixed;
25
+ }
26
+ .div.image {
27
+ background-size: cover;
28
+ background-repeat: no-repeat;
29
+ }
@@ -0,0 +1,32 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { joinClassNames, joinStyles } from "@yakad/lib";
3
+ import styles from "./background.module.css";
4
+ interface BackgroundProps extends React.HTMLAttributes<HTMLElement> {
5
+ variant?: "dotted" | "gradient";
6
+ backgroundfixed?: boolean;
7
+ backgroundimage?: string;
8
+ }
9
+
10
+ function Background(props: BackgroundProps) {
11
+ const joinedClassNames = joinClassNames(
12
+ styles.div,
13
+ props.variant ? styles[props.variant] : "",
14
+ props.backgroundfixed ? styles.fixed : "",
15
+ props.backgroundimage ? styles.image : "",
16
+ props.className!
17
+ );
18
+ const joinedStyles = joinStyles(
19
+ props.backgroundimage
20
+ ? { backgroundImage: `url(${props.backgroundimage})` }
21
+ : {},
22
+ props.style!
23
+ );
24
+
25
+ return (
26
+ <div style={joinedStyles} className={joinedClassNames}>
27
+ {props.children}
28
+ </div>
29
+ );
30
+ }
31
+
32
+ export default Background;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.2.58-beta",
3
+ "version": "1.2.60-beta",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {