@eqtylab/equality 1.7.2 → 1.8.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.cjs +20 -3
- 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 +20 -3
- package/dist/index.js.map +1 -1
- package/dist/table-components.module.module.css.module.css +15 -17
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -192,8 +192,11 @@ type ResourceDisplayMode = BadgeDisplayMode;
|
|
|
192
192
|
interface ResourceBadgeProps {
|
|
193
193
|
type: ResourceType;
|
|
194
194
|
display?: ResourceDisplayMode;
|
|
195
|
+
closeable?: boolean;
|
|
196
|
+
handleClosable?: () => void;
|
|
197
|
+
children?: React$1.ReactNode;
|
|
195
198
|
}
|
|
196
|
-
declare const ResourceBadge: ({ type, display }: ResourceBadgeProps) => react_jsx_runtime.JSX.Element;
|
|
199
|
+
declare const ResourceBadge: ({ type, display, closeable, handleClosable, children, }: ResourceBadgeProps) => react_jsx_runtime.JSX.Element;
|
|
197
200
|
|
|
198
201
|
interface CardContentHeaderProps {
|
|
199
202
|
className?: string;
|
|
@@ -473,7 +476,7 @@ type Variant = 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
|
473
476
|
interface MetricCardProps extends VariantProps<typeof metricCardElevationVariants> {
|
|
474
477
|
value: string | number;
|
|
475
478
|
label: string;
|
|
476
|
-
icon
|
|
479
|
+
icon?: React.ReactElement | string;
|
|
477
480
|
variant?: Variant;
|
|
478
481
|
className?: string;
|
|
479
482
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -192,8 +192,11 @@ type ResourceDisplayMode = BadgeDisplayMode;
|
|
|
192
192
|
interface ResourceBadgeProps {
|
|
193
193
|
type: ResourceType;
|
|
194
194
|
display?: ResourceDisplayMode;
|
|
195
|
+
closeable?: boolean;
|
|
196
|
+
handleClosable?: () => void;
|
|
197
|
+
children?: React$1.ReactNode;
|
|
195
198
|
}
|
|
196
|
-
declare const ResourceBadge: ({ type, display }: ResourceBadgeProps) => react_jsx_runtime.JSX.Element;
|
|
199
|
+
declare const ResourceBadge: ({ type, display, closeable, handleClosable, children, }: ResourceBadgeProps) => react_jsx_runtime.JSX.Element;
|
|
197
200
|
|
|
198
201
|
interface CardContentHeaderProps {
|
|
199
202
|
className?: string;
|
|
@@ -473,7 +476,7 @@ type Variant = 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
|
473
476
|
interface MetricCardProps extends VariantProps<typeof metricCardElevationVariants> {
|
|
474
477
|
value: string | number;
|
|
475
478
|
label: string;
|
|
476
|
-
icon
|
|
479
|
+
icon?: React.ReactElement | string;
|
|
477
480
|
variant?: Variant;
|
|
478
481
|
className?: string;
|
|
479
482
|
}
|
package/dist/index.js
CHANGED
|
@@ -631,9 +631,26 @@ var BgGradient = ({
|
|
|
631
631
|
}, [theme, placement, brandColors]);
|
|
632
632
|
return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className: styles8["bg-gradient"] });
|
|
633
633
|
};
|
|
634
|
-
var ResourceBadge = ({
|
|
634
|
+
var ResourceBadge = ({
|
|
635
|
+
type,
|
|
636
|
+
display = "both",
|
|
637
|
+
closeable,
|
|
638
|
+
handleClosable,
|
|
639
|
+
children
|
|
640
|
+
}) => {
|
|
635
641
|
const config = getTypeConfig(type);
|
|
636
|
-
return /* @__PURE__ */ jsx(
|
|
642
|
+
return /* @__PURE__ */ jsx(
|
|
643
|
+
Badge,
|
|
644
|
+
{
|
|
645
|
+
icon: config.icon,
|
|
646
|
+
display,
|
|
647
|
+
className: config.className,
|
|
648
|
+
variant: null,
|
|
649
|
+
closeable,
|
|
650
|
+
handleClosable,
|
|
651
|
+
children: children ?? config.label
|
|
652
|
+
}
|
|
653
|
+
);
|
|
637
654
|
};
|
|
638
655
|
var getTypeConfig = (type) => {
|
|
639
656
|
switch (type) {
|
|
@@ -2042,7 +2059,7 @@ var MetricCard = ({
|
|
|
2042
2059
|
return /* @__PURE__ */ jsxs("div", { className: cn(metricCardElevationVariants({ elevation }), className), children: [
|
|
2043
2060
|
/* @__PURE__ */ jsxs("div", { className: styles31["value-container"], children: [
|
|
2044
2061
|
/* @__PURE__ */ jsx("p", { className: cn(styles31.value), children: value }),
|
|
2045
|
-
/* @__PURE__ */ jsx(
|
|
2062
|
+
icon && /* @__PURE__ */ jsx(
|
|
2046
2063
|
Icon,
|
|
2047
2064
|
{
|
|
2048
2065
|
icon,
|