@use-stall/ui 0.0.7 → 0.0.9
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/README.md +8 -1
- package/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +10 -85
- package/dist/index.mjs +10 -84
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,4 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## A collection of UI components based on Shadcnui
|
|
4
4
|
|
|
5
|
-
A component library for Stall ecosystem based on shadcnui, coss ui, align ui
|
|
5
|
+
A component library for Stall ecosystem based on shadcnui, coss ui, align ui
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
``` bun install @use-stall/ui ```
|
|
9
|
+
|
|
10
|
+
Make sure to add the followingline if you are using Tailiwndcss v4
|
|
11
|
+
|
|
12
|
+
``` @source '../node_modules/@use-stall/ui/dist'; ```
|
package/dist/index.d.mts
CHANGED
|
@@ -24,7 +24,6 @@ import * as react_hook_form from 'react-hook-form';
|
|
|
24
24
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
25
25
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
26
26
|
import * as input_otp from 'input-otp';
|
|
27
|
-
import * as RPNInput from 'react-phone-number-input';
|
|
28
27
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
28
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
30
29
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
@@ -630,7 +629,7 @@ declare const InputOTPSlot: React$1.ForwardRefExoticComponent<Omit<React$1.Detai
|
|
|
630
629
|
declare const InputOTPSeparator: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
631
630
|
|
|
632
631
|
interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
633
|
-
|
|
632
|
+
onChange?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
634
633
|
}
|
|
635
634
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
636
635
|
|
|
@@ -664,13 +663,6 @@ interface PasswordInputProps extends React__default.InputHTMLAttributes<HTMLInpu
|
|
|
664
663
|
onSubmit?: (event: React__default.FormEvent) => void;
|
|
665
664
|
}
|
|
666
665
|
|
|
667
|
-
type PhoneProps = {
|
|
668
|
-
className?: string;
|
|
669
|
-
value: string | number;
|
|
670
|
-
onChange: (value: string | number) => void;
|
|
671
|
-
} & React__default.ComponentProps<typeof RPNInput.default>;
|
|
672
|
-
declare function PhoneNumberInput({ className, ...props }: PhoneProps): react_jsx_runtime.JSX.Element;
|
|
673
|
-
|
|
674
666
|
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
675
667
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
676
668
|
interface PopoverProps extends React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
@@ -782,4 +774,4 @@ declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrim
|
|
|
782
774
|
|
|
783
775
|
declare function cn(...inputs: ClassValue[]): string;
|
|
784
776
|
|
|
785
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, Combobox$1 as ComboboxMulti, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, CopyButton, CountryPicker, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ButtonRoot as FancyButton, Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldValidity, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, ButtonIcon as Icon, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MultiSelect, type PasswordInputProps,
|
|
777
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, Combobox$1 as ComboboxMulti, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, CopyButton, CountryPicker, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ButtonRoot as FancyButton, Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldValidity, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, ButtonIcon as Icon, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MultiSelect, type PasswordInputProps, type PolymorphicComponent, type PolymorphicComponentProps, type PolymorphicComponentPropsWithRef, type PolymorphicRef, Popover, PopoverContent, PopoverTrigger, PriceInput, Progress, ButtonRoot as Root, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineProps, TimelineSeparator, TimelineTitle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, statusIndicatorVariants, useComboboxFilter, useFormField };
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ import * as react_hook_form from 'react-hook-form';
|
|
|
24
24
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
25
25
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
26
26
|
import * as input_otp from 'input-otp';
|
|
27
|
-
import * as RPNInput from 'react-phone-number-input';
|
|
28
27
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
28
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
30
29
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
@@ -630,7 +629,7 @@ declare const InputOTPSlot: React$1.ForwardRefExoticComponent<Omit<React$1.Detai
|
|
|
630
629
|
declare const InputOTPSeparator: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
631
630
|
|
|
632
631
|
interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
633
|
-
|
|
632
|
+
onChange?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
634
633
|
}
|
|
635
634
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
636
635
|
|
|
@@ -664,13 +663,6 @@ interface PasswordInputProps extends React__default.InputHTMLAttributes<HTMLInpu
|
|
|
664
663
|
onSubmit?: (event: React__default.FormEvent) => void;
|
|
665
664
|
}
|
|
666
665
|
|
|
667
|
-
type PhoneProps = {
|
|
668
|
-
className?: string;
|
|
669
|
-
value: string | number;
|
|
670
|
-
onChange: (value: string | number) => void;
|
|
671
|
-
} & React__default.ComponentProps<typeof RPNInput.default>;
|
|
672
|
-
declare function PhoneNumberInput({ className, ...props }: PhoneProps): react_jsx_runtime.JSX.Element;
|
|
673
|
-
|
|
674
666
|
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
675
667
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
676
668
|
interface PopoverProps extends React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
@@ -782,4 +774,4 @@ declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrim
|
|
|
782
774
|
|
|
783
775
|
declare function cn(...inputs: ClassValue[]): string;
|
|
784
776
|
|
|
785
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, Combobox$1 as ComboboxMulti, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, CopyButton, CountryPicker, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ButtonRoot as FancyButton, Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldValidity, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, ButtonIcon as Icon, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MultiSelect, type PasswordInputProps,
|
|
777
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, Combobox$1 as ComboboxMulti, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, CopyButton, CountryPicker, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ButtonRoot as FancyButton, Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldValidity, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, ButtonIcon as Icon, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MultiSelect, type PasswordInputProps, type PolymorphicComponent, type PolymorphicComponentProps, type PolymorphicComponentPropsWithRef, type PolymorphicRef, Popover, PopoverContent, PopoverTrigger, PriceInput, Progress, ButtonRoot as Root, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, type TimelineDotProps, TimelineItem, type TimelineProps, TimelineSeparator, TimelineTitle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, statusIndicatorVariants, useComboboxFilter, useFormField };
|
package/dist/index.js
CHANGED
|
@@ -154,7 +154,6 @@ __export(index_exports, {
|
|
|
154
154
|
InputOTPSlot: () => InputOTPSlot,
|
|
155
155
|
Label: () => Label2,
|
|
156
156
|
MultiSelect: () => MultiSelect,
|
|
157
|
-
PhoneNumberInput: () => PhoneNumberInput,
|
|
158
157
|
Popover: () => Popover,
|
|
159
158
|
PopoverContent: () => PopoverContent,
|
|
160
159
|
PopoverTrigger: () => PopoverTrigger,
|
|
@@ -685,17 +684,17 @@ var React8 = __toESM(require("react"));
|
|
|
685
684
|
var React6 = __toESM(require("react"));
|
|
686
685
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
687
686
|
var Input = React6.forwardRef(
|
|
688
|
-
({ className, type,
|
|
687
|
+
({ className, type, ...props }, ref) => {
|
|
689
688
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
690
689
|
"input",
|
|
691
690
|
{
|
|
692
691
|
type,
|
|
693
692
|
className: cn(
|
|
694
|
-
`flex h-10 w-full rounded-10 border border-input bg-background px-3 py-2 text-sm
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
693
|
+
`flex h-10 w-full rounded-10 border border-input bg-background px-3 py-2 text-sm
|
|
694
|
+
font-normal ring-offset-background file:border-0 file:bg-transparent file:text-sm
|
|
695
|
+
file:font-medium placeholder:text-muted-foreground focus-visible:outline-none
|
|
696
|
+
focus-visible:ring-2 ring-inset focus-visible:ring-ring focus-visible:ring-offset-0
|
|
697
|
+
focus-visible:border-0 disabled:cursor-not-allowed disabled:opacity-50`,
|
|
699
698
|
className
|
|
700
699
|
),
|
|
701
700
|
ref,
|
|
@@ -1625,8 +1624,8 @@ var ButtonRoot = React12.forwardRef(
|
|
|
1625
1624
|
"div",
|
|
1626
1625
|
{
|
|
1627
1626
|
className: cn(
|
|
1628
|
-
`size-4 shrink-0 rounded-full border-2 border-
|
|
1629
|
-
|
|
1627
|
+
`size-4 shrink-0 rounded-full border-2 border-white/30
|
|
1628
|
+
border-l-white animate-spin`,
|
|
1630
1629
|
{
|
|
1631
1630
|
"border-primary/30 border-l-primary": ![
|
|
1632
1631
|
"primary",
|
|
@@ -2805,42 +2804,13 @@ var RPNInput = __toESM(require("react-phone-number-input"));
|
|
|
2805
2804
|
var import_flags = __toESM(require("react-phone-number-input/flags"));
|
|
2806
2805
|
var import_react_phone_number_input = require("react-phone-number-input");
|
|
2807
2806
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2808
|
-
function PhoneNumberInput({
|
|
2809
|
-
className = "",
|
|
2810
|
-
...props
|
|
2811
|
-
}) {
|
|
2812
|
-
const [error, setError] = (0, import_react5.useState)(null);
|
|
2813
|
-
const handleChange = (newValue) => {
|
|
2814
|
-
if (newValue && !(0, import_react_phone_number_input.isValidPhoneNumber)(newValue)) {
|
|
2815
|
-
setError("Invalid phone number");
|
|
2816
|
-
} else {
|
|
2817
|
-
setError(null);
|
|
2818
|
-
}
|
|
2819
|
-
props.onChange(newValue ?? "");
|
|
2820
|
-
};
|
|
2821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2822
|
-
RPNInput.default,
|
|
2823
|
-
{
|
|
2824
|
-
className: cn("flex rounded-10 shadow-xs", error && "border border-red-500/70"),
|
|
2825
|
-
international: true,
|
|
2826
|
-
flagComponent: FlagComponent,
|
|
2827
|
-
countrySelectComponent: CountrySelect,
|
|
2828
|
-
inputComponent: PhoneInput,
|
|
2829
|
-
id: "input-46",
|
|
2830
|
-
placeholder: "Enter phone number",
|
|
2831
|
-
...props,
|
|
2832
|
-
value: props.value,
|
|
2833
|
-
onChange: (e) => handleChange(e ?? "")
|
|
2834
|
-
}
|
|
2835
|
-
) });
|
|
2836
|
-
}
|
|
2837
2807
|
var PhoneInput = (0, import_react5.forwardRef)(
|
|
2838
2808
|
({ className, ...props }, ref) => {
|
|
2839
2809
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2840
2810
|
Input,
|
|
2841
2811
|
{
|
|
2842
2812
|
className: cn(
|
|
2843
|
-
"-ms-px rounded-s-none shadow-none focus-visible:z-10 ring-0! border!",
|
|
2813
|
+
"-ms-px rounded-s-none shadow-none focus-visible:z-10 ring-0! border! bg-main-background",
|
|
2844
2814
|
className
|
|
2845
2815
|
),
|
|
2846
2816
|
ref,
|
|
@@ -2850,50 +2820,6 @@ var PhoneInput = (0, import_react5.forwardRef)(
|
|
|
2850
2820
|
}
|
|
2851
2821
|
);
|
|
2852
2822
|
PhoneInput.displayName = "PhoneInput";
|
|
2853
|
-
var CountrySelect = ({
|
|
2854
|
-
disabled,
|
|
2855
|
-
value,
|
|
2856
|
-
onChange,
|
|
2857
|
-
options: options2
|
|
2858
|
-
}) => {
|
|
2859
|
-
const handleSelect = (event) => {
|
|
2860
|
-
onChange(event.target.value);
|
|
2861
|
-
};
|
|
2862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2863
|
-
"div",
|
|
2864
|
-
{
|
|
2865
|
-
className: "relative inline-flex items-center self-stretch rounded-s-10 border border-input\n bg-background py-2 pe-2 ps-3 text-muted-foreground transition-shadow focus-within:z-10\n focus-within:border-ring focus-within:outline-hidden focus-within:ring-[3px] focus-within:ring-ring/20\n hover:text-foreground has-disabled:pointer-events-none has-disabled:opacity-50",
|
|
2866
|
-
children: [
|
|
2867
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "inline-flex items-center gap-1", "aria-hidden": "true", children: [
|
|
2868
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
|
|
2869
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-muted-foreground/80", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.ChevronDown, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
|
|
2870
|
-
] }),
|
|
2871
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2872
|
-
"select",
|
|
2873
|
-
{
|
|
2874
|
-
disabled,
|
|
2875
|
-
value,
|
|
2876
|
-
onChange: handleSelect,
|
|
2877
|
-
className: "absolute inset-0 text-sm opacity-0",
|
|
2878
|
-
"aria-label": "Select country",
|
|
2879
|
-
children: [
|
|
2880
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", children: "Select a country" }, "default"),
|
|
2881
|
-
options2.filter((x) => x.value).map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("option", { value: option.value, children: [
|
|
2882
|
-
option.label,
|
|
2883
|
-
" ",
|
|
2884
|
-
option.value && `+${RPNInput.getCountryCallingCode(option.value)}`
|
|
2885
|
-
] }, option.value ?? `empty-${i}`))
|
|
2886
|
-
]
|
|
2887
|
-
}
|
|
2888
|
-
)
|
|
2889
|
-
]
|
|
2890
|
-
}
|
|
2891
|
-
);
|
|
2892
|
-
};
|
|
2893
|
-
var FlagComponent = ({ country, countryName }) => {
|
|
2894
|
-
const Flag = import_flags.default[country];
|
|
2895
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-5 overflow-hidden rounded-sm", children: Flag ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Flag, { title: countryName }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Phone, { size: 16, "aria-hidden": "true" }) });
|
|
2896
|
-
};
|
|
2897
2823
|
|
|
2898
2824
|
// src/components/price-input.tsx
|
|
2899
2825
|
var import_react6 = __toESM(require("react"));
|
|
@@ -3454,7 +3380,7 @@ var Textarea = React31.forwardRef(
|
|
|
3454
3380
|
"textarea",
|
|
3455
3381
|
{
|
|
3456
3382
|
className: cn(
|
|
3457
|
-
"flex min-h-20 w-full rounded-10 border border-input bg-background p-3 text-sm font-normal ring-offset-background placeholder:text-muted-foreground/30 focus-visible:border-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/
|
|
3383
|
+
"flex min-h-20 w-full rounded-10 border border-input bg-background p-3 text-sm font-normal ring-offset-background placeholder:text-muted-foreground/30 focus-visible:border-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none",
|
|
3458
3384
|
className
|
|
3459
3385
|
),
|
|
3460
3386
|
ref,
|
|
@@ -3747,7 +3673,6 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
3747
3673
|
InputOTPSlot,
|
|
3748
3674
|
Label,
|
|
3749
3675
|
MultiSelect,
|
|
3750
|
-
PhoneNumberInput,
|
|
3751
3676
|
Popover,
|
|
3752
3677
|
PopoverContent,
|
|
3753
3678
|
PopoverTrigger,
|
package/dist/index.mjs
CHANGED
|
@@ -462,17 +462,17 @@ import * as React8 from "react";
|
|
|
462
462
|
import * as React6 from "react";
|
|
463
463
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
464
464
|
var Input = React6.forwardRef(
|
|
465
|
-
({ className, type,
|
|
465
|
+
({ className, type, ...props }, ref) => {
|
|
466
466
|
return /* @__PURE__ */ jsx7(
|
|
467
467
|
"input",
|
|
468
468
|
{
|
|
469
469
|
type,
|
|
470
470
|
className: cn(
|
|
471
|
-
`flex h-10 w-full rounded-10 border border-input bg-background px-3 py-2 text-sm
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
471
|
+
`flex h-10 w-full rounded-10 border border-input bg-background px-3 py-2 text-sm
|
|
472
|
+
font-normal ring-offset-background file:border-0 file:bg-transparent file:text-sm
|
|
473
|
+
file:font-medium placeholder:text-muted-foreground focus-visible:outline-none
|
|
474
|
+
focus-visible:ring-2 ring-inset focus-visible:ring-ring focus-visible:ring-offset-0
|
|
475
|
+
focus-visible:border-0 disabled:cursor-not-allowed disabled:opacity-50`,
|
|
476
476
|
className
|
|
477
477
|
),
|
|
478
478
|
ref,
|
|
@@ -1402,8 +1402,8 @@ var ButtonRoot = React12.forwardRef(
|
|
|
1402
1402
|
"div",
|
|
1403
1403
|
{
|
|
1404
1404
|
className: cn(
|
|
1405
|
-
`size-4 shrink-0 rounded-full border-2 border-
|
|
1406
|
-
|
|
1405
|
+
`size-4 shrink-0 rounded-full border-2 border-white/30
|
|
1406
|
+
border-l-white animate-spin`,
|
|
1407
1407
|
{
|
|
1408
1408
|
"border-primary/30 border-l-primary": ![
|
|
1409
1409
|
"primary",
|
|
@@ -2586,42 +2586,13 @@ import * as RPNInput from "react-phone-number-input";
|
|
|
2586
2586
|
import flags from "react-phone-number-input/flags";
|
|
2587
2587
|
import { isValidPhoneNumber } from "react-phone-number-input";
|
|
2588
2588
|
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2589
|
-
function PhoneNumberInput({
|
|
2590
|
-
className = "",
|
|
2591
|
-
...props
|
|
2592
|
-
}) {
|
|
2593
|
-
const [error, setError] = useState3(null);
|
|
2594
|
-
const handleChange = (newValue) => {
|
|
2595
|
-
if (newValue && !isValidPhoneNumber(newValue)) {
|
|
2596
|
-
setError("Invalid phone number");
|
|
2597
|
-
} else {
|
|
2598
|
-
setError(null);
|
|
2599
|
-
}
|
|
2600
|
-
props.onChange(newValue ?? "");
|
|
2601
|
-
};
|
|
2602
|
-
return /* @__PURE__ */ jsx28("div", { className, children: /* @__PURE__ */ jsx28(
|
|
2603
|
-
RPNInput.default,
|
|
2604
|
-
{
|
|
2605
|
-
className: cn("flex rounded-10 shadow-xs", error && "border border-red-500/70"),
|
|
2606
|
-
international: true,
|
|
2607
|
-
flagComponent: FlagComponent,
|
|
2608
|
-
countrySelectComponent: CountrySelect,
|
|
2609
|
-
inputComponent: PhoneInput,
|
|
2610
|
-
id: "input-46",
|
|
2611
|
-
placeholder: "Enter phone number",
|
|
2612
|
-
...props,
|
|
2613
|
-
value: props.value,
|
|
2614
|
-
onChange: (e) => handleChange(e ?? "")
|
|
2615
|
-
}
|
|
2616
|
-
) });
|
|
2617
|
-
}
|
|
2618
2589
|
var PhoneInput = forwardRef16(
|
|
2619
2590
|
({ className, ...props }, ref) => {
|
|
2620
2591
|
return /* @__PURE__ */ jsx28(
|
|
2621
2592
|
Input,
|
|
2622
2593
|
{
|
|
2623
2594
|
className: cn(
|
|
2624
|
-
"-ms-px rounded-s-none shadow-none focus-visible:z-10 ring-0! border!",
|
|
2595
|
+
"-ms-px rounded-s-none shadow-none focus-visible:z-10 ring-0! border! bg-main-background",
|
|
2625
2596
|
className
|
|
2626
2597
|
),
|
|
2627
2598
|
ref,
|
|
@@ -2631,50 +2602,6 @@ var PhoneInput = forwardRef16(
|
|
|
2631
2602
|
}
|
|
2632
2603
|
);
|
|
2633
2604
|
PhoneInput.displayName = "PhoneInput";
|
|
2634
|
-
var CountrySelect = ({
|
|
2635
|
-
disabled,
|
|
2636
|
-
value,
|
|
2637
|
-
onChange,
|
|
2638
|
-
options: options2
|
|
2639
|
-
}) => {
|
|
2640
|
-
const handleSelect = (event) => {
|
|
2641
|
-
onChange(event.target.value);
|
|
2642
|
-
};
|
|
2643
|
-
return /* @__PURE__ */ jsxs18(
|
|
2644
|
-
"div",
|
|
2645
|
-
{
|
|
2646
|
-
className: "relative inline-flex items-center self-stretch rounded-s-10 border border-input\n bg-background py-2 pe-2 ps-3 text-muted-foreground transition-shadow focus-within:z-10\n focus-within:border-ring focus-within:outline-hidden focus-within:ring-[3px] focus-within:ring-ring/20\n hover:text-foreground has-disabled:pointer-events-none has-disabled:opacity-50",
|
|
2647
|
-
children: [
|
|
2648
|
-
/* @__PURE__ */ jsxs18("div", { className: "inline-flex items-center gap-1", "aria-hidden": "true", children: [
|
|
2649
|
-
/* @__PURE__ */ jsx28(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
|
|
2650
|
-
/* @__PURE__ */ jsx28("span", { className: "text-muted-foreground/80", children: /* @__PURE__ */ jsx28(ChevronDown2, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
|
|
2651
|
-
] }),
|
|
2652
|
-
/* @__PURE__ */ jsxs18(
|
|
2653
|
-
"select",
|
|
2654
|
-
{
|
|
2655
|
-
disabled,
|
|
2656
|
-
value,
|
|
2657
|
-
onChange: handleSelect,
|
|
2658
|
-
className: "absolute inset-0 text-sm opacity-0",
|
|
2659
|
-
"aria-label": "Select country",
|
|
2660
|
-
children: [
|
|
2661
|
-
/* @__PURE__ */ jsx28("option", { value: "", children: "Select a country" }, "default"),
|
|
2662
|
-
options2.filter((x) => x.value).map((option, i) => /* @__PURE__ */ jsxs18("option", { value: option.value, children: [
|
|
2663
|
-
option.label,
|
|
2664
|
-
" ",
|
|
2665
|
-
option.value && `+${RPNInput.getCountryCallingCode(option.value)}`
|
|
2666
|
-
] }, option.value ?? `empty-${i}`))
|
|
2667
|
-
]
|
|
2668
|
-
}
|
|
2669
|
-
)
|
|
2670
|
-
]
|
|
2671
|
-
}
|
|
2672
|
-
);
|
|
2673
|
-
};
|
|
2674
|
-
var FlagComponent = ({ country, countryName }) => {
|
|
2675
|
-
const Flag = flags[country];
|
|
2676
|
-
return /* @__PURE__ */ jsx28("span", { className: "w-5 overflow-hidden rounded-sm", children: Flag ? /* @__PURE__ */ jsx28(Flag, { title: countryName }) : /* @__PURE__ */ jsx28(Phone, { size: 16, "aria-hidden": "true" }) });
|
|
2677
|
-
};
|
|
2678
2605
|
|
|
2679
2606
|
// src/components/price-input.tsx
|
|
2680
2607
|
import React25 from "react";
|
|
@@ -3235,7 +3162,7 @@ var Textarea = React31.forwardRef(
|
|
|
3235
3162
|
"textarea",
|
|
3236
3163
|
{
|
|
3237
3164
|
className: cn(
|
|
3238
|
-
"flex min-h-20 w-full rounded-10 border border-input bg-background p-3 text-sm font-normal ring-offset-background placeholder:text-muted-foreground/30 focus-visible:border-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/
|
|
3165
|
+
"flex min-h-20 w-full rounded-10 border border-input bg-background p-3 text-sm font-normal ring-offset-background placeholder:text-muted-foreground/30 focus-visible:border-primary focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none",
|
|
3239
3166
|
className
|
|
3240
3167
|
),
|
|
3241
3168
|
ref,
|
|
@@ -3527,7 +3454,6 @@ export {
|
|
|
3527
3454
|
InputOTPSlot,
|
|
3528
3455
|
Label2 as Label,
|
|
3529
3456
|
MultiSelect,
|
|
3530
|
-
PhoneNumberInput,
|
|
3531
3457
|
Popover,
|
|
3532
3458
|
PopoverContent,
|
|
3533
3459
|
PopoverTrigger,
|