@motor-hero/ui-kit 0.36.2 → 0.37.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/components/combobox.d.ts +4 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/rating.d.ts +10 -0
- package/dist/components/rating.d.ts.map +1 -0
- package/dist/components/search-input.d.ts.map +1 -1
- package/dist/index.cjs +364 -275
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +275 -187
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/combobox.tsx +222 -220
- package/src/components/rating.tsx +99 -0
- package/src/components/search-input.tsx +36 -31
- package/src/index.ts +2 -0
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import * as React from "react"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
2
3
|
|
|
3
4
|
interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
-
|
|
5
|
+
containerClassName?: string;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
export const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
({ containerClassName, className, ...props }, ref) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className={cn("relative flex-1", containerClassName)}>
|
|
12
|
+
<svg
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
width="16"
|
|
15
|
+
height="16"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
strokeWidth="2"
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
|
|
24
|
+
>
|
|
25
|
+
<circle cx="11" cy="11" r="8" />
|
|
26
|
+
<path d="m21 21-4.3-4.3" />
|
|
27
|
+
</svg>
|
|
28
|
+
<input
|
|
29
|
+
ref={ref}
|
|
30
|
+
type="text"
|
|
31
|
+
className={cn(
|
|
32
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 pl-10 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
SearchInput.displayName = "SearchInput";
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type { BaseDialogProps, BaseDialogSize } from "./components/base-dialog";
|
|
|
8
8
|
export { BaseDialog } from "./components/base-dialog";
|
|
9
9
|
export type { ColorPickerProps } from "./components/color-picker";
|
|
10
10
|
export { ColorPicker } from "./components/color-picker";
|
|
11
|
+
export { Rating } from "./components/rating"
|
|
12
|
+
export type { RatingProps } from "./components/rating"
|
|
11
13
|
export type { ComboboxOption, ComboboxProps } from "./components/combobox";
|
|
12
14
|
export { Combobox } from "./components/combobox";
|
|
13
15
|
export { ConfirmDialog } from "./components/confirm-dialog";
|