@yakad/ui 1.3.150 → 1.3.152
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/Card/Card.d.ts +0 -1
- package/dist/Card/Card.js +1 -7
- package/dist/Card/Card.module.css +20 -0
- package/dist/CheckBox/CheckBox.js +1 -1
- package/dist/CodeBox/CodeBox.js +1 -1
- package/dist/CodeField/CodeField.js +1 -1
- package/dist/InputField/InputField.js +1 -1
- package/dist/List/List.js +1 -1
- package/dist/Select/Select.js +1 -1
- package/dist/Table/Table.js +1 -1
- package/dist/WithOverlay/WithOverlay.js +3 -2
- package/package.json +1 -1
- package/dist/Card/card.css +0 -18
package/dist/Card/Card.d.ts
CHANGED
package/dist/Card/Card.js
CHANGED
|
@@ -14,14 +14,8 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import { Stack } from "..";
|
|
16
16
|
import styles from "./Card.module.css";
|
|
17
|
-
import "./card.css";
|
|
18
17
|
export const Card = forwardRef(function Card(_a, ref) {
|
|
19
18
|
var { blur, level, hoverEffect, className, children } = _a, restProps = __rest(_a, ["blur", "level", "hoverEffect", "className", "children"]);
|
|
20
|
-
const joinedClassNames = classNames(styles.card, { [styles.blur]: blur }, { [styles.elevated]: level !== "transparent" }, {
|
|
21
|
-
yakadCardAutoLevel: !level || level === "transparent",
|
|
22
|
-
yakadCardLowLevel: level === "low",
|
|
23
|
-
yakadCardMidLevel: level === "mid",
|
|
24
|
-
yakadCardHighLevel: level === "high",
|
|
25
|
-
}, { [styles.hoverEffect]: hoverEffect }, className);
|
|
19
|
+
const joinedClassNames = classNames(styles.card, { [styles.blur]: blur }, { [styles.elevated]: level !== "transparent" }, { [styles.hoverEffect]: hoverEffect }, { [styles.yakadCardAutoLevel]: !level || level === "transparent" }, { [styles.yakadCardLowLevel]: level === "low" }, { [styles.yakadCardMidLevel]: level === "mid" }, { [styles.yakadCardHighLevel]: level === "high" }, className);
|
|
26
20
|
return (_jsx(Stack, Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
27
21
|
});
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/* BackgroundColor Levels */
|
|
2
|
+
.yakadCardAutoLevel,
|
|
3
|
+
.yakadCardLowLevel {
|
|
4
|
+
--yakadCardBackgroundColor: var(--surfaceContainerColor);
|
|
5
|
+
}
|
|
6
|
+
.yakadCardAutoLevel .yakadCardAutoLevel,
|
|
7
|
+
.yakadCardLowLevel .yakadCardAutoLevel,
|
|
8
|
+
.yakadCardMidLevel {
|
|
9
|
+
--yakadCardBackgroundColor: var(--surfaceContainerHighColor);
|
|
10
|
+
--yakadCardBackgroundColor: var(--surfaceContainerHighColor);
|
|
11
|
+
}
|
|
12
|
+
.yakadCardAutoLevel .yakadCardAutoLevel .yakadCardAutoLevel,
|
|
13
|
+
.yakadCardLowLevel .yakadCardAutoLevel .yakadCardAutoLevel,
|
|
14
|
+
.yakadCardMidLevel .yakadCardAutoLevel,
|
|
15
|
+
.yakadCardHighLevel,
|
|
16
|
+
.yakadCardHighLevel .yakadCardAutoLevel {
|
|
17
|
+
--yakadCardBackgroundColor: var(--surfaceContainerHighestColor);
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
.card {
|
|
2
21
|
padding: 2rem;
|
|
3
22
|
border-radius: 2rem;
|
|
@@ -16,6 +35,7 @@
|
|
|
16
35
|
box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),
|
|
17
36
|
0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
|
|
18
37
|
background-color: rgb(var(--surfaceContainerHighestColor, 230 224 233));
|
|
38
|
+
cursor: pointer;
|
|
19
39
|
}
|
|
20
40
|
|
|
21
41
|
.card.blur {
|
|
@@ -16,6 +16,6 @@ import { Symbol } from "@yakad/symbols";
|
|
|
16
16
|
import styles from "./CheckBox.module.css";
|
|
17
17
|
export const CheckBox = forwardRef(function CheckBox(_a, ref) {
|
|
18
18
|
var { label, className, style } = _a, restProps = __rest(_a, ["label", "className", "style"]);
|
|
19
|
-
const joinedClassNames = classNames({
|
|
19
|
+
const joinedClassNames = classNames({ fullWidthOnParentDemand: label }, 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
|
});
|
package/dist/CodeBox/CodeBox.js
CHANGED
|
@@ -17,6 +17,6 @@ import { Button, Card } from "..";
|
|
|
17
17
|
import styles from "./CodeBox.module.css";
|
|
18
18
|
export const CodeBox = forwardRef(function CodeBox(_a, ref) {
|
|
19
19
|
var { copyButton, className, children } = _a, restProps = __rest(_a, ["copyButton", "className", "children"]);
|
|
20
|
-
const joinedClassNames = classNames({
|
|
20
|
+
const joinedClassNames = classNames({ fullWidthOnParentDemand: true }, styles.ZZZZZZZZZZ, className);
|
|
21
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
|
});
|
|
@@ -32,7 +32,7 @@ function removeUnNumberChars(inputElement) {
|
|
|
32
32
|
}
|
|
33
33
|
export const CodeField = forwardRef(function CodeField(_a, ref) {
|
|
34
34
|
var { length = 6, onFilled, autoComplete, pattern, onInput, className, style } = _a, restProps = __rest(_a, ["length", "onFilled", "autoComplete", "pattern", "onInput", "className", "style"]);
|
|
35
|
-
const joinedClassNames = classNames({
|
|
35
|
+
const joinedClassNames = classNames({ fullWidthOnParentDemand: true }, 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
38
|
isInputFilled(event, length) && onFilled;
|
|
@@ -16,5 +16,5 @@ import styles from "./InputField.module.css";
|
|
|
16
16
|
export const InputField = forwardRef(function InputField(_a, ref) {
|
|
17
17
|
var { variant = "outlined", boxSize = "normal", placeholder, className } = _a, restProps = __rest(_a, ["variant", "boxSize", "placeholder", "className"]);
|
|
18
18
|
const joinedClassNames = classNames(styles.input, styles[variant], styles[boxSize], placeholder && styles.havePlaceHolder, className);
|
|
19
|
-
return (_jsxs("div", { className: classNames({
|
|
19
|
+
return (_jsxs("div", { className: classNames({ fullWidthOnParentDemand: true }, styles.div), children: [_jsx("input", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, placeholder: " " })), placeholder && (_jsx("label", { className: styles.label, children: placeholder }))] }));
|
|
20
20
|
});
|
package/dist/List/List.js
CHANGED
|
@@ -15,6 +15,6 @@ import classNames from "classnames";
|
|
|
15
15
|
import styles from "./List.module.css";
|
|
16
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
|
-
const joinedClassNames = classNames({
|
|
18
|
+
const joinedClassNames = classNames({ fullWidthOnParentDemand: true }, styles.list, styles[direction], { [styles.collapsed]: collapsed }, className);
|
|
19
19
|
return (_jsx("ul", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
package/dist/Select/Select.js
CHANGED
|
@@ -17,5 +17,5 @@ import inputStyles from "../InputField/InputField.module.css";
|
|
|
17
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
|
-
return (_jsxs("div", { className: classNames({
|
|
20
|
+
return (_jsxs("div", { className: classNames({ fullWidthOnParentDemand: true }, 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
|
});
|
package/dist/Table/Table.js
CHANGED
|
@@ -15,7 +15,7 @@ import classNames from "classnames";
|
|
|
15
15
|
import styles from "./Table.module.css";
|
|
16
16
|
export const Table = forwardRef(function Table(_a, ref) {
|
|
17
17
|
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
18
|
-
const joinedClassNames = classNames({
|
|
18
|
+
const joinedClassNames = classNames({ fullWidthOnParentDemand: true }, styles.table, className);
|
|
19
19
|
return (_jsx("table", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
|
|
20
20
|
});
|
|
21
21
|
export const Thead = forwardRef(function Thead(_a, ref) {
|
|
@@ -29,7 +29,9 @@ export const WithOverlay = forwardRef(function WithOverlay(_a, forwardedRef) {
|
|
|
29
29
|
};
|
|
30
30
|
}, [showOverlay]);
|
|
31
31
|
// Teleport Overlay to portalRoot or body
|
|
32
|
+
const portalRoot = document.getElementsByClassName("portalRoot")[0] || document.body;
|
|
32
33
|
const teleport = overlay &&
|
|
34
|
+
portalRoot &&
|
|
33
35
|
createPortal(cloneElement(overlay, {
|
|
34
36
|
triggerref: triggerRef,
|
|
35
37
|
onClose: () => {
|
|
@@ -37,8 +39,7 @@ export const WithOverlay = forwardRef(function WithOverlay(_a, forwardedRef) {
|
|
|
37
39
|
(_b = (_a = overlay.props).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
38
40
|
setShowOverlay(false);
|
|
39
41
|
},
|
|
40
|
-
}),
|
|
41
|
-
document.body);
|
|
42
|
+
}), portalRoot);
|
|
42
43
|
return (_jsxs(_Fragment, { children: [_jsx(WithInteractions, Object.assign({ ref: triggerRef }, restProps, { onRightClick: (e) => {
|
|
43
44
|
trigger === "onRightClick" && setShowOverlay(true);
|
|
44
45
|
onRightClick === null || onRightClick === void 0 ? void 0 : onRightClick(e);
|
package/package.json
CHANGED
package/dist/Card/card.css
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.yakadCardAutoLevel,
|
|
2
|
-
.yakadCardLowLevel {
|
|
3
|
-
--yakadCardBackgroundColor: var(--surfaceContainerLowColor);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.yakadCardAutoLevel .yakadCardAutoLevel,
|
|
7
|
-
.yakadCardLowLevel .yakadCardAutoLevel,
|
|
8
|
-
.yakadCardMidLevel {
|
|
9
|
-
--yakadCardBackgroundColor: var(--surfaceContainerColor);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.yakadCardAutoLevel .yakadCardAutoLevel .yakadCardAutoLevel,
|
|
13
|
-
.yakadCardLowLevel .yakadCardAutoLevel .yakadCardAutoLevel,
|
|
14
|
-
.yakadCardMidLevel .yakadCardAutoLevel,
|
|
15
|
-
.yakadCardHighLevel,
|
|
16
|
-
.yakadCardHighLevel .yakadCardAutoLevel {
|
|
17
|
-
--yakadCardBackgroundColor: var(--surfaceContainerHighColor);
|
|
18
|
-
}
|