@yakad/ui 1.3.147 → 1.3.149
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
CHANGED
|
@@ -4,6 +4,6 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
align?: "start" | "space" | "center" | "end";
|
|
5
5
|
fullWidthOnParentDemand?: boolean;
|
|
6
6
|
blur?: boolean;
|
|
7
|
-
level?: "low" | "mid" | "high";
|
|
7
|
+
level?: "transparent" | "low" | "mid" | "high";
|
|
8
8
|
}
|
|
9
9
|
export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/Card/Card.js
CHANGED
|
@@ -17,8 +17,8 @@ import styles from "./Card.module.css";
|
|
|
17
17
|
import "./card.css";
|
|
18
18
|
export const Card = forwardRef(function Card(_a, ref) {
|
|
19
19
|
var { align, fullWidthOnParentDemand = true, blur, level, className, children } = _a, restProps = __rest(_a, ["align", "fullWidthOnParentDemand", "blur", "level", "className", "children"]);
|
|
20
|
-
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, { demandChildsToBeFullWidth: true }, { fullWidthOnParentDemand: fullWidthOnParentDemand }, styles.card, { [styles.blur]: blur }, {
|
|
21
|
-
yakadCardAutoLevel: level ===
|
|
20
|
+
const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, { demandChildsToBeFullWidth: true }, { fullWidthOnParentDemand: fullWidthOnParentDemand }, styles.card, { [styles.blur]: blur }, { [styles.elevated]: level !== "transparent" }, {
|
|
21
|
+
yakadCardAutoLevel: !level || level === "transparent",
|
|
22
22
|
yakadCardLowLevel: level === "low",
|
|
23
23
|
yakadCardMidLevel: level === "mid",
|
|
24
24
|
yakadCardHighLevel: level === "high",
|
|
@@ -16,7 +16,8 @@ import classNames from "classnames";
|
|
|
16
16
|
import { Card, WithInteractions } from "..";
|
|
17
17
|
import styles from "./Dropdown.module.css";
|
|
18
18
|
export const Dropdown = forwardRef(function Dropdown(_a, forwardedRef) {
|
|
19
|
-
var {
|
|
19
|
+
var { fullWidthOnParentDemand = false, // Def in Card is True
|
|
20
|
+
blur, level = "high", triggerref, onClose, className, style, children } = _a, restProps = __rest(_a, ["fullWidthOnParentDemand", "blur", "level", "triggerref", "onClose", "className", "style", "children"]);
|
|
20
21
|
const fallbackTriggerRef = useRef(null);
|
|
21
22
|
const dropdownRef = useRef(null);
|
|
22
23
|
const placementTargetRef = triggerref || fallbackTriggerRef;
|
|
@@ -71,7 +72,7 @@ export const Dropdown = forwardRef(function Dropdown(_a, forwardedRef) {
|
|
|
71
72
|
setIsPlaced(true);
|
|
72
73
|
}
|
|
73
74
|
}, [children, placementTargetRef]);
|
|
74
|
-
return (_jsxs(_Fragment, { children: [!triggerref && _jsx("div", { ref: fallbackTriggerRef }), _jsx(WithInteractions, { onOutsideClick: onClose, children: _jsx(Card, Object.assign({ ref: dropdownRef, level: level }, restProps, { className: classNames(styles.dropdownCard, { [styles.isPlacedAbove]: isPlacedAbove }, className), style: Object.assign({ top: dropdownPosition.top, left: dropdownPosition.left, visibility: isPlaced ? "visible" : "hidden" }, style), children: children })) }), _jsx("span", { className: classNames(styles.arrow, {
|
|
75
|
+
return (_jsxs(_Fragment, { children: [!triggerref && _jsx("div", { ref: fallbackTriggerRef }), _jsx(WithInteractions, { onOutsideClick: onClose, children: _jsx(Card, Object.assign({ ref: dropdownRef, fullWidthOnParentDemand: fullWidthOnParentDemand, blur: blur, level: level }, restProps, { className: classNames(styles.dropdownCard, { [styles.isPlacedAbove]: isPlacedAbove }, className), style: Object.assign({ top: dropdownPosition.top, left: dropdownPosition.left, visibility: isPlaced ? "visible" : "hidden" }, style), children: children })) }), _jsx("span", { className: classNames(styles.arrow, {
|
|
75
76
|
[styles.isPlacedAbove]: isPlacedAbove,
|
|
76
77
|
}, { [styles.blur]: blur }), style: {
|
|
77
78
|
top: arrowPosition.top,
|