@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.d.cts
CHANGED
|
@@ -151,7 +151,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
151
151
|
}) => react_jsx_runtime.JSX.Element;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "
|
|
154
|
+
variant?: "link" | "danger" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
155
155
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
156
156
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
157
157
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -698,8 +698,10 @@ interface TabsProps {
|
|
|
698
698
|
}[];
|
|
699
699
|
className?: string;
|
|
700
700
|
tabsListBackground?: 'transparent' | 'filled';
|
|
701
|
+
defaultValue?: string;
|
|
702
|
+
onValueChange?: (value: string) => void;
|
|
701
703
|
}
|
|
702
|
-
declare const Tabs: ({ id, items, className, tabsListBackground }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
704
|
+
declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, onValueChange, }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
703
705
|
|
|
704
706
|
declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
705
707
|
|
|
@@ -720,6 +722,7 @@ type ToasterToast = ToastProps$1 & {
|
|
|
720
722
|
title?: React.ReactNode;
|
|
721
723
|
description?: React.ReactNode;
|
|
722
724
|
action?: ToastActionElement;
|
|
725
|
+
icon?: string | React.ReactElement;
|
|
723
726
|
};
|
|
724
727
|
declare const actionTypes: {
|
|
725
728
|
readonly ADD_TOAST: "ADD_TOAST";
|
package/dist/index.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
151
151
|
}) => react_jsx_runtime.JSX.Element;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "
|
|
154
|
+
variant?: "link" | "danger" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
155
155
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
156
156
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
157
157
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -698,8 +698,10 @@ interface TabsProps {
|
|
|
698
698
|
}[];
|
|
699
699
|
className?: string;
|
|
700
700
|
tabsListBackground?: 'transparent' | 'filled';
|
|
701
|
+
defaultValue?: string;
|
|
702
|
+
onValueChange?: (value: string) => void;
|
|
701
703
|
}
|
|
702
|
-
declare const Tabs: ({ id, items, className, tabsListBackground }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
704
|
+
declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, onValueChange, }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
703
705
|
|
|
704
706
|
declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
705
707
|
|
|
@@ -720,6 +722,7 @@ type ToasterToast = ToastProps$1 & {
|
|
|
720
722
|
title?: React.ReactNode;
|
|
721
723
|
description?: React.ReactNode;
|
|
722
724
|
action?: ToastActionElement;
|
|
725
|
+
icon?: string | React.ReactElement;
|
|
723
726
|
};
|
|
724
727
|
declare const actionTypes: {
|
|
725
728
|
readonly ADD_TOAST: "ADD_TOAST";
|
package/dist/index.js
CHANGED
|
@@ -2447,7 +2447,7 @@ var SearchBar = ({
|
|
|
2447
2447
|
const handleClear = () => {
|
|
2448
2448
|
setSearchQuery("");
|
|
2449
2449
|
};
|
|
2450
|
-
return /* @__PURE__ */ jsx("
|
|
2450
|
+
return /* @__PURE__ */ jsx("search", { className: cn(styles42["search-bar"], className), children: /* @__PURE__ */ jsx(
|
|
2451
2451
|
Input,
|
|
2452
2452
|
{
|
|
2453
2453
|
placeholder,
|
|
@@ -2719,11 +2719,19 @@ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2719
2719
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2720
2720
|
var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles52["tabs-content"], className), ...props }));
|
|
2721
2721
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2722
|
-
var Tabs = ({
|
|
2723
|
-
|
|
2722
|
+
var Tabs = ({
|
|
2723
|
+
id,
|
|
2724
|
+
items,
|
|
2725
|
+
className,
|
|
2726
|
+
tabsListBackground = "transparent",
|
|
2727
|
+
defaultValue,
|
|
2728
|
+
onValueChange
|
|
2729
|
+
}) => {
|
|
2730
|
+
const [activeTab, setActiveTab] = useState(defaultValue ?? items[0].value);
|
|
2724
2731
|
const isFilled = tabsListBackground === "filled";
|
|
2725
2732
|
const handleValueChange = (newTab) => {
|
|
2726
2733
|
setActiveTab(newTab);
|
|
2734
|
+
onValueChange?.(newTab);
|
|
2727
2735
|
};
|
|
2728
2736
|
const renderIcon = (icon) => {
|
|
2729
2737
|
if (icon) {
|
|
@@ -2959,10 +2967,26 @@ function useToast() {
|
|
|
2959
2967
|
};
|
|
2960
2968
|
}
|
|
2961
2969
|
var Toast = ({ toast: toast2 }) => {
|
|
2962
|
-
const { id, title, description, action, ...props } = toast2;
|
|
2963
|
-
|
|
2970
|
+
const { id, title, description, action, icon, variant, ...props } = toast2;
|
|
2971
|
+
const getDefaultIcon = () => {
|
|
2972
|
+
switch (variant) {
|
|
2973
|
+
case "success":
|
|
2974
|
+
return "Check";
|
|
2975
|
+
case "warning":
|
|
2976
|
+
return "AlertOctagon";
|
|
2977
|
+
case "danger":
|
|
2978
|
+
return "AlertTriangle";
|
|
2979
|
+
default:
|
|
2980
|
+
return "Info";
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
|
|
2984
|
+
return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
|
|
2964
2985
|
/* @__PURE__ */ jsxs("div", { className: styles56["toast-copy"], children: [
|
|
2965
|
-
title && /* @__PURE__ */
|
|
2986
|
+
title && /* @__PURE__ */ jsxs("div", { className: styles56["toast-title-container"], children: [
|
|
2987
|
+
displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
|
|
2988
|
+
/* @__PURE__ */ jsx(ToastTitle, { children: title })
|
|
2989
|
+
] }),
|
|
2966
2990
|
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
2967
2991
|
] }),
|
|
2968
2992
|
action && /* @__PURE__ */ jsx("div", { className: styles56["toast-action"], children: action }),
|