@g4rcez/components 1.3.0 → 1.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/components/display/empty.d.ts +1 -0
- package/dist/components/display/empty.d.ts.map +1 -1
- package/dist/components/display/empty.js +1 -1
- package/dist/components/display/progress.d.ts +1 -0
- package/dist/components/display/progress.d.ts.map +1 -1
- package/dist/components/display/progress.js +1 -1
- package/dist/components/form/autocomplete.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -105
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +41 -41
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
|
@@ -2,6 +2,7 @@ import { type LucideProps } from "lucide-react";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
export type EmptyProps = {
|
|
4
4
|
Icon?: React.FC<LucideProps>;
|
|
5
|
+
message?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const Empty: (props: EmptyProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/components/display/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/components/display/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,4CAStC,CAAC"}
|
|
@@ -4,5 +4,5 @@ import { useTranslations } from "../../hooks/use-translations";
|
|
|
4
4
|
export const Empty = (props) => {
|
|
5
5
|
const Icon = props.Icon ?? FileIcon;
|
|
6
6
|
const translate = useTranslations();
|
|
7
|
-
return (_jsxs("div", { className: "flex
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-col gap-4 justify-center items-center py-12 px-8 w-full", children: [_jsx(Icon, { size: 64, className: "text-disabled" }), _jsx("p", { className: "text-disabled", children: props.message ?? translate.emptyDataMessage })] }));
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/display/progress.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,KAAK,aAAa,GAAG;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/display/progress.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,KAAK,aAAa,GAAG;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,eAAe,CAAC,aAAa,CAAC,4CAoB7D,CAAA"}
|
|
@@ -4,6 +4,6 @@ import { Progress as RadixProgress } from "radix-ui";
|
|
|
4
4
|
import { css } from "../../lib/dom";
|
|
5
5
|
export const Progress = (props) => {
|
|
6
6
|
return (_jsxs(RadixProgress.Root, { max: props.max, value: props.percent, style: { transform: "translateZ(0)", }, className: css("overflow-hidden relative w-full rounded-full h-6 bg-background", props.container), children: [_jsx(RadixProgress.Indicator, { style: { transform: Is.number(props.percent) ? `translateX(-${100 - props.percent}%)` : undefined }, className: css("bg-primary transition-transform ease-in-out size-full duration-500", props.className) }), Is.number(props.percent)
|
|
7
|
-
? _jsxs("p", { className: "absolute inset-0 w-full font-semibold
|
|
7
|
+
? _jsxs("p", { className: css("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground", props.textClassName), children: [props.percent, " %"] })
|
|
8
8
|
: null] }));
|
|
9
9
|
};
|
|
@@ -112,7 +112,7 @@ export const Autocomplete = forwardRef(({ left, error, right, loading, options,
|
|
|
112
112
|
const item = options.find((x) => x.value === props.value);
|
|
113
113
|
setValue(item?.label ?? props.value);
|
|
114
114
|
}
|
|
115
|
-
}, [props.value]);
|
|
115
|
+
}, [props.value, options.length]);
|
|
116
116
|
useEffect(() => {
|
|
117
117
|
if (!open)
|
|
118
118
|
return setH(0);
|