@yakad/ui 1.3.111 → 1.3.113
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.js +1 -2
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.js +7 -8
- package/dist/Card/Card.js +1 -2
- package/dist/CheckBox/CheckBox.js +1 -2
- package/dist/CodeBox/CodeBox.d.ts +1 -1
- package/dist/CodeBox/CodeBox.js +3 -4
- package/dist/CodeField/CodeField.d.ts +1 -1
- package/dist/CodeField/CodeField.js +3 -4
- package/dist/Container/Container.js +1 -2
- package/dist/Display/Display.js +1 -2
- package/dist/Footer/Footer.js +1 -2
- package/dist/Form/Form.js +1 -2
- package/dist/GridContainer/GridContainer.js +1 -2
- package/dist/GridItem/GridItem.js +1 -2
- package/dist/Hr/Hr.js +1 -2
- package/dist/InputField/InputField.d.ts +1 -1
- package/dist/InputField/InputField.js +3 -4
- package/dist/List/List.js +1 -2
- package/dist/ListItem/ListItem.js +1 -2
- package/dist/LoadingIcon/LoadingIcon.js +1 -2
- package/dist/Main/Main.d.ts +1 -1
- package/dist/Main/Main.js +3 -4
- package/dist/Navigation/Navigation.js +1 -2
- package/dist/RadioButton/RadioButton.d.ts +1 -1
- package/dist/RadioButton/RadioButton.js +5 -6
- package/dist/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.js +4 -5
- package/dist/Row/Row.js +1 -2
- package/dist/Screen/Screen.js +1 -2
- package/dist/Select/Select.js +1 -2
- package/dist/Spacer/Spacer.js +1 -2
- package/dist/Stack/Stack.js +1 -2
- package/dist/SvgIcon/SvgIcon.js +1 -2
- package/dist/Table/Table.js +7 -14
- package/dist/Text/Text.js +9 -18
- package/dist/Theme/Theme.d.ts +1 -1
- package/dist/Theme/Theme.js +3 -4
- package/dist/WithDropdawn/WithDropdawn.d.ts +1 -4
- package/dist/WithDropdawn/WithDropdawn.js +2 -3
- package/dist/WithInteractions/WithInteractions.js +1 -2
- package/package.json +1 -1
package/dist/AppBar/AppBar.js
CHANGED
|
@@ -15,7 +15,7 @@ import { forwardRef, useEffect, useState } from "react";
|
|
|
15
15
|
import classNames from "classnames";
|
|
16
16
|
import boxingStyles from "../boxing.module.css";
|
|
17
17
|
import styles from "./AppBar.module.css";
|
|
18
|
-
export const AppBar = forwardRef((_a, ref)
|
|
18
|
+
export const AppBar = forwardRef(function AppBar(_a, ref) {
|
|
19
19
|
var { align, overflow = "shrink", position = "initial", size, blur, className, children } = _a, restProps = __rest(_a, ["align", "overflow", "position", "size", "blur", "className", "children"]);
|
|
20
20
|
const [show, setShow] = useState(true);
|
|
21
21
|
const [lastScrollY, setLastScrollY] = useState(0);
|
|
@@ -42,4 +42,3 @@ export const AppBar = forwardRef((_a, ref) => {
|
|
|
42
42
|
}, { [styles.hidden]: position === "scroll" && !show }, { [styles[size]]: size }, { [styles.blur]: blur }, className);
|
|
43
43
|
return (_jsx("header", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
44
44
|
});
|
|
45
|
-
AppBar.displayName = "AppBar";
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
size?: "small" | "medium" | "large";
|
|
4
4
|
variant?: "text" | "outlined" | "filled" | "filledtonal" | "tonal" | "elevated" | "link" | "fab";
|
|
5
|
-
|
|
5
|
+
borderStyle?: "none" | "semi" | "squircle" | "rounded";
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
iconPosition?: "start" | "end";
|
|
8
|
+
loadingPosition?: "auto" | "center";
|
|
9
|
+
loadingVariant?: "scaleOut" | "dots" | "spinner";
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
}
|
|
12
12
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
package/dist/Button/Button.js
CHANGED
|
@@ -14,13 +14,12 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import { LoadingIcon } from "..";
|
|
16
16
|
import styles from "./Button.module.css";
|
|
17
|
-
export const Button = forwardRef((_a, ref)
|
|
18
|
-
var { size = "medium", variant = "text",
|
|
19
|
-
const childrenFirst = Boolean(
|
|
20
|
-
const isLoadingPositionCenter = Boolean(!icon ||
|
|
21
|
-
const joinedClassNames = classNames(styles.button, styles[variant], { [styles.loading]:
|
|
22
|
-
return (_jsxs("button", Object.assign({ ref: ref, className: joinedClassNames }, restProps, { children: [childrenFirst && children,
|
|
17
|
+
export const Button = forwardRef(function Button(_a, ref) {
|
|
18
|
+
var { size = "medium", variant = "text", borderStyle = "rounded", icon, iconPosition = "start", loadingPosition = "auto", loadingVariant, className, children } = _a, restProps = __rest(_a, ["size", "variant", "borderStyle", "icon", "iconPosition", "loadingPosition", "loadingVariant", "className", "children"]);
|
|
19
|
+
const childrenFirst = Boolean(iconPosition === "end");
|
|
20
|
+
const isLoadingPositionCenter = Boolean(!icon || loadingPosition === "center");
|
|
21
|
+
const joinedClassNames = classNames(styles.button, styles[variant], { [styles.loading]: loadingVariant }, { [styles.loadingPositionCenter]: isLoadingPositionCenter }, styles[size], styles[borderStyle], { [styles.iconButton]: !children && icon }, className);
|
|
22
|
+
return (_jsxs("button", Object.assign({ ref: ref, className: joinedClassNames }, restProps, { children: [childrenFirst && children, loadingVariant && (_jsx("div", { className: classNames(styles.displayOnDisabled, {
|
|
23
23
|
[styles.positionCenter]: isLoadingPositionCenter,
|
|
24
|
-
}), children: _jsx(LoadingIcon, { size: size, variant:
|
|
24
|
+
}), children: _jsx(LoadingIcon, { size: size, variant: loadingVariant }) })), icon, !childrenFirst && children] })));
|
|
25
25
|
});
|
|
26
|
-
Button.displayName = "Button";
|
package/dist/Card/Card.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Card.module.css";
|
|
17
|
-
export const Card = forwardRef((_a, ref)
|
|
17
|
+
export const Card = forwardRef(function Card(_a, ref) {
|
|
18
18
|
var { align, blur, className, children } = _a, restProps = __rest(_a, ["align", "blur", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, "fullWidthLover", styles.card, { [styles.blur]: blur }, className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Card.displayName = "Card";
|
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import { Symbol } from "@yakad/symbols";
|
|
16
16
|
import styles from "./CheckBox.module.css";
|
|
17
|
-
export const CheckBox = forwardRef((_a, ref)
|
|
17
|
+
export const CheckBox = forwardRef(function CheckBox(_a, ref) {
|
|
18
18
|
var { label, className, style } = _a, restProps = __rest(_a, ["label", "className", "style"]);
|
|
19
19
|
const joinedClassNames = classNames(label && "fullWidthLover", styles.label, { [styles.labeled]: label }, { [styles.disabled]: restProps.disabled }, className);
|
|
20
20
|
return (_jsxs("label", { className: joinedClassNames, style: style, children: [label, _jsx("input", Object.assign({ ref: ref }, restProps, { className: styles.input, type: "checkbox" })), _jsxs("div", { className: styles.symbolContainer, children: [_jsx(Symbol, { className: styles.symbolChecked, icon: "check_box" }), _jsx(Symbol, { className: styles.symbolUnChecked, icon: "check_box_outline_blank" })] })] }));
|
|
21
21
|
});
|
|
22
|
-
CheckBox.displayName = "CheckBox";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface CodeBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
|
|
3
|
+
copyButton?: boolean;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const CodeBox: import("react").ForwardRefExoticComponent<CodeBoxProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/CodeBox/CodeBox.js
CHANGED
|
@@ -15,9 +15,8 @@ import classNames from "classnames";
|
|
|
15
15
|
import { Symbol } from "@yakad/symbols";
|
|
16
16
|
import { Button, Card } from "..";
|
|
17
17
|
import styles from "./CodeBox.module.css";
|
|
18
|
-
export const CodeBox = forwardRef((_a, ref)
|
|
19
|
-
var {
|
|
18
|
+
export const CodeBox = forwardRef(function CodeBox(_a, ref) {
|
|
19
|
+
var { copyButton, className, children } = _a, restProps = __rest(_a, ["copyButton", "className", "children"]);
|
|
20
20
|
const joinedClassNames = classNames("fullWidthLover", styles.ZZZZZZZZZZ, className);
|
|
21
|
-
return (_jsxs(Card, Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: [_jsx("pre", { children: children }),
|
|
21
|
+
return (_jsxs(Card, Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: [_jsx("pre", { children: children }), copyButton && _jsx(Button, { icon: _jsx(Symbol, { icon: "copy_all" }) })] })));
|
|
22
22
|
});
|
|
23
|
-
CodeBox.displayName = "CodeBox";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type ExcludedTypes = "minLength" | "maxLength" | "type";
|
|
3
3
|
export interface CodeFieldsProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedTypes> {
|
|
4
4
|
length?: number;
|
|
5
|
-
|
|
5
|
+
onFilled?: () => void;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const CodeField: import("react").ForwardRefExoticComponent<CodeFieldsProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -30,13 +30,12 @@ function sliceOverLength(inputElement, inputLength) {
|
|
|
30
30
|
function removeUnNumberChars(inputElement) {
|
|
31
31
|
inputElement.value = inputElement.value.replace(/[^0-9]+/, "");
|
|
32
32
|
}
|
|
33
|
-
export const CodeField = forwardRef((_a, ref)
|
|
34
|
-
var { length = 6,
|
|
33
|
+
export const CodeField = forwardRef(function CodeField(_a, ref) {
|
|
34
|
+
var { length = 6, onFilled, autoComplete, pattern, onInput, className, style } = _a, restProps = __rest(_a, ["length", "onFilled", "autoComplete", "pattern", "onInput", "className", "style"]);
|
|
35
35
|
const joinedClassNames = classNames("fullWidthLover", styles.input, className);
|
|
36
36
|
const joinedStyles = Object.assign(Object.assign({}, style), { width: `calc(1.5ch * ${length})` });
|
|
37
37
|
return (_jsx("input", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, style: joinedStyles, type: "number", minLength: length, maxLength: length, autoComplete: autoComplete || "off", pattern: pattern || "[0-9]", onInput: (event) => {
|
|
38
|
-
isInputFilled(event, length) &&
|
|
38
|
+
isInputFilled(event, length) && onFilled;
|
|
39
39
|
onInput;
|
|
40
40
|
} })));
|
|
41
41
|
});
|
|
42
|
-
CodeField.displayName = "CodeField";
|
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Container.module.css";
|
|
17
|
-
export const Container = forwardRef((_a, ref)
|
|
17
|
+
export const Container = forwardRef(function Container(_a, ref) {
|
|
18
18
|
var { size = "xl", align, className, children } = _a, restProps = __rest(_a, ["size", "align", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.container, styles[size], className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Container.displayName = "Container";
|
package/dist/Display/Display.js
CHANGED
|
@@ -13,9 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Display.module.css";
|
|
16
|
-
export const Display = forwardRef((_a, ref)
|
|
16
|
+
export const Display = forwardRef(function Display(_a, ref) {
|
|
17
17
|
var { minWidth, maxWidth, className, children } = _a, restProps = __rest(_a, ["minWidth", "maxWidth", "className", "children"]);
|
|
18
18
|
const joinedClassNames = classNames("fullWidthLover", { [styles[`${minWidth}MinWidth`]]: minWidth }, { [styles[`${maxWidth}MaxWidth`]]: maxWidth }, className);
|
|
19
19
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
|
21
|
-
Display.displayName = "Display";
|
package/dist/Footer/Footer.js
CHANGED
|
@@ -15,7 +15,7 @@ import { forwardRef, useState, useEffect } from "react";
|
|
|
15
15
|
import classNames from "classnames";
|
|
16
16
|
import boxingStyles from "../boxing.module.css";
|
|
17
17
|
import styles from "./Footer.module.css";
|
|
18
|
-
export const Footer = forwardRef((_a, ref)
|
|
18
|
+
export const Footer = forwardRef(function Footer(_a, ref) {
|
|
19
19
|
var { align, overflow = "shrink", position = "initial", size, blur, className, children } = _a, restProps = __rest(_a, ["align", "overflow", "position", "size", "blur", "className", "children"]);
|
|
20
20
|
const [show, setShow] = useState(true);
|
|
21
21
|
const [lastScrollY, setLastScrollY] = useState(0);
|
|
@@ -40,4 +40,3 @@ export const Footer = forwardRef((_a, ref) => {
|
|
|
40
40
|
const joinedClassNames = classNames(boxingStyles.flexRowBox, { [boxingStyles[align]]: align }, boxingStyles[overflow], styles.footer, { [styles.sticky]: position === "sticky" || position === "scroll" }, { [styles.hidden]: position === "scroll" && !show }, { [styles[size]]: size }, { [styles.blur]: blur }, className);
|
|
41
41
|
return (_jsx("footer", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
42
42
|
});
|
|
43
|
-
Footer.displayName = "Footer";
|
package/dist/Form/Form.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Form.module.css";
|
|
16
16
|
import boxingStyles from "../boxing.module.css";
|
|
17
|
-
export const Form = forwardRef((_a, ref)
|
|
17
|
+
export const Form = forwardRef(function Form(_a, ref) {
|
|
18
18
|
var { align, className, children } = _a, restProps = __rest(_a, ["align", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, "fullWidthLover", styles.form, className);
|
|
20
20
|
return (_jsx("form", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Form.displayName = "Form";
|
|
@@ -13,10 +13,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./GridContainer.module.css";
|
|
16
|
-
export const GridContainer = forwardRef((_a, ref)
|
|
16
|
+
export const GridContainer = forwardRef(function GridContainer(_a, ref) {
|
|
17
17
|
var { gap = 1.5, columns = 12, className, style, children } = _a, restProps = __rest(_a, ["gap", "columns", "className", "style", "children"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.gridcontainer, styles[`gridColumns${columns}`], className);
|
|
19
19
|
const joinedStyles = Object.assign(Object.assign({}, style), { columnGap: (style === null || style === void 0 ? void 0 : style.columnGap) || `${gap}rem`, rowGap: (style === null || style === void 0 ? void 0 : style.rowGap) || `${gap}rem` });
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, style: joinedStyles, children: children })));
|
|
21
21
|
});
|
|
22
|
-
GridContainer.displayName = "GridContainer";
|
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./GridItem.module.css";
|
|
17
|
-
export const GridItem = forwardRef((_a, ref)
|
|
17
|
+
export const GridItem = forwardRef(function GridItem(_a, ref) {
|
|
18
18
|
var { align, xs, sm, md, lg, xl, className, children } = _a, restProps = __rest(_a, ["align", "xs", "sm", "md", "lg", "xl", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.gridItem, { [styles[`xs${xs}`]]: xs }, { [styles[`sm${sm}`]]: sm }, { [styles[`md${md}`]]: md }, { [styles[`lg${lg}`]]: lg }, { [styles[`xl${xl}`]]: xl }, className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
GridItem.displayName = "GridItem";
|
package/dist/Hr/Hr.js
CHANGED
|
@@ -13,10 +13,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Hr.module.css";
|
|
16
|
-
export const Hr = forwardRef((_a, ref)
|
|
16
|
+
export const Hr = forwardRef(function Hr(_a, ref) {
|
|
17
17
|
var { variant, height, marginx, className, style } = _a, restProps = __rest(_a, ["variant", "height", "marginx", "className", "style"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.hr, variant && styles[variant], className);
|
|
19
19
|
const joinedStyles = Object.assign(Object.assign({}, style), { borderTopWidth: height ? `${height}rem` : style === null || style === void 0 ? void 0 : style.borderTopWidth, marginTop: marginx ? `${marginx}rem` : style === null || style === void 0 ? void 0 : style.marginTop, marginBottom: marginx ? `${marginx}rem` : style === null || style === void 0 ? void 0 : style.marginBottom });
|
|
20
20
|
return (_jsx("hr", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, style: joinedStyles })));
|
|
21
21
|
});
|
|
22
|
-
Hr.displayName = "Hr";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
variant?: "outlined" | "filled";
|
|
4
|
-
|
|
4
|
+
boxSize?: "small" | "normal";
|
|
5
5
|
}
|
|
6
6
|
export declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -13,9 +13,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./InputField.module.css";
|
|
16
|
-
export const InputField = forwardRef((_a, ref)
|
|
17
|
-
var { variant = "outlined",
|
|
18
|
-
const joinedClassNames = classNames(styles.input, styles[variant], styles[
|
|
16
|
+
export const InputField = forwardRef(function InputField(_a, ref) {
|
|
17
|
+
var { variant = "outlined", boxSize = "normal", placeholder, className } = _a, restProps = __rest(_a, ["variant", "boxSize", "placeholder", "className"]);
|
|
18
|
+
const joinedClassNames = classNames(styles.input, styles[variant], styles[boxSize], placeholder && styles.havePlaceHolder, className);
|
|
19
19
|
return (_jsxs("div", { className: classNames("fullWidthLover", styles.div), children: [_jsx("input", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, placeholder: " " })), placeholder && (_jsx("label", { className: styles.label, children: placeholder }))] }));
|
|
20
20
|
});
|
|
21
|
-
InputField.displayName = "InputField";
|
package/dist/List/List.js
CHANGED
|
@@ -13,9 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./List.module.css";
|
|
16
|
-
export const List = forwardRef((_a, ref)
|
|
16
|
+
export const List = forwardRef(function List(_a, ref) {
|
|
17
17
|
var { direction = "row", collapsed, className, children } = _a, restProps = __rest(_a, ["direction", "collapsed", "className", "children"]);
|
|
18
18
|
const joinedClassNames = classNames("fullWidthLover", styles.list, styles[direction], { [styles.collapsed]: collapsed }, className);
|
|
19
19
|
return (_jsx("ul", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
|
21
|
-
List.displayName = "List";
|
|
@@ -14,8 +14,7 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./ListItem.module.css";
|
|
17
|
-
export const ListItem = forwardRef((_a, ref)
|
|
17
|
+
export const ListItem = forwardRef(function ListItem(_a, ref) {
|
|
18
18
|
var { align, className, children } = _a, restProps = __rest(_a, ["align", "className", "children"]);
|
|
19
19
|
return (_jsx("li", Object.assign({ ref: ref }, restProps, { className: classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.listItem, className), children: children })));
|
|
20
20
|
});
|
|
21
|
-
ListItem.displayName = "ListItem";
|
|
@@ -13,9 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./LoadingIcon.module.css";
|
|
16
|
-
export const LoadingIcon = forwardRef((_a, ref)
|
|
16
|
+
export const LoadingIcon = forwardRef(function LoadingIcon(_a, ref) {
|
|
17
17
|
var { size = "medium", variant = "spinner", className } = _a, restProps = __rest(_a, ["size", "variant", "className"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.loadingIcon, styles[size], styles[variant], className);
|
|
19
19
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: _jsx("div", {}) })));
|
|
20
20
|
});
|
|
21
|
-
LoadingIcon.displayName = "LoadingIcon";
|
package/dist/Main/Main.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface MainProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
align?: "start" | "space" | "center" | "end";
|
|
4
|
-
|
|
4
|
+
navOpen?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const Main: import("react").ForwardRefExoticComponent<MainProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/Main/Main.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Main.module.css";
|
|
17
|
-
export const Main = forwardRef((_a, ref)
|
|
18
|
-
var { align,
|
|
19
|
-
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.main, { [styles.navOpen]:
|
|
17
|
+
export const Main = forwardRef(function Main(_a, ref) {
|
|
18
|
+
var { align, navOpen = false, className, children } = _a, restProps = __rest(_a, ["align", "navOpen", "className", "children"]);
|
|
19
|
+
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.main, { [styles.navOpen]: navOpen }, className);
|
|
20
20
|
return (_jsx("main", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Main.displayName = "Main";
|
|
@@ -14,11 +14,10 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Navigation.module.css";
|
|
17
|
-
export const Navigation = forwardRef((_a, ref)
|
|
17
|
+
export const Navigation = forwardRef(function Navigation(_a, ref) {
|
|
18
18
|
var { align, anchor = "auto", open = false, className, children } = _a, restProps = __rest(_a, ["align", "anchor", "open", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.navigation, styles[anchor], {
|
|
20
20
|
[styles.open]: open,
|
|
21
21
|
}, className);
|
|
22
22
|
return (_jsx("nav", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
23
23
|
});
|
|
24
|
-
Navigation.displayName = "Navigation";
|
|
@@ -3,7 +3,7 @@ type ExcludedTypes = "type" | "name" | "defaultValue" | "defaultChecked" | "chec
|
|
|
3
3
|
export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedTypes> {
|
|
4
4
|
value: string | number;
|
|
5
5
|
label?: string;
|
|
6
|
-
|
|
6
|
+
dataFromRadioGroup?: {
|
|
7
7
|
name: string;
|
|
8
8
|
onSelect: () => void;
|
|
9
9
|
checked: boolean;
|
|
@@ -16,18 +16,17 @@ import classNames from "classnames";
|
|
|
16
16
|
import { Symbol } from "@yakad/symbols";
|
|
17
17
|
import { Button } from "..";
|
|
18
18
|
import styles from "./RadioButton.module.css";
|
|
19
|
-
export const RadioButton = forwardRef((_a, ref)
|
|
20
|
-
var {
|
|
19
|
+
export const RadioButton = forwardRef(function RadioButton(_a, ref) {
|
|
20
|
+
var { dataFromRadioGroup, label, onClick, className } = _a, restProps = __rest(_a, ["dataFromRadioGroup", "label", "onClick", "className"]);
|
|
21
21
|
const joinedClassNames = classNames(styles.radiobutton, {
|
|
22
22
|
[styles.labeled]: label,
|
|
23
23
|
className,
|
|
24
24
|
});
|
|
25
25
|
const onClickRadioButtonHandler = () => {
|
|
26
|
-
|
|
26
|
+
dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.onSelect();
|
|
27
27
|
onClick;
|
|
28
28
|
};
|
|
29
|
-
return (_jsxs("div", { className: joinedClassNames, children: [label && (_jsx("label", { className: styles.label, htmlFor:
|
|
29
|
+
return (_jsxs("div", { className: joinedClassNames, children: [label && (_jsx("label", { className: styles.label, htmlFor: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.name, children: label })), _jsx(Button, { icon: _jsx(Symbol, { icon: (dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.checked)
|
|
30
30
|
? "radio_button_checked"
|
|
31
|
-
: "radio_button_unchecked" }), onClick: onClickRadioButtonHandler, disabled: restProps.disabled }), _jsx("input", Object.assign({ ref: ref }, restProps, { className: styles.input, type: "radio", name:
|
|
31
|
+
: "radio_button_unchecked" }), onClick: onClickRadioButtonHandler, disabled: restProps.disabled }), _jsx("input", Object.assign({ ref: ref }, restProps, { className: styles.input, type: "radio", name: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.name, checked: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.checked }))] }));
|
|
32
32
|
});
|
|
33
|
-
RadioButton.displayName = "RadioButton";
|
|
@@ -4,7 +4,7 @@ type RadioButtonElement = React.ReactElement<RadioButtonProps>;
|
|
|
4
4
|
type ExcludedTypes = "defaultValue" | "children";
|
|
5
5
|
export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, ExcludedTypes> {
|
|
6
6
|
name: string;
|
|
7
|
-
|
|
7
|
+
defaultValue?: string;
|
|
8
8
|
children?: RadioButtonElement | RadioButtonElement[];
|
|
9
9
|
}
|
|
10
10
|
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -13,15 +13,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { useState, forwardRef, Children } from "react";
|
|
15
15
|
import { RadioButton } from "..";
|
|
16
|
-
export const RadioGroup = forwardRef((_a, ref)
|
|
17
|
-
var { name,
|
|
18
|
-
const [selectedValue, setSelectedValue] = useState(
|
|
16
|
+
export const RadioGroup = forwardRef(function RadioGroup(_a, ref) {
|
|
17
|
+
var { name, defaultValue, className, children } = _a, restProps = __rest(_a, ["name", "defaultValue", "className", "children"]);
|
|
18
|
+
const [selectedValue, setSelectedValue] = useState(defaultValue || null);
|
|
19
19
|
const arrayChildren = Children.toArray(children);
|
|
20
|
-
const renderChildrens = () => arrayChildren.map((child, index) => (_jsx(RadioButton, Object.assign({}, child.props, {
|
|
20
|
+
const renderChildrens = () => arrayChildren.map((child, index) => (_jsx(RadioButton, Object.assign({}, child.props, { dataFromRadioGroup: {
|
|
21
21
|
name: name,
|
|
22
22
|
onSelect: () => setSelectedValue(child.props.value),
|
|
23
23
|
checked: selectedValue === child.props.value,
|
|
24
24
|
} }), index)));
|
|
25
25
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: className, children: renderChildrens() })));
|
|
26
26
|
});
|
|
27
|
-
RadioGroup.displayName = "RadioGroup";
|
package/dist/Row/Row.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Row.module.css";
|
|
17
|
-
export const Row = forwardRef((_a, ref)
|
|
17
|
+
export const Row = forwardRef(function Row(_a, ref) {
|
|
18
18
|
var { align, overflow = "shrink", size = "xl", className, children } = _a, restProps = __rest(_a, ["align", "overflow", "size", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexRowBox, { [boxingStyles[align]]: align }, boxingStyles[overflow], styles.row, overflow === "shrink" && "fullWidthLover", styles[size], className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Row.displayName = "Row";
|
package/dist/Screen/Screen.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Screen.module.css";
|
|
17
|
-
export const Screen = forwardRef((_a, ref)
|
|
17
|
+
export const Screen = forwardRef(function Screen(_a, ref) {
|
|
18
18
|
var { align, className, children } = _a, restProps = __rest(_a, ["align", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.screen, className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Screen.displayName = "Screen";
|
package/dist/Select/Select.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Select.module.css";
|
|
16
16
|
import inputStyles from "../InputField/InputField.module.css";
|
|
17
|
-
export const Select = forwardRef((_a, ref)
|
|
17
|
+
export const Select = forwardRef(function Select(_a, ref) {
|
|
18
18
|
var { variant = "outlined", boxsize = "normal", placeholder, className, children } = _a, restProps = __rest(_a, ["variant", "boxsize", "placeholder", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(styles.select, inputStyles.input, inputStyles[variant], inputStyles[boxsize], { [inputStyles.havePlaceHolder]: placeholder }, className);
|
|
20
20
|
return (_jsxs("div", { className: classNames("fullWidthLover", inputStyles.div), children: [_jsx("select", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })), placeholder ? (_jsx("label", { className: inputStyles.label, children: placeholder })) : null] }));
|
|
21
21
|
});
|
|
22
|
-
Select.displayName = "Select";
|
package/dist/Spacer/Spacer.js
CHANGED
|
@@ -13,9 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Spacer.module.css";
|
|
16
|
-
export const Spacer = forwardRef((_a, ref)
|
|
16
|
+
export const Spacer = forwardRef(function Spacer(_a, ref) {
|
|
17
17
|
var { className } = _a, restProps = __rest(_a, ["className"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.spacer, className);
|
|
19
19
|
return _jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames }));
|
|
20
20
|
});
|
|
21
|
-
Spacer.displayName = "Spacer";
|
package/dist/Stack/Stack.js
CHANGED
|
@@ -14,9 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import boxingStyles from "../boxing.module.css";
|
|
16
16
|
import styles from "./Stack.module.css";
|
|
17
|
-
export const Stack = forwardRef((_a, ref)
|
|
17
|
+
export const Stack = forwardRef(function Stack(_a, ref) {
|
|
18
18
|
var { align, className, children } = _a, restProps = __rest(_a, ["align", "className", "children"]);
|
|
19
19
|
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, "fullWidthLover", styles.stack, className);
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
21
21
|
});
|
|
22
|
-
Stack.displayName = "Stack";
|
package/dist/SvgIcon/SvgIcon.js
CHANGED
|
@@ -13,10 +13,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./SvgIcon.module.css";
|
|
16
|
-
export const SvgIcon = forwardRef((_a, ref)
|
|
16
|
+
export const SvgIcon = forwardRef(function SvgIcon(_a, ref) {
|
|
17
17
|
var { size, className, style, children } = _a, restProps = __rest(_a, ["size", "className", "style", "children"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.svg, className);
|
|
19
19
|
const sizeStyle = size && { width: `${size}rem`, height: `${size}rem` };
|
|
20
20
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, style: Object.assign(Object.assign({}, style), sizeStyle), children: children })));
|
|
21
21
|
});
|
|
22
|
-
SvgIcon.displayName = "SvgIcon";
|
package/dist/Table/Table.js
CHANGED
|
@@ -13,45 +13,38 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Table.module.css";
|
|
16
|
-
export const Table = forwardRef((_a, ref)
|
|
16
|
+
export const Table = forwardRef(function Table(_a, ref) {
|
|
17
17
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
18
18
|
const joinedClassNames = classNames("fullWidthLover", styles.table, className);
|
|
19
19
|
return (_jsx("table", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
export const Thead = forwardRef((_a, ref) => {
|
|
21
|
+
export const Thead = forwardRef(function Thead(_a, ref) {
|
|
23
22
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
24
23
|
const joinedClassNames = classNames(styles.thead, className);
|
|
25
24
|
return (_jsx("thead", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
export const Tbody = forwardRef((_a, ref) => {
|
|
26
|
+
export const Tbody = forwardRef(function Tbody(_a, ref) {
|
|
29
27
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
30
28
|
const joinedClassNames = classNames(styles.tbody, className);
|
|
31
29
|
return (_jsx("tbody", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
32
30
|
});
|
|
33
|
-
|
|
34
|
-
export const Tfoot = forwardRef((_a, ref) => {
|
|
31
|
+
export const Tfoot = forwardRef(function Tfoot(_a, ref) {
|
|
35
32
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
36
33
|
const joinedClassNames = classNames(styles.tfoot, className);
|
|
37
34
|
return (_jsx("tfoot", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
38
35
|
});
|
|
39
|
-
|
|
40
|
-
export const Tr = forwardRef((_a, ref) => {
|
|
36
|
+
export const Tr = forwardRef(function Tr(_a, ref) {
|
|
41
37
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
42
38
|
const joinedClassNames = classNames(styles.tr, className);
|
|
43
39
|
return (_jsx("tr", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
44
40
|
});
|
|
45
|
-
|
|
46
|
-
export const Th = forwardRef((_a, ref) => {
|
|
41
|
+
export const Th = forwardRef(function Th(_a, ref) {
|
|
47
42
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
48
43
|
const joinedClassNames = classNames(styles.th, className);
|
|
49
44
|
return (_jsx("th", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
50
45
|
});
|
|
51
|
-
|
|
52
|
-
export const Td = forwardRef((_a, ref) => {
|
|
46
|
+
export const Td = forwardRef(function Td(_a, ref) {
|
|
53
47
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
54
48
|
const joinedClassNames = classNames(styles.td, className);
|
|
55
49
|
return (_jsx("td", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
56
50
|
});
|
|
57
|
-
Td.displayName = "Td";
|
package/dist/Text/Text.js
CHANGED
|
@@ -13,57 +13,48 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import styles from "./Text.module.css";
|
|
16
|
-
export const H1 = forwardRef((_a, ref)
|
|
16
|
+
export const H1 = forwardRef(function H1(_a, ref) {
|
|
17
17
|
var { variant = "heading1", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
19
19
|
return (_jsx("h1", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
export const H2 = forwardRef((_a, ref) => {
|
|
21
|
+
export const H2 = forwardRef(function H2(_a, ref) {
|
|
23
22
|
var { variant = "heading2", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
24
23
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
25
24
|
return (_jsx("h2", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
export const H3 = forwardRef((_a, ref) => {
|
|
26
|
+
export const H3 = forwardRef(function H3(_a, ref) {
|
|
29
27
|
var { variant = "heading3", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
30
28
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
31
29
|
return (_jsx("h3", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
32
30
|
});
|
|
33
|
-
|
|
34
|
-
export const H4 = forwardRef((_a, ref) => {
|
|
31
|
+
export const H4 = forwardRef(function H4(_a, ref) {
|
|
35
32
|
var { variant = "heading4", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
36
33
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
37
34
|
return (_jsx("h4", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
38
35
|
});
|
|
39
|
-
|
|
40
|
-
export const H5 = forwardRef((_a, ref) => {
|
|
36
|
+
export const H5 = forwardRef(function H5(_a, ref) {
|
|
41
37
|
var { variant = "heading5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
42
38
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
43
39
|
return (_jsx("h5", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
44
40
|
});
|
|
45
|
-
|
|
46
|
-
export const H6 = forwardRef((_a, ref) => {
|
|
41
|
+
export const H6 = forwardRef(function H6(_a, ref) {
|
|
47
42
|
var { variant = "heading6", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
48
43
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
49
44
|
return (_jsx("h6", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
50
45
|
});
|
|
51
|
-
|
|
52
|
-
export const P = forwardRef((_a, ref) => {
|
|
46
|
+
export const P = forwardRef(function P(_a, ref) {
|
|
53
47
|
var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
54
48
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
55
49
|
return (_jsx("p", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
56
50
|
});
|
|
57
|
-
|
|
58
|
-
export const Span = forwardRef((_a, ref) => {
|
|
51
|
+
export const Span = forwardRef(function Span(_a, ref) {
|
|
59
52
|
var { variant = "span", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
60
53
|
const joinedClassNames = classNames(styles.text, styles[variant], className);
|
|
61
54
|
return (_jsx("span", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
62
55
|
});
|
|
63
|
-
|
|
64
|
-
export const Text = forwardRef((_a, ref) => {
|
|
56
|
+
export const Text = forwardRef(function Text(_a, ref) {
|
|
65
57
|
var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
|
|
66
58
|
const joinedClassNames = classNames(styles[variant], className);
|
|
67
59
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
68
60
|
});
|
|
69
|
-
Text.displayName = "Text";
|
package/dist/Theme/Theme.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type DarkStyle = "light" | "dark" | "system";
|
|
|
4
4
|
export type ThemeColor = "green" | "red" | "yellow" | "blue" | "purple";
|
|
5
5
|
export interface ThemeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
align?: "start" | "space" | "center" | "end";
|
|
7
|
-
|
|
7
|
+
darkStyle?: DarkStyle;
|
|
8
8
|
color?: ThemeColor;
|
|
9
9
|
zoom?: number;
|
|
10
10
|
children?: React.ReactNode;
|
package/dist/Theme/Theme.js
CHANGED
|
@@ -16,13 +16,12 @@ import classNames from "classnames";
|
|
|
16
16
|
import "./globals.css";
|
|
17
17
|
import styles from "./Theme.module.css";
|
|
18
18
|
import boxingStyles from "../boxing.module.css";
|
|
19
|
-
export const Theme = forwardRef((_a, ref)
|
|
20
|
-
var { align,
|
|
19
|
+
export const Theme = forwardRef(function Theme(_a, ref) {
|
|
20
|
+
var { align, darkStyle = "system", color = "blue", zoom = 100, className, children } = _a, restProps = __rest(_a, ["align", "darkStyle", "color", "zoom", "className", "children"]);
|
|
21
21
|
const zoomPercentage = zoom ? (zoom / 100) * 62.5 : 62.5;
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
document.documentElement.style.setProperty("font-size", zoomPercentage + "%");
|
|
24
24
|
}, [zoomPercentage]);
|
|
25
|
-
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.theme, styles[
|
|
25
|
+
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.theme, styles[darkStyle], styles[color], className);
|
|
26
26
|
return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
27
27
|
});
|
|
28
|
-
Theme.displayName = "Theme";
|
|
@@ -8,7 +8,4 @@ export interface WithDropdawnProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
8
8
|
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
12
|
-
({ align, blur, trigger, dropdawnChildren, className, style, children, ...restProps }: WithDropdawnProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
11
|
+
export declare function WithDropdawn({ align, blur, trigger, dropdawnChildren, className, style, children, ...restProps }: WithDropdawnProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ import classNames from "classnames";
|
|
|
16
16
|
import { WithInteractions } from "../";
|
|
17
17
|
import boxingStyles from "../boxing.module.css";
|
|
18
18
|
import styles from "./WithDropdawn.module.css";
|
|
19
|
-
export
|
|
19
|
+
export function WithDropdawn(_a) {
|
|
20
20
|
var { align, blur, trigger = "onClick", dropdawnChildren, className, style, children } = _a, restProps = __rest(_a, ["align", "blur", "trigger", "dropdawnChildren", "className", "style", "children"]);
|
|
21
21
|
const toggleElementRef = useRef(null);
|
|
22
22
|
const dropdawnRef = useRef(null);
|
|
@@ -74,5 +74,4 @@ export const WithDropdawn = (_a) => {
|
|
|
74
74
|
left: arrowX,
|
|
75
75
|
visibility: showDropdawn ? "visible" : "hidden",
|
|
76
76
|
} }), _jsx(WithInteractions, { onOutsideClick: () => setShowDropdawn(false), children: _jsx("div", Object.assign({ ref: dropdawnRef }, restProps, { className: joinedClassNames, style: Object.assign({ top: top, left: dropdawnX, visibility: showDropdawn ? "visible" : "hidden" }, style), children: dropdawnChildren })) })] }));
|
|
77
|
-
}
|
|
78
|
-
WithDropdawn.displayName = "WithDropdawn";
|
|
77
|
+
}
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import { mergeRefs } from "@yakad/lib";
|
|
14
14
|
import { cloneElement, forwardRef, isValidElement, useEffect, useImperativeHandle, useRef, } from "react";
|
|
15
|
-
export const WithInteractions = forwardRef((_a, forwardedRef)
|
|
15
|
+
export const WithInteractions = forwardRef(function WithInteractions(_a, forwardedRef) {
|
|
16
16
|
var _b;
|
|
17
17
|
var { children, onRightClick, onTap, onDoubleTap, onOutsideClick, onSwipeLeft, onSwipeRight, onSwipeUp, onSwipeDown, onPinchIn, onPinchOut, onRotate, onScrollStart, onScrollStop, onResize, onVisibile, onHidden, onMouseHoverStart, onMouseHoverLeave } = _a, restProps = __rest(_a, ["children", "onRightClick", "onTap", "onDoubleTap", "onOutsideClick", "onSwipeLeft", "onSwipeRight", "onSwipeUp", "onSwipeDown", "onPinchIn", "onPinchOut", "onRotate", "onScrollStart", "onScrollStop", "onResize", "onVisibile", "onHidden", "onMouseHoverStart", "onMouseHoverLeave"]);
|
|
18
18
|
const localRef = useRef(null);
|
|
@@ -216,4 +216,3 @@ export const WithInteractions = forwardRef((_a, forwardedRef) => {
|
|
|
216
216
|
return null;
|
|
217
217
|
return cloneElement(children, Object.assign(Object.assign({}, restProps), { ref: mergeRefs(localRef, forwardedRef, (_b = children.props) === null || _b === void 0 ? void 0 : _b.ref) }));
|
|
218
218
|
});
|
|
219
|
-
WithInteractions.displayName = "WithInteractions";
|