@majapisoftwares/ui 4.3.0 → 4.3.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
2
|
import { type InputProps } from "./Input";
|
|
3
|
-
declare function MultiSelectInput({ options, value, onChange, emptyLabel, ref, badgeClassName, name, onValueChange, ...props }: Omit<InputProps<undefined>, "value"> & {
|
|
3
|
+
declare function MultiSelectInput({ options, value, onChange, emptyLabel, ref, badgeClassName, name, onValueChange, inputClassName, ...props }: Omit<InputProps<undefined>, "value"> & {
|
|
4
4
|
options: {
|
|
5
5
|
value: string;
|
|
6
6
|
name: string;
|
|
@@ -7,7 +7,7 @@ import clsx from "../../utils/clsx";
|
|
|
7
7
|
import Badge from "../Badge";
|
|
8
8
|
import useInputRefValue from "./useInputRefValue";
|
|
9
9
|
import { useDeepCompareEffect } from "react-use";
|
|
10
|
-
function MultiSelectInput({ options, value, onChange, emptyLabel = "None", ref, badgeClassName, name, onValueChange, ...props }) {
|
|
10
|
+
function MultiSelectInput({ options, value, onChange, emptyLabel = "None", ref, badgeClassName, name, onValueChange, inputClassName, ...props }) {
|
|
11
11
|
const { innerRef, innerValue, setInnerValue } = useInputRefValue({
|
|
12
12
|
value,
|
|
13
13
|
ref,
|
|
@@ -25,7 +25,7 @@ function MultiSelectInput({ options, value, onChange, emptyLabel = "None", ref,
|
|
|
25
25
|
<Input as={Button} {...props} name={name} onChange={onChange} ref={innerRef} trailing={<ChevronDownIcon className="h-5 w-5 shrink-0"/>} inputClassName={clsx("text-left dark:hover:bg-zinc-700/70 bg-white gap-1.5 flex justify-start flex-wrap", {
|
|
26
26
|
"text-zinc-500 dark:text-zinc-500": isEmpty,
|
|
27
27
|
"p-1.5": !isEmpty,
|
|
28
|
-
})}>
|
|
28
|
+
}, inputClassName)}>
|
|
29
29
|
{isEmpty
|
|
30
30
|
? emptyLabel
|
|
31
31
|
: options
|
package/package.json
CHANGED