@eqtylab/equality 1.0.0 → 1.0.2
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.cjs +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +30 -6
- package/dist/index.js.map +1 -1
- package/dist/toast-components.module.module.css.module.css +12 -16
- package/dist/toast.module.module.css.module.css +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2549,7 +2549,7 @@ var SearchBar = ({
|
|
|
2549
2549
|
const handleClear = () => {
|
|
2550
2550
|
setSearchQuery("");
|
|
2551
2551
|
};
|
|
2552
|
-
return /* @__PURE__ */ jsxRuntime.jsx("
|
|
2552
|
+
return /* @__PURE__ */ jsxRuntime.jsx("search", { className: cn(styles42__default.default["search-bar"], className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2553
2553
|
Input,
|
|
2554
2554
|
{
|
|
2555
2555
|
placeholder,
|
|
@@ -2821,11 +2821,19 @@ var TabsTrigger = React15__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
2821
2821
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2822
2822
|
var TabsContent = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { ref, className: cn(styles52__default.default["tabs-content"], className), ...props }));
|
|
2823
2823
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
2824
|
-
var Tabs = ({
|
|
2825
|
-
|
|
2824
|
+
var Tabs = ({
|
|
2825
|
+
id,
|
|
2826
|
+
items,
|
|
2827
|
+
className,
|
|
2828
|
+
tabsListBackground = "transparent",
|
|
2829
|
+
defaultValue,
|
|
2830
|
+
onValueChange
|
|
2831
|
+
}) => {
|
|
2832
|
+
const [activeTab, setActiveTab] = React15.useState(defaultValue ?? items[0].value);
|
|
2826
2833
|
const isFilled = tabsListBackground === "filled";
|
|
2827
2834
|
const handleValueChange = (newTab) => {
|
|
2828
2835
|
setActiveTab(newTab);
|
|
2836
|
+
onValueChange?.(newTab);
|
|
2829
2837
|
};
|
|
2830
2838
|
const renderIcon = (icon) => {
|
|
2831
2839
|
if (icon) {
|
|
@@ -3061,10 +3069,26 @@ function useToast() {
|
|
|
3061
3069
|
};
|
|
3062
3070
|
}
|
|
3063
3071
|
var Toast = ({ toast: toast2 }) => {
|
|
3064
|
-
const { id, title, description, action, ...props } = toast2;
|
|
3065
|
-
|
|
3072
|
+
const { id, title, description, action, icon, variant, ...props } = toast2;
|
|
3073
|
+
const getDefaultIcon = () => {
|
|
3074
|
+
switch (variant) {
|
|
3075
|
+
case "success":
|
|
3076
|
+
return "Check";
|
|
3077
|
+
case "warning":
|
|
3078
|
+
return "AlertOctagon";
|
|
3079
|
+
case "danger":
|
|
3080
|
+
return "AlertTriangle";
|
|
3081
|
+
default:
|
|
3082
|
+
return "Info";
|
|
3083
|
+
}
|
|
3084
|
+
};
|
|
3085
|
+
const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
|
|
3086
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContainer, { ...props, variant, children: [
|
|
3066
3087
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles56__default.default["toast-copy"], children: [
|
|
3067
|
-
title && /* @__PURE__ */ jsxRuntime.
|
|
3088
|
+
title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles56__default.default["toast-title-container"], children: [
|
|
3089
|
+
displayIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
|
|
3090
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title })
|
|
3091
|
+
] }),
|
|
3068
3092
|
description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description })
|
|
3069
3093
|
] }),
|
|
3070
3094
|
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles56__default.default["toast-action"], children: action }),
|