azeriand-library 1.18.0 → 1.19.0
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/index.esm.js +20 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +19 -21
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -15,7 +15,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
15
15
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16
16
|
import { jsx as jsx$1, jsxs, Fragment } from "react/jsx-runtime";
|
|
17
17
|
import * as React from "react";
|
|
18
|
-
import React__default, { forwardRef, useContext, isValidElement, cloneElement, Children, createContext, useState
|
|
18
|
+
import React__default, { forwardRef, useContext, isValidElement, cloneElement, Children, createContext, useState } from "react";
|
|
19
19
|
import ReactDOM from "react-dom";
|
|
20
20
|
function Avatar({ src, className = "", style: style2 }) {
|
|
21
21
|
return /* @__PURE__ */ jsx$1(
|
|
@@ -15788,8 +15788,6 @@ function Card({
|
|
|
15788
15788
|
...rest
|
|
15789
15789
|
}) {
|
|
15790
15790
|
const Component = as || "article";
|
|
15791
|
-
let [classNames, setClassNames] = useState("");
|
|
15792
|
-
let [cardStyle, setCardStyle] = useState({});
|
|
15793
15791
|
const { theme, cardDefaults } = useContext(ThemeContext);
|
|
15794
15792
|
const mergedProps = {
|
|
15795
15793
|
appearance: appearance || cardDefaults.appearance,
|
|
@@ -15797,26 +15795,26 @@ function Card({
|
|
|
15797
15795
|
intensity: intensity || cardDefaults.intensity,
|
|
15798
15796
|
dark: dark2 !== void 0 ? dark2 : cardDefaults.theme
|
|
15799
15797
|
};
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
})
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15798
|
+
let intensityValue = mergedProps.intensity;
|
|
15799
|
+
if (intensityValue === void 0) {
|
|
15800
|
+
intensityValue = theme === "dark" ? 600 : 300;
|
|
15801
|
+
}
|
|
15802
|
+
const cardStyle = {
|
|
15803
|
+
...style2 || {}
|
|
15804
|
+
};
|
|
15805
|
+
cardStyle["--glass-color"] = `var(--color-${mergedProps.color}-${intensityValue})`;
|
|
15806
|
+
cardStyle["--card-text-color"] = `var(--color-${mergedProps.color}-${mergedProps.dark ? "100" : "800"})`;
|
|
15807
|
+
if (mergedProps.appearance === "glass" && !noBlur) {
|
|
15808
|
+
cardStyle.backdropFilter = `blur(${blur}px)`;
|
|
15809
|
+
}
|
|
15810
|
+
let rounded = "rounded-md";
|
|
15811
|
+
if (className) {
|
|
15812
|
+
const roundedMatch = className.match(/rounded\-[a-z0-9]+/g);
|
|
15813
|
+
if (roundedMatch) {
|
|
15814
|
+
rounded = roundedMatch[roundedMatch.length - 1];
|
|
15817
15815
|
}
|
|
15818
|
-
|
|
15819
|
-
|
|
15816
|
+
}
|
|
15817
|
+
const classNames = `card ${rounded} ${mergedProps.appearance} ${className || ""} ${noPadding ? "" : "p-[2rem]"}`.trim();
|
|
15820
15818
|
return /* @__PURE__ */ jsx$1(Component, { className: classNames, style: cardStyle, onClick, ...rest, children });
|
|
15821
15819
|
}
|
|
15822
15820
|
function Button({ children, label, icon, position: position2 = "left", onClick, size, className, ...cardProps }) {
|