@yakad/ui 1.2.63-beta → 1.2.66-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.
@@ -9,34 +9,16 @@ div.container {
9
9
 
10
10
  div.container.xs {
11
11
  max-width: 44.4rem;
12
- padding-left: calc((100% - 44.4rem) / 2);
13
- padding-right: calc((100% - 44.4rem) / 2);
14
12
  }
15
13
  div.container.sm {
16
14
  max-width: 60rem;
17
- padding-left: calc((100% - 60rem) / 2);
18
- padding-right: calc((100% - 60rem) / 2);
19
15
  }
20
16
  div.container.md {
21
17
  max-width: 90rem;
22
- padding-left: calc((100% - 90rem) / 2);
23
- padding-right: calc((100% - 90rem) / 2);
24
18
  }
25
19
  div.container.lg {
26
20
  max-width: 120rem;
27
- padding-left: calc((100% - 120rem) / 2);
28
- padding-right: calc((100% - 120rem) / 2);
29
21
  }
30
22
  div.container.xl {
31
23
  max-width: 150rem;
32
- padding-left: calc((100% - 150rem) / 2);
33
- padding-right: calc((100% - 150rem) / 2);
34
- }
35
-
36
- div.container.dotted {
37
- background-image: radial-gradient(
38
- rgb(var(--surfaceContainerLowestColor)) 0.8px,
39
- rgb(var(--surfaceContainerHighestColor)) 0.5px
40
- );
41
- background-size: 10px 10px;
42
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.2.63-beta",
3
+ "version": "1.2.66-beta",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/theme/theme.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  interface ThemeProps extends React.HTMLAttributes<HTMLElement> {
3
3
  mode?: "light" | "dark" | "system";
4
- color?: "green" | "pink" | "grow" | "blue" | "purple";
4
+ color?: "green" | "pink" | "yellow" | "blue" | "purple";
5
+ zoom?: number;
5
6
  }
6
7
  declare function Theme(props: ThemeProps): JSX.Element;
7
8
  export default Theme;
package/theme/theme.js CHANGED
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import { joinClassNames } from "@yakad/lib";
3
3
  import styles from "./theme.module.css";
4
4
  function Theme(props) {
5
+ const zoomPercentage = props.zoom ? (props.zoom / 100) * 62.5 : 62.5;
6
+ document.documentElement.style.setProperty("font-size", zoomPercentage + "%");
5
7
  const joinedClassNames = joinClassNames(props.mode ? styles[props.mode] : styles.system, props.color ? styles[props.color] : styles.blue, props.className);
6
8
  return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
7
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["theme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAOxC,SAAS,KAAK,CAAC,KAAiB;IAC5B,MAAM,gBAAgB,GAAG,cAAc,CACnC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAC/C,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAC/C,KAAK,CAAC,SAAU,CACnB,CAAC;IACF,OAAO,CACH,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACtC,KAAK,CAAC,QAAQ,CACb,CACT,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["theme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AACxD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAQxC,SAAS,KAAK,CAAC,KAAiB;IAC5B,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACtC,WAAW,EACX,cAAc,GAAG,GAAG,CACvB,CAAC;IAEF,MAAM,gBAAgB,GAAG,cAAc,CACnC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAC/C,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAC/C,KAAK,CAAC,SAAU,CACnB,CAAC;IAEF,OAAO,CACH,gCAAS,KAAK,EAAE,SAAS,EAAE,gBAAgB,IACtC,KAAK,CAAC,QAAQ,CACb,CACT,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
@@ -178,7 +178,7 @@
178
178
  --DarkOutlineVariantColor: 68 71 70;
179
179
  }
180
180
 
181
- .grow {
181
+ .growth {
182
182
  --LightPrimaryColor: 97 98 0;
183
183
  --LightPrimaryContainerColor: 232 233 113;
184
184
  --LightSecondaryColor: 98 91 113;
@@ -394,4 +394,4 @@
394
394
  --outlineColor: var(--DarkOutlineColor);
395
395
  --outlineVariantColor: var(--DarkOutlineVariantColor);
396
396
  }
397
- }
397
+ }
package/theme/theme.tsx CHANGED
@@ -4,15 +4,23 @@ import styles from "./theme.module.css";
4
4
 
5
5
  interface ThemeProps extends React.HTMLAttributes<HTMLElement> {
6
6
  mode?: "light" | "dark" | "system";
7
- color?: "green" | "pink" | "grow" | "blue" | "purple";
7
+ color?: "green" | "pink" | "yellow" | "blue" | "purple";
8
+ zoom?: number;
8
9
  }
9
10
 
10
11
  function Theme(props: ThemeProps) {
12
+ const zoomPercentage = props.zoom ? (props.zoom / 100) * 62.5 : 62.5;
13
+ document.documentElement.style.setProperty(
14
+ "font-size",
15
+ zoomPercentage + "%"
16
+ );
17
+
11
18
  const joinedClassNames = joinClassNames(
12
19
  props.mode ? styles[props.mode] : styles.system,
13
20
  props.color ? styles[props.color] : styles.blue,
14
21
  props.className!
15
22
  );
23
+
16
24
  return (
17
25
  <div {...props} className={joinedClassNames}>
18
26
  {props.children}