@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.
@@ -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
- containerClassName?: string
5
+ containerClassName?: string;
5
6
  }
6
7
 
7
8
  export const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(
8
- ({ containerClassName, className, ...props }, ref) => {
9
- return (
10
- <div className={`relative flex-1 ${containerClassName ?? ""}`}>
11
- <svg
12
- xmlns="http://www.w3.org/2000/svg"
13
- width="16"
14
- height="16"
15
- viewBox="0 0 24 24"
16
- fill="none"
17
- stroke="currentColor"
18
- strokeWidth="2"
19
- strokeLinecap="round"
20
- strokeLinejoin="round"
21
- className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
22
- >
23
- <circle cx="11" cy="11" r="8" />
24
- <path d="m21 21-4.3-4.3" />
25
- </svg>
26
- <input
27
- ref={ref}
28
- type="text"
29
- className={`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 ${className ?? ""}`}
30
- {...props}
31
- />
32
- </div>
33
- )
34
- }
35
- )
36
- SearchInput.displayName = "SearchInput"
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";