@sustaina/shared-ui 1.21.0 → 1.22.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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -730,7 +730,7 @@ declare const inputVariants: (props?: ({
|
|
|
730
730
|
fullWidth?: boolean | null | undefined;
|
|
731
731
|
appearance?: "filled" | "unfilled" | null | undefined;
|
|
732
732
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
733
|
-
type InputProps = Omit<InputPrimitiveProps, "size"> & VariantProps<typeof inputVariants> & {
|
|
733
|
+
type InputProps = Omit<InputPrimitiveProps, "size" | "prefix"> & VariantProps<typeof inputVariants> & {
|
|
734
734
|
prefix?: React$1.ReactNode;
|
|
735
735
|
prefixProps?: React$1.HTMLAttributes<HTMLSpanElement>;
|
|
736
736
|
prefixInteractive?: boolean;
|
|
@@ -746,7 +746,7 @@ type InputProps = Omit<InputPrimitiveProps, "size"> & VariantProps<typeof inputV
|
|
|
746
746
|
validationMessageProps?: React$1.HTMLAttributes<HTMLParagraphElement>;
|
|
747
747
|
onValueChange?: (value: string) => void;
|
|
748
748
|
};
|
|
749
|
-
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps, "size"> & VariantProps<(props?: ({
|
|
749
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps, "prefix" | "size"> & VariantProps<(props?: ({
|
|
750
750
|
controlSize?: "sm" | "lg" | "md" | null | undefined;
|
|
751
751
|
fullWidth?: boolean | null | undefined;
|
|
752
752
|
appearance?: "filled" | "unfilled" | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -730,7 +730,7 @@ declare const inputVariants: (props?: ({
|
|
|
730
730
|
fullWidth?: boolean | null | undefined;
|
|
731
731
|
appearance?: "filled" | "unfilled" | null | undefined;
|
|
732
732
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
733
|
-
type InputProps = Omit<InputPrimitiveProps, "size"> & VariantProps<typeof inputVariants> & {
|
|
733
|
+
type InputProps = Omit<InputPrimitiveProps, "size" | "prefix"> & VariantProps<typeof inputVariants> & {
|
|
734
734
|
prefix?: React$1.ReactNode;
|
|
735
735
|
prefixProps?: React$1.HTMLAttributes<HTMLSpanElement>;
|
|
736
736
|
prefixInteractive?: boolean;
|
|
@@ -746,7 +746,7 @@ type InputProps = Omit<InputPrimitiveProps, "size"> & VariantProps<typeof inputV
|
|
|
746
746
|
validationMessageProps?: React$1.HTMLAttributes<HTMLParagraphElement>;
|
|
747
747
|
onValueChange?: (value: string) => void;
|
|
748
748
|
};
|
|
749
|
-
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps, "size"> & VariantProps<(props?: ({
|
|
749
|
+
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputPrimitiveProps, "prefix" | "size"> & VariantProps<(props?: ({
|
|
750
750
|
controlSize?: "sm" | "lg" | "md" | null | undefined;
|
|
751
751
|
fullWidth?: boolean | null | undefined;
|
|
752
752
|
appearance?: "filled" | "unfilled" | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1271,14 +1271,14 @@ var Input = React4__namespace.forwardRef(
|
|
|
1271
1271
|
type = "text",
|
|
1272
1272
|
...rest
|
|
1273
1273
|
}, ref) => {
|
|
1274
|
+
const inputProps = rest;
|
|
1274
1275
|
const hasPrefix = Boolean(prefix);
|
|
1275
1276
|
const hasSuffix = Boolean(suffix) || loading;
|
|
1276
1277
|
const isFullWidth = fullWidth ?? true;
|
|
1277
1278
|
const {
|
|
1278
1279
|
"aria-invalid": ariaInvalidProp,
|
|
1279
1280
|
"aria-describedby": ariaDescribedByProp,
|
|
1280
|
-
onChange: onChangeProp
|
|
1281
|
-
...inputProps
|
|
1281
|
+
onChange: onChangeProp
|
|
1282
1282
|
} = rest;
|
|
1283
1283
|
const ariaInvalid = invalid ?? ariaInvalidProp;
|
|
1284
1284
|
const messageId = React4__namespace.useId();
|
|
@@ -1355,7 +1355,7 @@ var Input = React4__namespace.forwardRef(
|
|
|
1355
1355
|
return inputWithAffixes;
|
|
1356
1356
|
}
|
|
1357
1357
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", isFullWidth ? "w-full" : "w-fit", wrapperClassName), children: [
|
|
1358
|
-
|
|
1358
|
+
inputWithAffixes,
|
|
1359
1359
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1360
1360
|
"p",
|
|
1361
1361
|
{
|
|
@@ -4396,9 +4396,6 @@ var DataTable = ({
|
|
|
4396
4396
|
columnResizeMode: columnResizing?.enabled ? columnResizing?.resizeMode ?? "onChange" : "onChange"
|
|
4397
4397
|
})
|
|
4398
4398
|
});
|
|
4399
|
-
if (isDefined(tableRef) && !isDefined(tableRef?.current)) {
|
|
4400
|
-
tableRef.current = table;
|
|
4401
|
-
}
|
|
4402
4399
|
const tableContainerRef = React4.useRef(null);
|
|
4403
4400
|
const isTableEmpty = table.getCoreRowModel().rows.length === 0;
|
|
4404
4401
|
const isTableEmptyAfterFiltering = table.getRowModel().rows.length === 0;
|
|
@@ -4476,6 +4473,13 @@ var DataTable = ({
|
|
|
4476
4473
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4477
4474
|
[scrollFetch?.enabled, scrollFetch?.isFetchingMore, scrollFetch?.hasMore, scrollFetch?.fetchMore]
|
|
4478
4475
|
);
|
|
4476
|
+
React4.useEffect(() => {
|
|
4477
|
+
if (!tableRef) return;
|
|
4478
|
+
tableRef.current = table;
|
|
4479
|
+
return () => {
|
|
4480
|
+
tableRef.current = null;
|
|
4481
|
+
};
|
|
4482
|
+
}, [tableRef, table]);
|
|
4479
4483
|
React4.useEffect(() => {
|
|
4480
4484
|
fetchMoreOnScrollReached(tableContainerRef.current);
|
|
4481
4485
|
}, [fetchMoreOnScrollReached]);
|