@yakad/ui 1.2.76-beta → 1.2.78-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.
Files changed (99) hide show
  1. package/appBar/appBar.d.ts +3 -3
  2. package/appBar/appBar.js +8 -8
  3. package/appBar/appBar.module.css +15 -15
  4. package/appBar/appBar.tsx +15 -15
  5. package/button/button.d.ts +13 -13
  6. package/button/button.js +27 -27
  7. package/button/button.module.css +170 -170
  8. package/button/button.tsx +87 -87
  9. package/card/card.d.ts +3 -3
  10. package/card/card.js +8 -8
  11. package/card/card.module.css +11 -11
  12. package/card/card.tsx +15 -15
  13. package/clickAwayListener/clickAwayListener.d.ts +6 -6
  14. package/clickAwayListener/clickAwayListener.js +17 -16
  15. package/clickAwayListener/clickAwayListener.js.map +1 -1
  16. package/clickAwayListener/clickAwayListener.tsx +29 -27
  17. package/codeField/codeField.d.ts +8 -8
  18. package/codeField/codeField.js +9 -9
  19. package/codeField/codeField.module.css +23 -23
  20. package/codeField/codeField.tsx +32 -32
  21. package/container/container.d.ts +8 -8
  22. package/container/container.js +8 -8
  23. package/container/container.module.css +24 -24
  24. package/container/container.tsx +27 -27
  25. package/declarations.d.ts +1 -1
  26. package/footer/footer.d.ts +3 -3
  27. package/footer/footer.js +8 -8
  28. package/footer/footer.module.css +9 -9
  29. package/footer/footer.tsx +15 -15
  30. package/form/form.d.ts +3 -3
  31. package/form/form.js +11 -11
  32. package/form/form.module.css +6 -6
  33. package/form/form.tsx +23 -23
  34. package/gridContainer/gridContainer.d.ts +7 -7
  35. package/gridContainer/gridContainer.js +10 -10
  36. package/gridContainer/gridContainer.module.css +6 -5
  37. package/gridContainer/gridContainer.tsx +28 -28
  38. package/gridItem/gridItem.d.ts +10 -10
  39. package/gridItem/gridItem.js +9 -9
  40. package/gridItem/gridItem.module.css +192 -192
  41. package/gridItem/gridItem.tsx +31 -31
  42. package/hr/hr.d.ts +8 -8
  43. package/hr/hr.js +11 -11
  44. package/hr/hr.module.css +19 -19
  45. package/hr/hr.tsx +32 -32
  46. package/index.d.ts +24 -24
  47. package/index.js +24 -24
  48. package/index.tsx +48 -48
  49. package/inputField/inputField.d.ts +12 -12
  50. package/inputField/inputField.js +10 -10
  51. package/inputField/inputField.module.css +167 -167
  52. package/inputField/inputField.tsx +38 -38
  53. package/list/list.d.ts +7 -7
  54. package/list/list.js +8 -8
  55. package/list/list.module.css +22 -22
  56. package/list/list.tsx +25 -25
  57. package/listItem/listItem.d.ts +3 -3
  58. package/listItem/listItem.js +6 -6
  59. package/listItem/listItem.module.css +6 -6
  60. package/listItem/listItem.tsx +12 -12
  61. package/loading/loading.d.ts +7 -7
  62. package/loading/loading.js +9 -9
  63. package/loading/loading.module.css +91 -91
  64. package/loading/loading.tsx +25 -25
  65. package/main/main.d.ts +6 -6
  66. package/main/main.js +9 -9
  67. package/main/main.module.css +19 -19
  68. package/main/main.tsx +25 -25
  69. package/navigation/navigation.d.ts +7 -7
  70. package/navigation/navigation.js +8 -8
  71. package/navigation/navigation.module.css +61 -61
  72. package/navigation/navigation.tsx +24 -24
  73. package/package.json +31 -31
  74. package/page/page.d.ts +3 -3
  75. package/page/page.js +8 -8
  76. package/page/page.module.css +10 -10
  77. package/page/page.tsx +15 -15
  78. package/row/row.d.ts +3 -3
  79. package/row/row.js +8 -8
  80. package/row/row.module.css +7 -7
  81. package/row/row.tsx +15 -15
  82. package/spacer/spacer.d.ts +3 -3
  83. package/spacer/spacer.js +6 -6
  84. package/spacer/spacer.module.css +5 -5
  85. package/spacer/spacer.tsx +8 -8
  86. package/stack/stack.d.ts +3 -3
  87. package/stack/stack.js +8 -8
  88. package/stack/stack.module.css +6 -6
  89. package/stack/stack.tsx +15 -15
  90. package/svgIcon/svgIcon.d.ts +6 -6
  91. package/svgIcon/svgIcon.js +11 -11
  92. package/svgIcon/svgIcon.module.css +5 -5
  93. package/svgIcon/svgIcon.tsx +26 -26
  94. package/theme/theme.d.ts +9 -9
  95. package/theme/theme.js +11 -11
  96. package/theme/theme.module.css +397 -397
  97. package/theme/theme.tsx +29 -29
  98. package/theme/zoom.css +3 -3
  99. package/tsconfig.json +13 -13
package/button/button.tsx CHANGED
@@ -1,87 +1,87 @@
1
- import React from "react";
2
- import { joinClassNames } from "@yakad/lib";
3
- import SvgIcon from "../svgIcon/svgIcon";
4
- import Loading from "../loading/loading";
5
- import styles from "./button.module.css";
6
-
7
- interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
8
- size?: "small" | "medium" | "large";
9
- variant?:
10
- | "text"
11
- | "outlined"
12
- | "filled"
13
- | "filledtonal"
14
- | "tonal"
15
- | "elevated"
16
- | "link"
17
- | "fab";
18
- borderStyle?: "none" | "semi" | "squircle" | "rounded";
19
- icon?: JSX.Element;
20
- iconPosition?: "start" | "end";
21
- loadingPosition?: "auto" | "center";
22
- loadingVariant?: "scaleOut" | "dots" | "spinner";
23
- disabled?: boolean;
24
- }
25
-
26
- interface iconSizeMap {
27
- small: number;
28
- medium: number;
29
- large: number;
30
- }
31
-
32
- const iconSizeMaps: iconSizeMap = {
33
- small: 2,
34
- medium: 2.4,
35
- large: 3.2,
36
- };
37
-
38
- function Button(props: ButtonProps) {
39
- const startWithChildren = props.iconPosition === "end";
40
- const centerLoading =
41
- !props.icon ||
42
- (props.loadingVariant && props.loadingPosition === "center");
43
-
44
- const joinedClassNames = joinClassNames(
45
- styles.button,
46
- props.variant ? styles[props.variant] : styles.text,
47
- props.loadingVariant ? styles.loading : "",
48
- props.loadingVariant && centerLoading
49
- ? styles.loadingPositionCenter
50
- : "",
51
- props.size ? styles[props.size] : styles.medium,
52
- props.borderStyle ? styles[props.borderStyle] : styles.rounded,
53
- props.icon && !props.children ? styles.iconButton : "",
54
- props.className!
55
- );
56
-
57
- return (
58
- <button {...props} className={joinedClassNames}>
59
- {startWithChildren ? props.children : null}
60
- {props.loadingVariant ? (
61
- <div
62
- className={joinClassNames(
63
- centerLoading ? styles.positionCenter : "",
64
- styles.displayOnDisabled
65
- )}
66
- >
67
- <Loading size={props.size} variant={props.loadingVariant} />
68
- </div>
69
- ) : null}
70
- {props.icon ? (
71
- <SvgIcon
72
- className={styles.hideOnDisabled}
73
- size={
74
- props.size
75
- ? iconSizeMaps[props.size]
76
- : iconSizeMaps.medium
77
- }
78
- >
79
- {props.icon}
80
- </SvgIcon>
81
- ) : null}
82
- {!startWithChildren ? props.children : null}
83
- </button>
84
- );
85
- }
86
-
87
- export default Button;
1
+ import React from "react";
2
+ import { joinClassNames } from "@yakad/lib";
3
+ import SvgIcon from "../svgIcon/svgIcon";
4
+ import Loading from "../loading/loading";
5
+ import styles from "./button.module.css";
6
+
7
+ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
8
+ size?: "small" | "medium" | "large";
9
+ variant?:
10
+ | "text"
11
+ | "outlined"
12
+ | "filled"
13
+ | "filledtonal"
14
+ | "tonal"
15
+ | "elevated"
16
+ | "link"
17
+ | "fab";
18
+ borderStyle?: "none" | "semi" | "squircle" | "rounded";
19
+ icon?: JSX.Element;
20
+ iconPosition?: "start" | "end";
21
+ loadingPosition?: "auto" | "center";
22
+ loadingVariant?: "scaleOut" | "dots" | "spinner";
23
+ disabled?: boolean;
24
+ }
25
+
26
+ interface iconSizeMap {
27
+ small: number;
28
+ medium: number;
29
+ large: number;
30
+ }
31
+
32
+ const iconSizeMaps: iconSizeMap = {
33
+ small: 2,
34
+ medium: 2.4,
35
+ large: 3.2,
36
+ };
37
+
38
+ function Button(props: ButtonProps) {
39
+ const startWithChildren = props.iconPosition === "end";
40
+ const centerLoading =
41
+ !props.icon ||
42
+ (props.loadingVariant && props.loadingPosition === "center");
43
+
44
+ const joinedClassNames = joinClassNames(
45
+ styles.button,
46
+ props.variant ? styles[props.variant] : styles.text,
47
+ props.loadingVariant ? styles.loading : "",
48
+ props.loadingVariant && centerLoading
49
+ ? styles.loadingPositionCenter
50
+ : "",
51
+ props.size ? styles[props.size] : styles.medium,
52
+ props.borderStyle ? styles[props.borderStyle] : styles.rounded,
53
+ props.icon && !props.children ? styles.iconButton : "",
54
+ props.className!
55
+ );
56
+
57
+ return (
58
+ <button {...props} className={joinedClassNames}>
59
+ {startWithChildren ? props.children : null}
60
+ {props.loadingVariant ? (
61
+ <div
62
+ className={joinClassNames(
63
+ centerLoading ? styles.positionCenter : "",
64
+ styles.displayOnDisabled
65
+ )}
66
+ >
67
+ <Loading size={props.size} variant={props.loadingVariant} />
68
+ </div>
69
+ ) : null}
70
+ {props.icon ? (
71
+ <SvgIcon
72
+ className={styles.hideOnDisabled}
73
+ size={
74
+ props.size
75
+ ? iconSizeMaps[props.size]
76
+ : iconSizeMaps.medium
77
+ }
78
+ >
79
+ {props.icon}
80
+ </SvgIcon>
81
+ ) : null}
82
+ {!startWithChildren ? props.children : null}
83
+ </button>
84
+ );
85
+ }
86
+
87
+ export default Button;
package/card/card.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import React from "react";
2
- declare function Card(props: React.HTMLAttributes<HTMLElement>): JSX.Element;
3
- export default Card;
1
+ import React from "react";
2
+ declare function Card(props: React.HTMLAttributes<HTMLElement>): JSX.Element;
3
+ export default Card;
package/card/card.js CHANGED
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- import { joinClassNames } from "@yakad/lib";
3
- import styles from "./card.module.css";
4
- function Card(props) {
5
- const joinedClassNames = joinClassNames(styles.card, props.className);
6
- return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
7
- }
8
- export default Card;
1
+ import React from "react";
2
+ import { joinClassNames } from "@yakad/lib";
3
+ import styles from "./card.module.css";
4
+ function Card(props) {
5
+ const joinedClassNames = joinClassNames(styles.card, props.className);
6
+ return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
7
+ }
8
+ export default Card;
9
9
  //# sourceMappingURL=card.js.map
@@ -1,11 +1,11 @@
1
- .card {
2
- width: 100%;
3
- padding: 3rem;
4
- box-sizing: border-box;
5
- border-radius: 2rem;
6
- background: rgb(var(--surfaceContainerHighestColor, 230 224 233));
7
- color: rgb(var(--onSurfaceColor, 28 27 31));
8
- fill: rgb(var(--onSurfaceColor, 28 27 31));
9
- box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),
10
- 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
11
- }
1
+ .card {
2
+ width: 100%;
3
+ padding: 3rem;
4
+ box-sizing: border-box;
5
+ border-radius: 2rem;
6
+ background: rgb(var(--surfaceContainerHighestColor, 230 224 233));
7
+ color: rgb(var(--onSurfaceColor, 28 27 31));
8
+ fill: rgb(var(--onSurfaceColor, 28 27 31));
9
+ box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),
10
+ 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
11
+ }
package/card/card.tsx CHANGED
@@ -1,15 +1,15 @@
1
- import React from "react";
2
- import { joinClassNames } from "@yakad/lib";
3
- import styles from "./card.module.css";
4
-
5
- function Card(props: React.HTMLAttributes<HTMLElement>) {
6
- const joinedClassNames = joinClassNames(styles.card, props.className!);
7
-
8
- return (
9
- <div {...props} className={joinedClassNames}>
10
- {props.children}
11
- </div>
12
- );
13
- }
14
-
15
- export default Card;
1
+ import React from "react";
2
+ import { joinClassNames } from "@yakad/lib";
3
+ import styles from "./card.module.css";
4
+
5
+ function Card(props: React.HTMLAttributes<HTMLElement>) {
6
+ const joinedClassNames = joinClassNames(styles.card, props.className!);
7
+
8
+ return (
9
+ <div {...props} className={joinedClassNames}>
10
+ {props.children}
11
+ </div>
12
+ );
13
+ }
14
+
15
+ export default Card;
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
3
- onClickAway: React.MouseEventHandler<HTMLDivElement>;
4
- }
5
- declare function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element;
6
- export default ClickAwayListener;
1
+ import React from "react";
2
+ interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ onClickAway: React.MouseEventHandler<HTMLDivElement>;
4
+ }
5
+ declare function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element;
6
+ export default ClickAwayListener;
@@ -1,17 +1,18 @@
1
- import React, { useEffect, useRef } from "react";
2
- function ClickAwayListener(props) {
3
- const ref = useRef(null);
4
- useEffect(() => {
5
- const handleOutSideClick = (event) => {
6
- if (ref.current && !ref.current.contains(event.target)) {
7
- props.onClickAway && props.onClickAway(event);
8
- }
9
- };
10
- document.addEventListener("click", handleOutSideClick, true);
11
- // CleanUp When element unmount
12
- return () => document.removeEventListener("click", handleOutSideClick, true);
13
- }, [props.onClickAway]);
14
- return React.createElement("div", { ref: ref }, props.children);
15
- }
16
- export default ClickAwayListener;
1
+ "use client";
2
+ import React, { useEffect, useRef } from "react";
3
+ function ClickAwayListener(props) {
4
+ const ref = useRef(null);
5
+ useEffect(() => {
6
+ const handleOutSideClick = (event) => {
7
+ if (ref.current && !ref.current.contains(event.target)) {
8
+ props.onClickAway && props.onClickAway(event);
9
+ }
10
+ };
11
+ document.addEventListener("click", handleOutSideClick, true);
12
+ // CleanUp When element unmount
13
+ return () => document.removeEventListener("click", handleOutSideClick, true);
14
+ }, [props.onClickAway]);
15
+ return React.createElement("div", { ref: ref }, props.children);
16
+ }
17
+ export default ClickAwayListener;
17
18
  //# sourceMappingURL=clickAwayListener.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clickAwayListener.js","sourceRoot":"","sources":["clickAwayListener.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAMjD,SAAS,iBAAiB,CAAC,KAA6B;IACpD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEzB,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,kBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,OAAO,IAAI,CAAE,GAAG,CAAC,OAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBAC7D,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,KAAY,CAAC,CAAC;aACxD;QACL,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAE7D,+BAA+B;QAC/B,OAAO,GAAG,EAAE,CACR,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAExB,OAAO,6BAAK,GAAG,EAAE,GAAG,IAAG,KAAK,CAAC,QAAQ,CAAO,CAAC;AACjD,CAAC;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"clickAwayListener.js","sourceRoot":"","sources":["clickAwayListener.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAMjD,SAAS,iBAAiB,CAAC,KAA6B;IACpD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEzB,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,kBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,OAAO,IAAI,CAAE,GAAG,CAAC,OAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBAC7D,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,KAAY,CAAC,CAAC;aACxD;QACL,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAE7D,+BAA+B;QAC/B,OAAO,GAAG,EAAE,CACR,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAExB,OAAO,6BAAK,GAAG,EAAE,GAAG,IAAG,KAAK,CAAC,QAAQ,CAAO,CAAC;AACjD,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,27 +1,29 @@
1
- import React, { useEffect, useRef } from "react";
2
-
3
- interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
4
- onClickAway: React.MouseEventHandler<HTMLDivElement>;
5
- }
6
-
7
- function ClickAwayListener(props: ClickAwayListenerProps) {
8
- const ref = useRef(null);
9
-
10
- useEffect(() => {
11
- const handleOutSideClick = (event: MouseEvent) => {
12
- if (ref.current && !(ref.current as any).contains(event.target)) {
13
- props.onClickAway && props.onClickAway(event as any);
14
- }
15
- };
16
-
17
- document.addEventListener("click", handleOutSideClick, true);
18
-
19
- // CleanUp When element unmount
20
- return () =>
21
- document.removeEventListener("click", handleOutSideClick, true);
22
- }, [props.onClickAway]);
23
-
24
- return <div ref={ref}>{props.children}</div>;
25
- }
26
-
27
- export default ClickAwayListener;
1
+ "use client";
2
+
3
+ import React, { useEffect, useRef } from "react";
4
+
5
+ interface ClickAwayListenerProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ onClickAway: React.MouseEventHandler<HTMLDivElement>;
7
+ }
8
+
9
+ function ClickAwayListener(props: ClickAwayListenerProps) {
10
+ const ref = useRef(null);
11
+
12
+ useEffect(() => {
13
+ const handleOutSideClick = (event: MouseEvent) => {
14
+ if (ref.current && !(ref.current as any).contains(event.target)) {
15
+ props.onClickAway && props.onClickAway(event as any);
16
+ }
17
+ };
18
+
19
+ document.addEventListener("click", handleOutSideClick, true);
20
+
21
+ // CleanUp When element unmount
22
+ return () =>
23
+ document.removeEventListener("click", handleOutSideClick, true);
24
+ }, [props.onClickAway]);
25
+
26
+ return <div ref={ref}>{props.children}</div>;
27
+ }
28
+
29
+ export default ClickAwayListener;
@@ -1,8 +1,8 @@
1
- import React from "react";
2
- interface CodeFieldsProps extends React.HTMLAttributes<HTMLInputElement> {
3
- length?: number;
4
- name?: string;
5
- type?: string;
6
- }
7
- declare function CodeField(props: CodeFieldsProps): JSX.Element;
8
- export default CodeField;
1
+ import React from "react";
2
+ interface CodeFieldsProps extends React.HTMLAttributes<HTMLInputElement> {
3
+ length?: number;
4
+ name?: string;
5
+ type?: string;
6
+ }
7
+ declare function CodeField(props: CodeFieldsProps): JSX.Element;
8
+ export default CodeField;
@@ -1,10 +1,10 @@
1
- import React from "react";
2
- import { joinClassNames, joinStyles } from "@yakad/lib";
3
- import styles from "./codeField.module.css";
4
- function CodeField(props) {
5
- const joinedClassNames = joinClassNames(styles.input, props.className);
6
- const joinedStyles = joinStyles({ width: "calc(1.5ch * " + props.length + ")" }, props.style);
7
- return (React.createElement("input", { ...props, name: props.name, type: props.type, minLength: props.length, maxLength: props.length, className: joinedClassNames, style: joinedStyles }));
8
- }
9
- export default CodeField;
1
+ import React from "react";
2
+ import { joinClassNames, joinStyles } from "@yakad/lib";
3
+ import styles from "./codeField.module.css";
4
+ function CodeField(props) {
5
+ const joinedClassNames = joinClassNames(styles.input, props.className);
6
+ const joinedStyles = joinStyles({ width: "calc(1.5ch * " + props.length + ")" }, props.style);
7
+ return (React.createElement("input", { ...props, name: props.name, type: props.type, minLength: props.length, maxLength: props.length, className: joinedClassNames, style: joinedStyles }));
8
+ }
9
+ export default CodeField;
10
10
  //# sourceMappingURL=codeField.js.map
@@ -1,23 +1,23 @@
1
- .input {
2
- box-sizing: border-box;
3
- display: block;
4
- border: none;
5
- padding: 0;
6
- margin: 0;
7
- margin-left: 0.5ch;
8
- background: repeating-linear-gradient(
9
- 90deg,
10
- #7d7d7d 0,
11
- #7d7d7d 1ch,
12
- transparent 0,
13
- transparent 1.5ch
14
- )
15
- 0 100%/100% 0.2rem no-repeat;
16
- color: transparent;
17
- text-shadow: 0 0 0 rgb(var(--secondaryColor, 98 91 113));
18
- font: 5ch consolas, monospace;
19
- letter-spacing: 0.5ch;
20
- }
21
- .input:focus {
22
- outline: none;
23
- }
1
+ .input {
2
+ box-sizing: border-box;
3
+ display: block;
4
+ border: none;
5
+ padding: 0;
6
+ margin: 0;
7
+ margin-left: 0.5ch;
8
+ background: repeating-linear-gradient(
9
+ 90deg,
10
+ #7d7d7d 0,
11
+ #7d7d7d 1ch,
12
+ transparent 0,
13
+ transparent 1.5ch
14
+ )
15
+ 0 100%/100% 0.2rem no-repeat;
16
+ color: transparent;
17
+ text-shadow: 0 0 0 rgb(var(--secondaryColor, 98 91 113));
18
+ font: 5ch consolas, monospace;
19
+ letter-spacing: 0.5ch;
20
+ }
21
+ .input:focus {
22
+ outline: none;
23
+ }
@@ -1,32 +1,32 @@
1
- import React from "react";
2
- import { joinClassNames, joinStyles } from "@yakad/lib";
3
- import styles from "./codeField.module.css";
4
-
5
- interface CodeFieldsProps extends React.HTMLAttributes<HTMLInputElement> {
6
- length?: number;
7
- name?: string;
8
- type?: string;
9
- }
10
-
11
- function CodeField(props: CodeFieldsProps) {
12
- const joinedClassNames = joinClassNames(styles.input, props.className!);
13
-
14
- const joinedStyles = joinStyles(
15
- { width: "calc(1.5ch * " + props.length + ")" },
16
- props.style!
17
- );
18
-
19
- return (
20
- <input
21
- {...props}
22
- name={props.name}
23
- type={props.type}
24
- minLength={props.length}
25
- maxLength={props.length}
26
- className={joinedClassNames}
27
- style={joinedStyles}
28
- />
29
- );
30
- }
31
-
32
- export default CodeField;
1
+ import React from "react";
2
+ import { joinClassNames, joinStyles } from "@yakad/lib";
3
+ import styles from "./codeField.module.css";
4
+
5
+ interface CodeFieldsProps extends React.HTMLAttributes<HTMLInputElement> {
6
+ length?: number;
7
+ name?: string;
8
+ type?: string;
9
+ }
10
+
11
+ function CodeField(props: CodeFieldsProps) {
12
+ const joinedClassNames = joinClassNames(styles.input, props.className!);
13
+
14
+ const joinedStyles = joinStyles(
15
+ { width: "calc(1.5ch * " + props.length + ")" },
16
+ props.style!
17
+ );
18
+
19
+ return (
20
+ <input
21
+ {...props}
22
+ name={props.name}
23
+ type={props.type}
24
+ minLength={props.length}
25
+ maxLength={props.length}
26
+ className={joinedClassNames}
27
+ style={joinedStyles}
28
+ />
29
+ );
30
+ }
31
+
32
+ export default CodeField;
@@ -1,8 +1,8 @@
1
- import React from "react";
2
- declare type ScreenSize = "xs" | "sm" | "md" | "lg" | "xl";
3
- interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
4
- maxWidth?: ScreenSize;
5
- background?: "dotted";
6
- }
7
- declare function Container(props: ContainerProps): JSX.Element;
8
- export default Container;
1
+ import React from "react";
2
+ declare type ScreenSize = "xs" | "sm" | "md" | "lg" | "xl";
3
+ interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ maxWidth?: ScreenSize;
5
+ background?: "dotted";
6
+ }
7
+ declare function Container(props: ContainerProps): JSX.Element;
8
+ export default Container;
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- import { joinClassNames } from "@yakad/lib";
3
- import styles from "./container.module.css";
4
- function Container(props) {
5
- const joinedClassNames = joinClassNames(props.maxWidth ? styles[props.maxWidth] : "", props.background ? styles[props.background] : "", styles.container, props.className);
6
- return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
7
- }
8
- export default Container;
1
+ import React from "react";
2
+ import { joinClassNames } from "@yakad/lib";
3
+ import styles from "./container.module.css";
4
+ function Container(props) {
5
+ const joinedClassNames = joinClassNames(props.maxWidth ? styles[props.maxWidth] : "", props.background ? styles[props.background] : "", styles.container, props.className);
6
+ return (React.createElement("div", { ...props, className: joinedClassNames }, props.children));
7
+ }
8
+ export default Container;
9
9
  //# sourceMappingURL=container.js.map
@@ -1,24 +1,24 @@
1
- div.container {
2
- display: flex;
3
- flex-direction: inherit;
4
- width: 100%;
5
- padding: 2rem;
6
- margin: auto;
7
- box-sizing: border-box;
8
- }
9
-
10
- div.container.xs {
11
- max-width: 44.4rem;
12
- }
13
- div.container.sm {
14
- max-width: 60rem;
15
- }
16
- div.container.md {
17
- max-width: 90rem;
18
- }
19
- div.container.lg {
20
- max-width: 120rem;
21
- }
22
- div.container.xl {
23
- max-width: 150rem;
24
- }
1
+ div.container {
2
+ display: flex;
3
+ flex-direction: inherit;
4
+ width: 100%;
5
+ padding: 2rem;
6
+ margin: auto;
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ div.container.xs {
11
+ max-width: 44.4rem;
12
+ }
13
+ div.container.sm {
14
+ max-width: 60rem;
15
+ }
16
+ div.container.md {
17
+ max-width: 90rem;
18
+ }
19
+ div.container.lg {
20
+ max-width: 120rem;
21
+ }
22
+ div.container.xl {
23
+ max-width: 150rem;
24
+ }