@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.
@@ -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;AAE1D,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,4CAStC,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 w-full flex-col items-center justify-center gap-4 px-8 py-12", children: [_jsx(Icon, { size: 64, className: "text-disabled" }), _jsx("p", { className: "text-disabled", children: translate.emptyDataMessage })] }));
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
  };
@@ -4,6 +4,7 @@ type ProgressProps = {
4
4
  percent?: number;
5
5
  container?: string;
6
6
  className?: string;
7
+ textClassName?: string;
7
8
  };
8
9
  export declare const Progress: (props: PropsWithoutRef<ProgressProps>) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -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;CACpB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,eAAe,CAAC,aAAa,CAAC,4CAiB7D,CAAA"}
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 flex items-center justify-center tabular-nums text-foreground", children: [props.percent, " %"] })
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);