@eqtylab/equality 2.3.0 → 2.3.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/checkbox.module.module.css.module.css +5 -2
- package/dist/index.cjs +14 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +15 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import { ReactNode, HTMLAttributes } from 'react';
|
|
3
|
+
import { ReactNode, ComponentPropsWithoutRef, HTMLAttributes } from 'react';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
@@ -475,7 +475,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
475
475
|
target?: string;
|
|
476
476
|
download?: string | boolean;
|
|
477
477
|
}
|
|
478
|
-
declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element
|
|
478
|
+
declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
479
479
|
|
|
480
480
|
interface InfoCardProps {
|
|
481
481
|
label: string;
|
|
@@ -800,6 +800,7 @@ interface TabsProps {
|
|
|
800
800
|
icon?: React.ReactElement | string;
|
|
801
801
|
suffix?: React.ReactNode;
|
|
802
802
|
content: React.ReactNode;
|
|
803
|
+
triggerProps?: Omit<ComponentPropsWithoutRef<typeof TabsTrigger>, 'value'>;
|
|
803
804
|
}[];
|
|
804
805
|
className?: string;
|
|
805
806
|
tabsListBackground?: 'transparent' | 'filled';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import { ReactNode, HTMLAttributes } from 'react';
|
|
3
|
+
import { ReactNode, ComponentPropsWithoutRef, HTMLAttributes } from 'react';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
@@ -475,7 +475,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
475
475
|
target?: string;
|
|
476
476
|
download?: string | boolean;
|
|
477
477
|
}
|
|
478
|
-
declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element
|
|
478
|
+
declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
479
479
|
|
|
480
480
|
interface InfoCardProps {
|
|
481
481
|
label: string;
|
|
@@ -800,6 +800,7 @@ interface TabsProps {
|
|
|
800
800
|
icon?: React.ReactElement | string;
|
|
801
801
|
suffix?: React.ReactNode;
|
|
802
802
|
content: React.ReactNode;
|
|
803
|
+
triggerProps?: Omit<ComponentPropsWithoutRef<typeof TabsTrigger>, 'value'>;
|
|
803
804
|
}[];
|
|
804
805
|
className?: string;
|
|
805
806
|
tabsListBackground?: 'transparent' | 'filled';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React16 from 'react';
|
|
2
|
-
import { forwardRef, useRef, useMemo, useEffect, useSyncExternalStore, useState, useCallback, useLayoutEffect } from 'react';
|
|
2
|
+
import { forwardRef, useRef, useMemo, useEffect, useSyncExternalStore, useState, useCallback, useLayoutEffect, createElement } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import styles2 from './alert.module.module.css.module.css';
|
|
5
5
|
import * as LucideIcons from 'lucide-react';
|
|
@@ -986,10 +986,7 @@ var Checkbox = React16.forwardRef(
|
|
|
986
986
|
ref,
|
|
987
987
|
className: cn(styles13.checkbox, styles13[size], className),
|
|
988
988
|
...props,
|
|
989
|
-
children: /* @__PURE__ */
|
|
990
|
-
Icon3 ? /* @__PURE__ */ jsx(Icon3, { className: styles13.check }) : /* @__PURE__ */ jsx(CheckIcon, { className: styles13.check }),
|
|
991
|
-
" "
|
|
992
|
-
] })
|
|
989
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: styles13.indicator, children: Icon3 ? /* @__PURE__ */ jsx(Icon3, { className: styles13.check }) : /* @__PURE__ */ jsx(CheckIcon, { className: styles13.check }) })
|
|
993
990
|
}
|
|
994
991
|
)
|
|
995
992
|
);
|
|
@@ -1032,8 +1029,7 @@ function IconButton({
|
|
|
1032
1029
|
const iconSize = iconSizeMap[size || "sm"];
|
|
1033
1030
|
const IconComponent = Icon3;
|
|
1034
1031
|
if (!Icon3) {
|
|
1035
|
-
|
|
1036
|
-
return null;
|
|
1032
|
+
throw new Error(`Icon "${name}" not found in lucide-react`);
|
|
1037
1033
|
}
|
|
1038
1034
|
const content = /* @__PURE__ */ jsx(IconComponent, { size: iconSize });
|
|
1039
1035
|
if (href && !disabled) {
|
|
@@ -2823,7 +2819,7 @@ var SearchBar = ({
|
|
|
2823
2819
|
suffix: searchQuery && /* @__PURE__ */ jsx(
|
|
2824
2820
|
IconButton,
|
|
2825
2821
|
{
|
|
2826
|
-
name: "
|
|
2822
|
+
name: "X",
|
|
2827
2823
|
onClick: handleClear,
|
|
2828
2824
|
className: styles44["clear-button"],
|
|
2829
2825
|
label: "Clear search"
|
|
@@ -3227,25 +3223,24 @@ var Tabs = ({
|
|
|
3227
3223
|
styles55["tabs-list"],
|
|
3228
3224
|
isFilled ? styles55["tabs-list--filled"] : styles55["tabs-list--transparent"]
|
|
3229
3225
|
),
|
|
3230
|
-
children: items.map(({ label, value, icon, suffix }) => {
|
|
3226
|
+
children: items.map(({ label, value, icon, suffix, triggerProps }) => {
|
|
3231
3227
|
const isActive = activeTab === value;
|
|
3232
|
-
return /* @__PURE__ */
|
|
3228
|
+
return /* @__PURE__ */ createElement(
|
|
3233
3229
|
TabsTrigger,
|
|
3234
3230
|
{
|
|
3231
|
+
...triggerProps,
|
|
3232
|
+
key: value,
|
|
3235
3233
|
value,
|
|
3236
3234
|
className: cn(
|
|
3237
3235
|
styles55["tabs-trigger"],
|
|
3238
|
-
isFilled ? styles55["tabs-trigger--filled"] : styles55["tabs-trigger--transparent"]
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
children: [
|
|
3242
|
-
renderIcon(icon),
|
|
3243
|
-
label,
|
|
3244
|
-
suffix,
|
|
3245
|
-
renderActiveStyle(isActive)
|
|
3246
|
-
]
|
|
3236
|
+
isFilled ? styles55["tabs-trigger--filled"] : styles55["tabs-trigger--transparent"],
|
|
3237
|
+
triggerProps?.className
|
|
3238
|
+
)
|
|
3247
3239
|
},
|
|
3248
|
-
|
|
3240
|
+
renderIcon(icon),
|
|
3241
|
+
label,
|
|
3242
|
+
suffix,
|
|
3243
|
+
renderActiveStyle(isActive)
|
|
3249
3244
|
);
|
|
3250
3245
|
})
|
|
3251
3246
|
}
|