luan-ui 0.9.0 → 0.9.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.
- package/dist/components/accordion/accordion.d.ts +3 -3
- package/dist/components/alert-dialog/alert-dialog.d.ts +4 -4
- package/dist/components/autocomplete/autocomplete.d.ts +12 -12
- package/dist/components/avatar/avatar-group.d.ts +1 -1
- package/dist/components/avatar/avatar.d.ts +3 -3
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts +12 -12
- package/dist/components/dialog/dialog.d.ts +6 -6
- package/dist/components/drawer/drawer.d.ts +6 -6
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +14 -14
- package/dist/components/form-field/form-field.d.ts +1 -1
- package/dist/components/form-field/form-field.js +1 -1
- package/dist/components/form-helper/form-helper.d.ts +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/label/label.d.ts +1 -1
- package/dist/components/label/label.js +1 -3
- package/dist/components/label/label.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +3 -3
- package/dist/components/popover/popover.d.ts +5 -5
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/radio-group/radio-group.d.ts +2 -2
- package/dist/components/select/select.d.ts +9 -9
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.js +2 -4
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/table/table.d.ts +8 -8
- package/dist/components/table/table.js +2 -2
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +3 -3
- package/dist/components/text-area/text-area.d.ts +1 -1
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +3 -3
- package/dist/utilities/pagination/get-truncated-elements.d.ts +1 -1
- package/dist/utilities/pagination/keyboard-navigation.js.map +1 -1
- package/dist/utilities/responsive/responsive.d.ts +6 -4
- package/package.json +28 -28
|
@@ -25,9 +25,9 @@ import type { ComponentProps } from "react";
|
|
|
25
25
|
export type AccordionProps = ComponentProps<typeof BaseAccordion.Root>;
|
|
26
26
|
declare const Accordion: <Value = any>(props: BaseAccordion.Root.Props<Value>) => React.JSX.Element;
|
|
27
27
|
export type AccordionItemProps = ComponentProps<typeof BaseAccordion.Item>;
|
|
28
|
-
declare function AccordionItem({ className, ref, ...props }: AccordionItemProps): import("react
|
|
28
|
+
declare function AccordionItem({ className, ref, ...props }: AccordionItemProps): import("react").JSX.Element;
|
|
29
29
|
export type AccordionTriggerProps = ComponentProps<typeof BaseAccordion.Trigger>;
|
|
30
|
-
declare function AccordionTrigger({ className, children, ref, ...props }: AccordionTriggerProps): import("react
|
|
30
|
+
declare function AccordionTrigger({ className, children, ref, ...props }: AccordionTriggerProps): import("react").JSX.Element;
|
|
31
31
|
export type AccordionContentProps = ComponentProps<typeof BaseAccordion.Panel>;
|
|
32
|
-
declare function AccordionContent({ className, children, ref, ...props }: AccordionContentProps): import("react
|
|
32
|
+
declare function AccordionContent({ className, children, ref, ...props }: AccordionContentProps): import("react").JSX.Element;
|
|
33
33
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -3,13 +3,13 @@ import type { ComponentProps } from "react";
|
|
|
3
3
|
declare const AlertDialog: typeof BaseAlertDialog.Root;
|
|
4
4
|
declare const AlertDialogTrigger: BaseAlertDialog.Trigger;
|
|
5
5
|
export type AlertDialogOverlayProps = ComponentProps<typeof BaseAlertDialog.Backdrop>;
|
|
6
|
-
declare function AlertDialogOverlay({ className, ref, ...props }: AlertDialogOverlayProps): import("react
|
|
6
|
+
declare function AlertDialogOverlay({ className, ref, ...props }: AlertDialogOverlayProps): import("react").JSX.Element;
|
|
7
7
|
export type AlertDialogContentProps = ComponentProps<typeof BaseAlertDialog.Popup>;
|
|
8
|
-
declare function AlertDialogContent({ className, ref, ...props }: AlertDialogContentProps): import("react
|
|
8
|
+
declare function AlertDialogContent({ className, ref, ...props }: AlertDialogContentProps): import("react").JSX.Element;
|
|
9
9
|
export type AlertDialogTitleProps = ComponentProps<typeof BaseAlertDialog.Title>;
|
|
10
|
-
declare function AlertDialogTitle({ className, ref, ...props }: AlertDialogTitleProps): import("react
|
|
10
|
+
declare function AlertDialogTitle({ className, ref, ...props }: AlertDialogTitleProps): import("react").JSX.Element;
|
|
11
11
|
export type AlertDialogDescriptionProps = ComponentProps<typeof BaseAlertDialog.Description>;
|
|
12
|
-
declare function AlertDialogDescription({ className, ref, ...props }: AlertDialogDescriptionProps): import("react
|
|
12
|
+
declare function AlertDialogDescription({ className, ref, ...props }: AlertDialogDescriptionProps): import("react").JSX.Element;
|
|
13
13
|
declare const AlertDialogAction: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
declare const AlertDialogCancel: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -14,29 +14,29 @@ declare function Autocomplete<ItemValue>(props: AutocompleteProps<ItemValue>): J
|
|
|
14
14
|
* AutocompleteInputGroup
|
|
15
15
|
*/
|
|
16
16
|
export type AutocompleteInputGroupProps = ComponentProps<typeof AutocompletePrimitive.InputGroup>;
|
|
17
|
-
declare function AutocompleteInputGroup({ className, ref, ...props }: AutocompleteInputGroupProps):
|
|
17
|
+
declare function AutocompleteInputGroup({ className, ref, ...props }: AutocompleteInputGroupProps): JSX.Element;
|
|
18
18
|
/**
|
|
19
19
|
* AutocompleteInput
|
|
20
20
|
*/
|
|
21
21
|
export type AutocompleteInputProps = ComponentProps<typeof AutocompletePrimitive.Input>;
|
|
22
|
-
declare function AutocompleteInput({ className, ref, ...props }: AutocompleteInputProps):
|
|
22
|
+
declare function AutocompleteInput({ className, ref, ...props }: AutocompleteInputProps): JSX.Element;
|
|
23
23
|
/**
|
|
24
24
|
* AutocompleteTrigger
|
|
25
25
|
*/
|
|
26
26
|
export type AutocompleteTriggerProps = ComponentProps<typeof AutocompletePrimitive.Trigger>;
|
|
27
|
-
declare function AutocompleteTrigger({ className, ref, ...props }: AutocompleteTriggerProps):
|
|
27
|
+
declare function AutocompleteTrigger({ className, ref, ...props }: AutocompleteTriggerProps): JSX.Element;
|
|
28
28
|
/**
|
|
29
29
|
* AutocompleteClear
|
|
30
30
|
*/
|
|
31
31
|
export type AutocompleteClearProps = ComponentProps<typeof AutocompletePrimitive.Clear>;
|
|
32
|
-
declare function AutocompleteClear({ className, ref, ...props }: AutocompleteClearProps):
|
|
32
|
+
declare function AutocompleteClear({ className, ref, ...props }: AutocompleteClearProps): JSX.Element;
|
|
33
33
|
/**
|
|
34
34
|
* AutocompleteContent
|
|
35
35
|
*/
|
|
36
36
|
export type AutocompleteContentProps = ComponentProps<typeof AutocompletePrimitive.Popup> & {
|
|
37
37
|
sideOffset?: number;
|
|
38
38
|
};
|
|
39
|
-
declare function AutocompleteContent({ className, children, sideOffset, ref, ...props }: AutocompleteContentProps):
|
|
39
|
+
declare function AutocompleteContent({ className, children, sideOffset, ref, ...props }: AutocompleteContentProps): JSX.Element;
|
|
40
40
|
/**
|
|
41
41
|
* AutocompleteCollection
|
|
42
42
|
*
|
|
@@ -45,7 +45,7 @@ declare function AutocompleteContent({ className, children, sideOffset, ref, ...
|
|
|
45
45
|
* with an `items` prop, or map filtered groups using useAutocompleteFilteredItems.
|
|
46
46
|
*/
|
|
47
47
|
export type AutocompleteCollectionProps = ComponentProps<typeof AutocompletePrimitive.Collection>;
|
|
48
|
-
declare function AutocompleteCollection(props: AutocompleteCollectionProps):
|
|
48
|
+
declare function AutocompleteCollection(props: AutocompleteCollectionProps): JSX.Element;
|
|
49
49
|
/**
|
|
50
50
|
* Returns the autocomplete’s filtered items (flat list or grouped structure), matching
|
|
51
51
|
* the current input value.
|
|
@@ -55,29 +55,29 @@ declare const useAutocompleteFilteredItems: typeof AutocompletePrimitive.useFilt
|
|
|
55
55
|
* AutocompleteList
|
|
56
56
|
*/
|
|
57
57
|
export type AutocompleteListProps = ComponentProps<typeof AutocompletePrimitive.List>;
|
|
58
|
-
declare function AutocompleteList({ className, ref, ...props }: AutocompleteListProps):
|
|
58
|
+
declare function AutocompleteList({ className, ref, ...props }: AutocompleteListProps): JSX.Element;
|
|
59
59
|
/**
|
|
60
60
|
* AutocompleteEmpty
|
|
61
61
|
*/
|
|
62
62
|
export type AutocompleteEmptyProps = ComponentProps<typeof AutocompletePrimitive.Empty>;
|
|
63
|
-
declare function AutocompleteEmpty({ className, ref, ...props }: AutocompleteEmptyProps):
|
|
63
|
+
declare function AutocompleteEmpty({ className, ref, ...props }: AutocompleteEmptyProps): JSX.Element;
|
|
64
64
|
/**
|
|
65
65
|
* AutocompleteItem
|
|
66
66
|
*/
|
|
67
67
|
export type AutocompleteItemProps = ComponentProps<typeof AutocompletePrimitive.Item>;
|
|
68
|
-
declare function AutocompleteItem({ className, children, ref, ...props }: AutocompleteItemProps):
|
|
68
|
+
declare function AutocompleteItem({ className, children, ref, ...props }: AutocompleteItemProps): JSX.Element;
|
|
69
69
|
/**
|
|
70
70
|
* AutocompleteGroup
|
|
71
71
|
*/
|
|
72
|
-
declare const AutocompleteGroup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
72
|
+
declare const AutocompleteGroup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
73
73
|
/**
|
|
74
74
|
* AutocompleteGroupLabel
|
|
75
75
|
*/
|
|
76
76
|
export type AutocompleteGroupLabelProps = ComponentProps<typeof AutocompletePrimitive.GroupLabel>;
|
|
77
|
-
declare function AutocompleteGroupLabel({ className, ref, ...props }: AutocompleteGroupLabelProps):
|
|
77
|
+
declare function AutocompleteGroupLabel({ className, ref, ...props }: AutocompleteGroupLabelProps): JSX.Element;
|
|
78
78
|
/**
|
|
79
79
|
* AutocompleteSeparator
|
|
80
80
|
*/
|
|
81
81
|
export type AutocompleteSeparatorProps = ComponentProps<typeof AutocompletePrimitive.Separator>;
|
|
82
|
-
declare function AutocompleteSeparator({ className, ref, ...props }: AutocompleteSeparatorProps):
|
|
82
|
+
declare function AutocompleteSeparator({ className, ref, ...props }: AutocompleteSeparatorProps): JSX.Element;
|
|
83
83
|
export { Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompleteSeparator, AutocompleteTrigger, useAutocompleteFilteredItems, };
|
|
@@ -3,5 +3,5 @@ export type AvatarGroupProps = ComponentProps<"div"> & {
|
|
|
3
3
|
maxAvatars?: number;
|
|
4
4
|
ref?: Ref<HTMLDivElement>;
|
|
5
5
|
};
|
|
6
|
-
declare function AvatarGroup({ children, maxAvatars, ref, ...props }: AvatarGroupProps): import("react
|
|
6
|
+
declare function AvatarGroup({ children, maxAvatars, ref, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
7
7
|
export { AvatarGroup };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
export type AvatarProps = ComponentProps<typeof AvatarPrimitive.Root>;
|
|
4
|
-
declare function Avatar({ className, ref, ...props }: AvatarProps): import("react
|
|
4
|
+
declare function Avatar({ className, ref, ...props }: AvatarProps): import("react").JSX.Element;
|
|
5
5
|
export type AvatarImageProps = ComponentProps<typeof AvatarPrimitive.Image>;
|
|
6
|
-
declare function AvatarImage({ className, ref, ...props }: AvatarImageProps): import("react
|
|
6
|
+
declare function AvatarImage({ className, ref, ...props }: AvatarImageProps): import("react").JSX.Element;
|
|
7
7
|
export type AvatarFallbackProps = ComponentProps<typeof AvatarPrimitive.Fallback>;
|
|
8
|
-
declare function AvatarFallback({ className, ref, ...props }: AvatarFallbackProps): import("react
|
|
8
|
+
declare function AvatarFallback({ className, ref, ...props }: AvatarFallbackProps): import("react").JSX.Element;
|
|
9
9
|
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -35,4 +35,4 @@ export declare const SIZES: {
|
|
|
35
35
|
* <Checkbox id="checkbox" onCheckedChange={(checked) => console.log(checked)} />
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export declare function Checkbox({ className, disabled: initialDisabled, required: initialRequired, size, ref, ...props }: CheckboxProps): import("react
|
|
38
|
+
export declare function Checkbox({ className, disabled: initialDisabled, required: initialRequired, size, ref, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
@@ -13,29 +13,29 @@ declare function Combobox<Value, Multiple extends boolean | undefined = false>({
|
|
|
13
13
|
* ComboboxInputGroup
|
|
14
14
|
*/
|
|
15
15
|
export type ComboboxInputGroupProps = ComponentProps<typeof ComboboxPrimitive.InputGroup>;
|
|
16
|
-
declare function ComboboxInputGroup({ className, ref, ...props }: ComboboxInputGroupProps):
|
|
16
|
+
declare function ComboboxInputGroup({ className, ref, ...props }: ComboboxInputGroupProps): JSX.Element;
|
|
17
17
|
/**
|
|
18
18
|
* ComboboxInput
|
|
19
19
|
*/
|
|
20
20
|
export type ComboboxInputProps = ComponentProps<typeof ComboboxPrimitive.Input>;
|
|
21
|
-
declare function ComboboxInput({ className, ref, ...props }: ComboboxInputProps):
|
|
21
|
+
declare function ComboboxInput({ className, ref, ...props }: ComboboxInputProps): JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
* ComboboxTrigger
|
|
24
24
|
*/
|
|
25
25
|
export type ComboboxTriggerProps = ComponentProps<typeof ComboboxPrimitive.Trigger>;
|
|
26
|
-
declare function ComboboxTrigger({ className, ref, ...props }: ComboboxTriggerProps):
|
|
26
|
+
declare function ComboboxTrigger({ className, ref, ...props }: ComboboxTriggerProps): JSX.Element;
|
|
27
27
|
/**
|
|
28
28
|
* ComboboxClear
|
|
29
29
|
*/
|
|
30
30
|
export type ComboboxClearProps = ComponentProps<typeof ComboboxPrimitive.Clear>;
|
|
31
|
-
declare function ComboboxClear({ className, ref, ...props }: ComboboxClearProps):
|
|
31
|
+
declare function ComboboxClear({ className, ref, ...props }: ComboboxClearProps): JSX.Element;
|
|
32
32
|
/**
|
|
33
33
|
* ComboboxContent
|
|
34
34
|
*/
|
|
35
35
|
export type ComboboxContentProps = ComponentProps<typeof ComboboxPrimitive.Popup> & {
|
|
36
36
|
sideOffset?: number;
|
|
37
37
|
};
|
|
38
|
-
declare function ComboboxContent({ className, children, sideOffset, ref, ...props }: ComboboxContentProps):
|
|
38
|
+
declare function ComboboxContent({ className, children, sideOffset, ref, ...props }: ComboboxContentProps): JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* ComboboxCollection
|
|
41
41
|
*
|
|
@@ -44,7 +44,7 @@ declare function ComboboxContent({ className, children, sideOffset, ref, ...prop
|
|
|
44
44
|
* an `items` prop, or map filtered groups using useComboboxFilteredItems.
|
|
45
45
|
*/
|
|
46
46
|
export type ComboboxCollectionProps = ComponentProps<typeof ComboboxPrimitive.Collection>;
|
|
47
|
-
declare function ComboboxCollection(props: ComboboxCollectionProps):
|
|
47
|
+
declare function ComboboxCollection(props: ComboboxCollectionProps): JSX.Element;
|
|
48
48
|
/**
|
|
49
49
|
* Returns the combobox’s filtered items (flat list or grouped structure), matching
|
|
50
50
|
* the current input query.
|
|
@@ -54,29 +54,29 @@ declare const useComboboxFilteredItems: typeof ComboboxPrimitive.useFilteredItem
|
|
|
54
54
|
* ComboboxList
|
|
55
55
|
*/
|
|
56
56
|
export type ComboboxListProps = ComponentProps<typeof ComboboxPrimitive.List>;
|
|
57
|
-
declare function ComboboxList({ className, ref, ...props }: ComboboxListProps):
|
|
57
|
+
declare function ComboboxList({ className, ref, ...props }: ComboboxListProps): JSX.Element;
|
|
58
58
|
/**
|
|
59
59
|
* ComboboxEmpty
|
|
60
60
|
*/
|
|
61
61
|
export type ComboboxEmptyProps = ComponentProps<typeof ComboboxPrimitive.Empty>;
|
|
62
|
-
declare function ComboboxEmpty({ className, ref, ...props }: ComboboxEmptyProps):
|
|
62
|
+
declare function ComboboxEmpty({ className, ref, ...props }: ComboboxEmptyProps): JSX.Element;
|
|
63
63
|
/**
|
|
64
64
|
* ComboboxItem
|
|
65
65
|
*/
|
|
66
66
|
export type ComboboxItemProps = ComponentProps<typeof ComboboxPrimitive.Item>;
|
|
67
|
-
declare function ComboboxItem({ className, children, ref, ...props }: ComboboxItemProps):
|
|
67
|
+
declare function ComboboxItem({ className, children, ref, ...props }: ComboboxItemProps): JSX.Element;
|
|
68
68
|
/**
|
|
69
69
|
* ComboboxGroup
|
|
70
70
|
*/
|
|
71
|
-
declare const ComboboxGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
71
|
+
declare const ComboboxGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
72
72
|
/**
|
|
73
73
|
* ComboboxGroupLabel
|
|
74
74
|
*/
|
|
75
75
|
export type ComboboxGroupLabelProps = ComponentProps<typeof ComboboxPrimitive.GroupLabel>;
|
|
76
|
-
declare function ComboboxGroupLabel({ className, ref, ...props }: ComboboxGroupLabelProps):
|
|
76
|
+
declare function ComboboxGroupLabel({ className, ref, ...props }: ComboboxGroupLabelProps): JSX.Element;
|
|
77
77
|
/**
|
|
78
78
|
* ComboboxSeparator
|
|
79
79
|
*/
|
|
80
80
|
export type ComboboxSeparatorProps = ComponentProps<typeof ComboboxPrimitive.Separator>;
|
|
81
|
-
declare function ComboboxSeparator({ className, ref, ...props }: ComboboxSeparatorProps):
|
|
81
|
+
declare function ComboboxSeparator({ className, ref, ...props }: ComboboxSeparatorProps): JSX.Element;
|
|
82
82
|
export { Combobox, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, useComboboxFilteredItems, };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
|
-
declare const Dialog:
|
|
3
|
+
declare const Dialog: <Payload>(props: BaseDialog.Root.Props<Payload>) => React.JSX.Element;
|
|
4
4
|
declare const DialogTrigger: BaseDialog.Trigger;
|
|
5
5
|
declare const DialogClose: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
export type DialogOverlayProps = ComponentProps<typeof BaseDialog.Backdrop>;
|
|
7
7
|
export type DialogContentProps = ComponentProps<typeof BaseDialog.Popup>;
|
|
8
|
-
declare function DialogContent({ children, className, ref, ...props }: DialogContentProps): import("react
|
|
8
|
+
declare function DialogContent({ children, className, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
9
9
|
export type DialogHeaderProps = ComponentProps<"div">;
|
|
10
|
-
declare function DialogHeader({ className, ref, ...props }: DialogHeaderProps): import("react
|
|
10
|
+
declare function DialogHeader({ className, ref, ...props }: DialogHeaderProps): import("react").JSX.Element;
|
|
11
11
|
export type DialogTitleProps = ComponentProps<typeof BaseDialog.Title>;
|
|
12
|
-
declare function DialogTitle({ className, ref, ...props }: DialogTitleProps): import("react
|
|
12
|
+
declare function DialogTitle({ className, ref, ...props }: DialogTitleProps): import("react").JSX.Element;
|
|
13
13
|
export type DialogDescriptionProps = ComponentProps<typeof BaseDialog.Description>;
|
|
14
|
-
declare function DialogDescription({ className, ref, ...props }: DialogDescriptionProps): import("react
|
|
14
|
+
declare function DialogDescription({ className, ref, ...props }: DialogDescriptionProps): import("react").JSX.Element;
|
|
15
15
|
export type DialogFooterProps = ComponentProps<"div">;
|
|
16
|
-
declare function DialogFooter({ className, ref, ...props }: DialogFooterProps): import("react
|
|
16
|
+
declare function DialogFooter({ className, ref, ...props }: DialogFooterProps): import("react").JSX.Element;
|
|
17
17
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, };
|
|
@@ -10,20 +10,20 @@ type DrawerSide = keyof typeof SIDE_TO_SWIPE_DIRECTION;
|
|
|
10
10
|
export type DrawerProps = ComponentProps<typeof BaseDrawer.Root> & {
|
|
11
11
|
side?: DrawerSide;
|
|
12
12
|
};
|
|
13
|
-
declare function Drawer({ children, side, ...props }: DrawerProps): import("react
|
|
13
|
+
declare function Drawer({ children, side, ...props }: DrawerProps): import("react").JSX.Element;
|
|
14
14
|
declare const DrawerTrigger: BaseDrawer.Trigger;
|
|
15
15
|
declare const DrawerClose: BaseDrawer.Close;
|
|
16
16
|
export type DrawerOverlayProps = ComponentProps<typeof BaseDrawer.Backdrop>;
|
|
17
17
|
export type DrawerContentProps = Omit<ComponentProps<typeof BaseDrawer.Popup>, "className"> & {
|
|
18
18
|
className?: string;
|
|
19
19
|
};
|
|
20
|
-
declare function DrawerContent({ children, className, ref, ...props }: DrawerContentProps): import("react
|
|
20
|
+
declare function DrawerContent({ children, className, ref, ...props }: DrawerContentProps): import("react").JSX.Element;
|
|
21
21
|
export type DrawerHeaderProps = ComponentProps<"div">;
|
|
22
|
-
declare function DrawerHeader({ className, ref, ...props }: DrawerHeaderProps): import("react
|
|
22
|
+
declare function DrawerHeader({ className, ref, ...props }: DrawerHeaderProps): import("react").JSX.Element;
|
|
23
23
|
export type DrawerTitleProps = ComponentProps<typeof BaseDrawer.Title>;
|
|
24
|
-
declare function DrawerTitle({ className, ref, ...props }: DrawerTitleProps): import("react
|
|
24
|
+
declare function DrawerTitle({ className, ref, ...props }: DrawerTitleProps): import("react").JSX.Element;
|
|
25
25
|
export type DrawerDescriptionProps = ComponentProps<typeof BaseDrawer.Description>;
|
|
26
|
-
declare function DrawerDescription({ className, ref, ...props }: DrawerDescriptionProps): import("react
|
|
26
|
+
declare function DrawerDescription({ className, ref, ...props }: DrawerDescriptionProps): import("react").JSX.Element;
|
|
27
27
|
export type DrawerFooterProps = ComponentProps<"div">;
|
|
28
|
-
declare function DrawerFooter({ className, ref, ...props }: DrawerFooterProps): import("react
|
|
28
|
+
declare function DrawerFooter({ className, ref, ...props }: DrawerFooterProps): import("react").JSX.Element;
|
|
29
29
|
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, };
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { Menu } from "@base-ui/react/menu";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
|
-
declare const DropdownMenu: <Payload>(props: Menu.Root.Props<Payload>) =>
|
|
3
|
+
declare const DropdownMenu: <Payload>(props: Menu.Root.Props<Payload>) => React.JSX.Element;
|
|
4
4
|
export type DropdownMenuTriggerProps = ComponentProps<typeof Menu.Trigger>;
|
|
5
|
-
declare function DropdownMenuTrigger({ className, ref, ...props }: DropdownMenuTriggerProps): import("react
|
|
6
|
-
declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
7
|
-
declare const DropdownMenuPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").
|
|
5
|
+
declare function DropdownMenuTrigger({ className, ref, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
|
|
6
|
+
declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DropdownMenuPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const DropdownMenuSub: typeof Menu.SubmenuRoot;
|
|
9
|
-
declare const DropdownMenuRadioGroup: import("react").NamedExoticComponent<Omit<import("@base-ui/react").
|
|
9
|
+
declare const DropdownMenuRadioGroup: import("react").NamedExoticComponent<Omit<import("@base-ui/react").MenuRadioGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export type DropdownMenuSubTriggerProps = ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
11
11
|
inset?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ref, ...props }: DropdownMenuSubTriggerProps): import("react
|
|
13
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ref, ...props }: DropdownMenuSubTriggerProps): import("react").JSX.Element;
|
|
14
14
|
export type DropdownMenuSubContentProps = ComponentProps<typeof Menu.Popup>;
|
|
15
|
-
declare function DropdownMenuSubContent({ className, ref, ...props }: DropdownMenuSubContentProps): import("react
|
|
15
|
+
declare function DropdownMenuSubContent({ className, ref, ...props }: DropdownMenuSubContentProps): import("react").JSX.Element;
|
|
16
16
|
export type DropdownMenuContentProps = ComponentProps<typeof Menu.Popup> & {
|
|
17
17
|
sideOffset?: number;
|
|
18
18
|
};
|
|
19
|
-
declare function DropdownMenuContent({ className, sideOffset, ref, ...props }: DropdownMenuContentProps): import("react
|
|
19
|
+
declare function DropdownMenuContent({ className, sideOffset, ref, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
|
|
20
20
|
export type DropdownMenuItemProps = ComponentProps<typeof Menu.Item> & {
|
|
21
21
|
inset?: boolean;
|
|
22
22
|
};
|
|
23
|
-
declare function DropdownMenuItem({ className, inset, ref, ...props }: DropdownMenuItemProps): import("react
|
|
23
|
+
declare function DropdownMenuItem({ className, inset, ref, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
24
24
|
export type DropdownMenuCheckboxItemProps = ComponentProps<typeof Menu.CheckboxItem>;
|
|
25
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, onCheckedChange, ref, ...props }: DropdownMenuCheckboxItemProps): import("react
|
|
25
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, onCheckedChange, ref, ...props }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
|
|
26
26
|
export type DropdownMenuRadioItemProps = ComponentProps<typeof Menu.RadioItem>;
|
|
27
|
-
declare function DropdownMenuRadioItem({ className, children, ref, ...props }: DropdownMenuRadioItemProps): import("react
|
|
27
|
+
declare function DropdownMenuRadioItem({ className, children, ref, ...props }: DropdownMenuRadioItemProps): import("react").JSX.Element;
|
|
28
28
|
export type DropdownMenuLabelProps = ComponentProps<typeof Menu.GroupLabel> & {
|
|
29
29
|
inset?: boolean;
|
|
30
30
|
};
|
|
31
|
-
declare function DropdownMenuLabel({ className, inset, ref, ...props }: DropdownMenuLabelProps): import("react
|
|
31
|
+
declare function DropdownMenuLabel({ className, inset, ref, ...props }: DropdownMenuLabelProps): import("react").JSX.Element;
|
|
32
32
|
export type DropdownMenuSeparatorProps = ComponentProps<typeof Menu.Separator>;
|
|
33
|
-
declare function DropdownMenuSeparator({ className, ref, ...props }: DropdownMenuSeparatorProps): import("react
|
|
34
|
-
declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react
|
|
33
|
+
declare function DropdownMenuSeparator({ className, ref, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
|
|
34
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
35
35
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -18,4 +18,4 @@ export type FormFieldProps = ComponentProps<"div"> & {
|
|
|
18
18
|
* </FormField>
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export declare function FormField({ className, children, orientation, disabled, required, error, ref, ...props }: FormFieldProps): import("react
|
|
21
|
+
export declare function FormField({ className, children, orientation, disabled, required, error, ref, ...props }: FormFieldProps): import("react").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FormHelper } from "../form-helper/form-helper.js";
|
|
3
3
|
import { Label } from "../label/label.js";
|
|
4
4
|
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
@@ -16,4 +16,4 @@ export type FormHelperProps = ComponentProps<"div"> & {
|
|
|
16
16
|
* </FormField>
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare function FormHelper({ className, children, error: initialError, disabled: initialDisabled, ref, ...props }: FormHelperProps): import("react
|
|
19
|
+
export declare function FormHelper({ className, children, error: initialError, disabled: initialDisabled, ref, ...props }: FormHelperProps): import("react").JSX.Element;
|
|
@@ -11,5 +11,5 @@ export type InputProps = ComponentProps<"input"> & {
|
|
|
11
11
|
* <Input placeholder="Enter your email" id="email" />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function Input({ className, disabled: initialDisabled, required: initialRequired, error: initialError, ref, ...props }: InputProps): import("react
|
|
14
|
+
declare function Input({ className, disabled: initialDisabled, required: initialRequired, error: initialError, ref, ...props }: InputProps): import("react").JSX.Element;
|
|
15
15
|
export { Input };
|
|
@@ -11,5 +11,5 @@ export type LabelProps = ComponentProps<"label"> & {
|
|
|
11
11
|
* <Input id="email" />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
declare function Label({ className, required: initialRequired, children, ref, ...props }: LabelProps): import("react
|
|
14
|
+
declare function Label({ className, required: initialRequired, children, ref, ...props }: LabelProps): import("react").JSX.Element;
|
|
15
15
|
export { Label };
|
|
@@ -14,9 +14,7 @@ function Label({ className, required: initialRequired, children, ref, ...props }
|
|
|
14
14
|
const { required } = useFormContext({
|
|
15
15
|
required: initialRequired,
|
|
16
16
|
});
|
|
17
|
-
return (
|
|
18
|
-
// biome-ignore lint/a11y/noLabelWithoutControl: htmlFor is passed via props at runtime
|
|
19
|
-
_jsxs("label", { className: cn("font-medium text-md text-text peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props, ref: ref, children: [children, required && _jsx("span", { children: "*" })] }));
|
|
17
|
+
return (_jsxs("label", { className: cn("font-medium text-md text-text peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props, ref: ref, children: [children, required && _jsx("span", { children: "*" })] }));
|
|
20
18
|
}
|
|
21
19
|
export { Label };
|
|
22
20
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"/","sources":["components/label/label.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAOtC;;;;;;;;GAQG;AACH,SAAS,KAAK,CAAC,EACd,SAAS,EACT,QAAQ,EAAE,eAAe,EACzB,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACI;IACZ,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACnC,QAAQ,EAAE,eAAe;KACzB,CAAC,CAAC;IACH,OAAO
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"/","sources":["components/label/label.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAOtC;;;;;;;;GAQG;AACH,SAAS,KAAK,CAAC,EACd,SAAS,EACT,QAAQ,EAAE,eAAe,EACzB,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACI;IACZ,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACnC,QAAQ,EAAE,eAAe;KACzB,CAAC,CAAC;IACH,OAAO,CAEN,iBACC,SAAS,EAAE,EAAE,CACZ,yFAAyF,EACzF,SAAS,CACT,KACG,KAAK,EACT,GAAG,EAAE,GAAG,aAEP,QAAQ,EACR,QAAQ,IAAI,+BAAc,IACpB,CACR,CAAC;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import { useFormContext } from \"@components/form-field/form-field-context\";\nimport { cn } from \"@utilities/cn/cn\";\nimport type { ComponentProps } from \"react\";\n\nexport type LabelProps = ComponentProps<\"label\"> & {\n\trequired?: boolean;\n};\n\n/**\n * A label component that can be used to label form fields.\n *\n * @example\n * ```tsx\n * <Label htmlFor=\"email\">Email</Label>\n * <Input id=\"email\" />\n * ```\n */\nfunction Label({\n\tclassName,\n\trequired: initialRequired,\n\tchildren,\n\tref,\n\t...props\n}: LabelProps) {\n\tconst { required } = useFormContext({\n\t\trequired: initialRequired,\n\t});\n\treturn (\n\t\t// biome-ignore lint/a11y/noLabelWithoutControl: htmlFor is passed via props at runtime\n\t\t<label\n\t\t\tclassName={cn(\n\t\t\t\t\"font-medium text-md text-text peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{children}\n\t\t\t{required && <span>*</span>}\n\t\t</label>\n\t);\n}\n\nexport { Label };\n"]}
|
|
@@ -54,7 +54,7 @@ export type PaginationItemProps = {
|
|
|
54
54
|
* ```tsx
|
|
55
55
|
* <PaginationItem index={1}>1</PaginationItem>
|
|
56
56
|
*/
|
|
57
|
-
declare function PaginationItem({ index, children, className, ref, ...props }: PaginationItemProps): import("react
|
|
57
|
+
declare function PaginationItem({ index, children, className, ref, ...props }: PaginationItemProps): import("react").JSX.Element;
|
|
58
58
|
/**
|
|
59
59
|
* Pagination Prev
|
|
60
60
|
*/
|
|
@@ -70,7 +70,7 @@ export type PaginationPrevProps = PropsWithChildren<React.HTMLAttributes<HTMLBut
|
|
|
70
70
|
* <PaginationPrev>Previous</PaginationPrev>
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
|
-
declare function PaginationPrev({ children, className, ref, ...props }: PaginationPrevProps): import("react
|
|
73
|
+
declare function PaginationPrev({ children, className, ref, ...props }: PaginationPrevProps): import("react").JSX.Element;
|
|
74
74
|
/**
|
|
75
75
|
* Pagination Next
|
|
76
76
|
*/
|
|
@@ -86,5 +86,5 @@ export type PaginationNextProps = PropsWithChildren<React.HTMLAttributes<HTMLBut
|
|
|
86
86
|
* <PaginationNext>Next</PaginationNext>
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
declare function PaginationNext({ children, className, ref, ...props }: PaginationNextProps): import("react
|
|
89
|
+
declare function PaginationNext({ children, className, ref, ...props }: PaginationNextProps): import("react").JSX.Element;
|
|
90
90
|
export { Pagination, PaginationItem, PaginationNext, PaginationPrev };
|
|
@@ -30,9 +30,9 @@ export type PopoverProps = {
|
|
|
30
30
|
* </Popover>
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare function Popover({ children, showArrow, closeButtonAriaLabel, showCloseButton, side, sideOffset, ...props }: PopoverProps): import("react
|
|
33
|
+
declare function Popover({ children, showArrow, closeButtonAriaLabel, showCloseButton, side, sideOffset, ...props }: PopoverProps): import("react").JSX.Element;
|
|
34
34
|
export type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
|
|
35
|
-
declare function PopoverTrigger({ className, ref, ...props }: PopoverTriggerProps): import("react
|
|
35
|
+
declare function PopoverTrigger({ className, ref, ...props }: PopoverTriggerProps): import("react").JSX.Element;
|
|
36
36
|
export type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Popup> & {
|
|
37
37
|
showArrow?: boolean;
|
|
38
38
|
closeButtonAriaLabel?: string;
|
|
@@ -52,12 +52,12 @@ export type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Popup>
|
|
|
52
52
|
* </PopoverContent>
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
declare function PopoverContent({ children, className, sideOffset: sideOffsetProp, ref, ...props }: PopoverContentProps): import("react
|
|
55
|
+
declare function PopoverContent({ children, className, sideOffset: sideOffsetProp, ref, ...props }: PopoverContentProps): import("react").JSX.Element;
|
|
56
56
|
/**
|
|
57
57
|
* Popover Close
|
|
58
58
|
*/
|
|
59
59
|
export type PopoverCloseProps = ComponentProps<typeof PopoverPrimitive.Close>;
|
|
60
|
-
declare function PopoverClose({ className, ref, ...props }: PopoverCloseProps): import("react
|
|
60
|
+
declare function PopoverClose({ className, ref, ...props }: PopoverCloseProps): import("react").JSX.Element;
|
|
61
61
|
/**
|
|
62
62
|
* Popover Portal
|
|
63
63
|
*/
|
|
@@ -68,7 +68,7 @@ declare const PopoverPortal: import("react").ForwardRefExoticComponent<Omit<impo
|
|
|
68
68
|
export type PopoverAnchorProps = ComponentProps<typeof PopoverPrimitive.Positioner> & {
|
|
69
69
|
children?: React.ReactNode;
|
|
70
70
|
};
|
|
71
|
-
declare function PopoverAnchor({ children, ref, ...props }: PopoverAnchorProps): import("react
|
|
71
|
+
declare function PopoverAnchor({ children, ref, ...props }: PopoverAnchorProps): import("react").JSX.Element;
|
|
72
72
|
/**
|
|
73
73
|
* Popover Title
|
|
74
74
|
*/
|
|
@@ -11,5 +11,5 @@ export type ProgressProps = ComponentProps<typeof ProgressPrimitive.Root> & {
|
|
|
11
11
|
* @param {number} props.value - The value of the progress bar.
|
|
12
12
|
* @param {boolean} props.showLabel - Whether to show the label.
|
|
13
13
|
*/
|
|
14
|
-
declare function Progress({ className, value, showLabel, max, ref, ...props }: ProgressProps): import("react
|
|
14
|
+
declare function Progress({ className, value, showLabel, max, ref, ...props }: ProgressProps): import("react").JSX.Element;
|
|
15
15
|
export { Progress };
|
|
@@ -28,7 +28,7 @@ import type { ComponentProps } from "react";
|
|
|
28
28
|
* @returns {React.ReactElement} A React component that renders a radio group
|
|
29
29
|
*/
|
|
30
30
|
export type RadioGroupProps = ComponentProps<typeof BaseRadioGroup>;
|
|
31
|
-
declare function RadioGroup({ className, disabled: initialDisabled, required: initialRequired, ref, ...props }: RadioGroupProps): import("react
|
|
31
|
+
declare function RadioGroup({ className, disabled: initialDisabled, required: initialRequired, ref, ...props }: RadioGroupProps): import("react").JSX.Element;
|
|
32
32
|
export type RadioGroupItemProps = ComponentProps<typeof Radio.Root>;
|
|
33
|
-
declare function RadioGroupItem({ className, ref, ...props }: RadioGroupItemProps): import("react
|
|
33
|
+
declare function RadioGroupItem({ className, ref, ...props }: RadioGroupItemProps): import("react").JSX.Element;
|
|
34
34
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -4,7 +4,7 @@ import type { ComponentProps } from "react";
|
|
|
4
4
|
* Select
|
|
5
5
|
*/
|
|
6
6
|
export type SelectProps = ComponentProps<typeof SelectPrimitive.Root>;
|
|
7
|
-
declare function Select({ disabled: initialDisabled, required: initialRequired, ...props }: SelectProps): import("react
|
|
7
|
+
declare function Select({ disabled: initialDisabled, required: initialRequired, ...props }: SelectProps): import("react").JSX.Element;
|
|
8
8
|
/**
|
|
9
9
|
* SelectGroup
|
|
10
10
|
*/
|
|
@@ -13,42 +13,42 @@ declare const SelectGroup: import("react").ForwardRefExoticComponent<Omit<import
|
|
|
13
13
|
* SelectValue
|
|
14
14
|
*/
|
|
15
15
|
export type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;
|
|
16
|
-
declare function SelectValue({ ref, ...props }: SelectValueProps): import("react
|
|
16
|
+
declare function SelectValue({ ref, ...props }: SelectValueProps): import("react").JSX.Element;
|
|
17
17
|
/**
|
|
18
18
|
* SelectTrigger
|
|
19
19
|
*/
|
|
20
20
|
export type SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger>;
|
|
21
|
-
declare function SelectTrigger({ className, children, ref, ...props }: SelectTriggerProps): import("react
|
|
21
|
+
declare function SelectTrigger({ className, children, ref, ...props }: SelectTriggerProps): import("react").JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
* SelectScrollUpArrow
|
|
24
24
|
*/
|
|
25
25
|
export type SelectScrollUpArrowProps = ComponentProps<typeof SelectPrimitive.ScrollUpArrow>;
|
|
26
|
-
declare function SelectScrollUpArrow({ className, ref, ...props }: SelectScrollUpArrowProps): import("react
|
|
26
|
+
declare function SelectScrollUpArrow({ className, ref, ...props }: SelectScrollUpArrowProps): import("react").JSX.Element;
|
|
27
27
|
/**
|
|
28
28
|
* SelectScrollDownArrow
|
|
29
29
|
*/
|
|
30
30
|
export type SelectScrollDownArrowProps = ComponentProps<typeof SelectPrimitive.ScrollDownArrow>;
|
|
31
|
-
declare function SelectScrollDownArrow({ className, ref, ...props }: SelectScrollDownArrowProps): import("react
|
|
31
|
+
declare function SelectScrollDownArrow({ className, ref, ...props }: SelectScrollDownArrowProps): import("react").JSX.Element;
|
|
32
32
|
/**
|
|
33
33
|
* SelectContent
|
|
34
34
|
*/
|
|
35
35
|
export type SelectContentProps = ComponentProps<typeof SelectPrimitive.Popup> & {
|
|
36
36
|
sideOffset?: number;
|
|
37
37
|
};
|
|
38
|
-
declare function SelectContent({ className, children, sideOffset, ref, ...props }: SelectContentProps): import("react
|
|
38
|
+
declare function SelectContent({ className, children, sideOffset, ref, ...props }: SelectContentProps): import("react").JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* SelectLabel
|
|
41
41
|
*/
|
|
42
42
|
export type SelectLabelProps = ComponentProps<typeof SelectPrimitive.GroupLabel>;
|
|
43
|
-
declare function SelectLabel({ className, ref, ...props }: SelectLabelProps): import("react
|
|
43
|
+
declare function SelectLabel({ className, ref, ...props }: SelectLabelProps): import("react").JSX.Element;
|
|
44
44
|
/**
|
|
45
45
|
* SelectItem
|
|
46
46
|
*/
|
|
47
47
|
export type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item>;
|
|
48
|
-
declare function SelectItem({ className, children, ref, ...props }: SelectItemProps): import("react
|
|
48
|
+
declare function SelectItem({ className, children, ref, ...props }: SelectItemProps): import("react").JSX.Element;
|
|
49
49
|
/**
|
|
50
50
|
* SelectSeparator
|
|
51
51
|
*/
|
|
52
52
|
export type SelectSeparatorProps = ComponentProps<typeof SelectPrimitive.Separator>;
|
|
53
|
-
declare function SelectSeparator({ className, ref, ...props }: SelectSeparatorProps): import("react
|
|
53
|
+
declare function SelectSeparator({ className, ref, ...props }: SelectSeparatorProps): import("react").JSX.Element;
|
|
54
54
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -3,5 +3,5 @@ import type { ComponentProps } from "react";
|
|
|
3
3
|
* Skeleton
|
|
4
4
|
*/
|
|
5
5
|
export type SkeletonProps = ComponentProps<"div">;
|
|
6
|
-
declare function Skeleton({ className, ref, ...props }: SkeletonProps): import("react
|
|
6
|
+
declare function Skeleton({ className, ref, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
7
7
|
export { Skeleton };
|
|
@@ -34,5 +34,5 @@ export type SliderProps = ComponentProps<typeof SliderPrimitive.Root> & {
|
|
|
34
34
|
* @param {string} [props.className] - Additional CSS classes to apply to the slider
|
|
35
35
|
* @returns {JSX.Element} A slider component with optional tooltips and min/max display
|
|
36
36
|
*/
|
|
37
|
-
declare function Slider({ className, defaultValue, min, max, showMinMax, showTooltipValue, disabled: initialDisabled, onValueChange, ref, ...props }: SliderProps): import("react
|
|
37
|
+
declare function Slider({ className, defaultValue, min, max, showMinMax, showTooltipValue, disabled: initialDisabled, onValueChange, ref, ...props }: SliderProps): import("react").JSX.Element;
|
|
38
38
|
export { Slider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
3
3
|
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
4
|
import { Tooltip, TooltipContent, TooltipTrigger, } from "../tooltip/tooltip.js";
|
|
@@ -45,9 +45,7 @@ function Slider({ className, defaultValue, min = 0, max = 100, showMinMax = true
|
|
|
45
45
|
};
|
|
46
46
|
return (_jsxs(_Fragment, { children: [_jsx(SliderPrimitive.Root, { ref: ref, value: value, onValueChange: handleValueChange, className: cn("relative flex w-full touch-none select-none flex-col items-center", className), disabled: disabled, min: min, max: max, ...props, children: _jsx(SliderPrimitive.Control, { className: "flex w-full items-center", children: _jsxs(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow rounded-full bg-primary/20 data-disabled:opacity-50", children: [_jsx(SliderPrimitive.Indicator, { className: "absolute h-full bg-primary" }), value.map((thumbValue, index) => {
|
|
47
47
|
const thumbClassName = "block h-4 w-4 rounded-full border border-primary bg-surface shadow outline-none transition-colors focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-offset-surface data-disabled:pointer-events-none";
|
|
48
|
-
return showTooltipValue ? (
|
|
49
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs
|
|
50
|
-
_jsxs(Tooltip, { delayDuration: 0, children: [_jsx(TooltipTrigger, { render: _jsx(SliderPrimitive.Thumb, { index: index, className: thumbClassName }) }), _jsx(TooltipContent, { children: _jsx("p", { children: thumbValue }) })] }, index)) : (_jsx(SliderPrimitive.Thumb, { className: thumbClassName, index: index }, index));
|
|
48
|
+
return showTooltipValue ? (_jsxs(Tooltip, { delayDuration: 0, children: [_jsx(TooltipTrigger, { render: _jsx(SliderPrimitive.Thumb, { index: index, className: thumbClassName }) }), _jsx(TooltipContent, { children: _jsx("p", { children: thumbValue }) })] }, index)) : (_jsx(SliderPrimitive.Thumb, { className: thumbClassName, index: index }, index));
|
|
51
49
|
})] }) }) }), showMinMax && (_jsxs("div", { className: "mt-2 flex w-full flex-row justify-between", children: [_jsx("p", { children: min }), _jsx("p", { children: max })] }))] }));
|
|
52
50
|
}
|
|
53
51
|
export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AAU,EAAE,KAAK,EAAE,EAAE;gCAChC,MAAM,cAAc,GACnB,uNAAuN,CAAC;gCACzN,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAEzB,MAAC,OAAO,IAAa,aAAa,EAAE,CAAC,aACpC,KAAC,cAAc,IACd,MAAM,EACL,KAAC,eAAe,CAAC,KAAK,IACrB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,cAAc,GACxB,GAEF,EACF,KAAC,cAAc,cACd,sBAAI,UAAU,GAAK,GACH,KAXJ,KAAK,CAYT,CACV,CAAC,CAAC,CAAC,CACH,KAAC,eAAe,CAAC,KAAK,IACrB,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,KAAK,IAEP,KAAK,CACT,CACF,CAAC;4BACH,CAAC,CAAC,IACqB,GACC,GACJ,EACtB,UAAU,IAAI,CACd,eAAK,SAAS,EAAC,2CAA2C,aACzD,sBAAI,GAAG,GAAK,EACZ,sBAAI,GAAG,GAAK,IACP,CACN,IACC,CACH,CAAC;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { Slider as SliderPrimitive } from \"@base-ui/react/slider\";\nimport { useFormContext } from \"@components/form-field/form-field-context\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@components/tooltip/tooltip\";\nimport { cn } from \"@utilities/cn/cn\";\nimport type { ComponentProps } from \"react\";\nimport { useState } from \"react\";\n\nexport type SliderProps = ComponentProps<typeof SliderPrimitive.Root> & {\n\t/**\n\t * Whether to show the minimum and maximum values below the slider\n\t * @default true\n\t */\n\tshowMinMax?: boolean;\n\t/**\n\t * Whether to show the current value in a tooltip on each thumb\n\t * @default true\n\t */\n\tshowTooltipValue?: boolean;\n};\n\n/**\n * A customizable slider component built on top of Base UI's slider primitive.\n *\n * @example\n * ```tsx\n * <Slider\n * min={0}\n * max={100}\n * defaultValue={50}\n * showMinMax={true}\n * />\n * ```\n *\n * @param {Object} props - The props for the Slider component\n * @param {number | number[]} [props.defaultValue] - The initial value of the slider\n * @param {number} [props.min=0] - The minimum value of the slider\n * @param {number} [props.max=100] - The maximum value of the slider\n * @param {boolean} [props.showMinMax=true] - Whether to show min/max values below the slider\n * @param {boolean} [props.showTooltipValue=true] - Whether to show the value in a tooltip on each thumb\n * @param {string} [props.className] - Additional CSS classes to apply to the slider\n * @returns {JSX.Element} A slider component with optional tooltips and min/max display\n */\nfunction Slider({\n\tclassName,\n\tdefaultValue,\n\tmin = 0,\n\tmax = 100,\n\tshowMinMax = true,\n\tshowTooltipValue = true,\n\tdisabled: initialDisabled,\n\tonValueChange,\n\tref,\n\t...props\n}: SliderProps) {\n\tconst normalizedDefault = Array.isArray(defaultValue)\n\t\t? defaultValue\n\t\t: defaultValue !== undefined\n\t\t\t? [defaultValue]\n\t\t\t: [0];\n\n\tconst [value, setValue] = useState<number[]>(normalizedDefault);\n\tconst { disabled } = useFormContext({\n\t\tdisabled: initialDisabled,\n\t});\n\n\tconst handleValueChange = (\n\t\tnewValue: number | readonly number[],\n\t\tevent: SliderPrimitive.Root.ChangeEventDetails,\n\t) => {\n\t\tconst normalizedValue = Array.isArray(newValue)\n\t\t\t? [...newValue]\n\t\t\t: [newValue];\n\t\tsetValue(normalizedValue);\n\t\tonValueChange?.(newValue, event);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SliderPrimitive.Root\n\t\t\t\tref={ref}\n\t\t\t\tvalue={value}\n\t\t\t\tonValueChange={handleValueChange}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"relative flex w-full touch-none select-none flex-col items-center\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tmin={min}\n\t\t\t\tmax={max}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SliderPrimitive.Control className=\"flex w-full items-center\">\n\t\t\t\t\t<SliderPrimitive.Track className=\"relative h-1.5 w-full grow rounded-full bg-primary/20 data-disabled:opacity-50\">\n\t\t\t\t\t\t<SliderPrimitive.Indicator className=\"absolute h-full bg-primary\" />\n\t\t\t\t\t\t{value.map((thumbValue, index) => {\n\t\t\t\t\t\t\tconst thumbClassName =\n\t\t\t\t\t\t\t\t\"block h-4 w-4 rounded-full border border-primary bg-surface shadow outline-none transition-colors focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-offset-surface data-disabled:pointer-events-none\";\n\t\t\t\t\t\t\treturn showTooltipValue ? (\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs\n\t\t\t\t\t\t\t\t<Tooltip key={index} delayDuration={0}>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<SliderPrimitive.Thumb\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={thumbClassName}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<p>{thumbValue}</p>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<SliderPrimitive.Thumb\n\t\t\t\t\t\t\t\t\tclassName={thumbClassName}\n\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs\n\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</SliderPrimitive.Track>\n\t\t\t\t</SliderPrimitive.Control>\n\t\t\t</SliderPrimitive.Root>\n\t\t\t{showMinMax && (\n\t\t\t\t<div className=\"mt-2 flex w-full flex-row justify-between\">\n\t\t\t\t\t<p>{min}</p>\n\t\t\t\t\t<p>{max}</p>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n}\n\nexport { Slider };\n"]}
|
|
@@ -38,4 +38,4 @@ export type SwitchProps = Omit<SwitchPrimitive.Root.Props, "className"> & {
|
|
|
38
38
|
* @param {boolean} [props.disabled] - Whether the switch is disabled
|
|
39
39
|
* @param {string} [props.className] - Additional CSS classes to apply
|
|
40
40
|
*/
|
|
41
|
-
export declare function Switch({ className, disabled: initialDisabled, size, error: initialError, ref, ...props }: SwitchProps): import("react
|
|
41
|
+
export declare function Switch({ className, disabled: initialDisabled, size, error: initialError, ref, ...props }: SwitchProps): import("react").JSX.Element;
|
|
@@ -3,40 +3,40 @@ import type { ComponentProps } from "react";
|
|
|
3
3
|
* Table
|
|
4
4
|
*/
|
|
5
5
|
export type TableProps = ComponentProps<"table">;
|
|
6
|
-
declare function Table({ className, ref, ...props }: TableProps): import("react
|
|
6
|
+
declare function Table({ className, ref, ...props }: TableProps): import("react").JSX.Element;
|
|
7
7
|
/**
|
|
8
8
|
* TableHeader
|
|
9
9
|
*/
|
|
10
10
|
export type TableHeaderProps = ComponentProps<"thead">;
|
|
11
|
-
declare function TableHeader({ className, ref, ...props }: TableHeaderProps): import("react
|
|
11
|
+
declare function TableHeader({ className, ref, ...props }: TableHeaderProps): import("react").JSX.Element;
|
|
12
12
|
/**
|
|
13
13
|
* TableBody
|
|
14
14
|
*/
|
|
15
15
|
export type TableBodyProps = ComponentProps<"tbody">;
|
|
16
|
-
declare function TableBody({ className, ref, ...props }: TableBodyProps): import("react
|
|
16
|
+
declare function TableBody({ className, ref, ...props }: TableBodyProps): import("react").JSX.Element;
|
|
17
17
|
/**
|
|
18
18
|
* TableFooter
|
|
19
19
|
*/
|
|
20
20
|
export type TableFooterProps = ComponentProps<"tfoot">;
|
|
21
|
-
declare function TableFooter({ className, ref, ...props }: TableFooterProps): import("react
|
|
21
|
+
declare function TableFooter({ className, ref, ...props }: TableFooterProps): import("react").JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
* TableRow
|
|
24
24
|
*/
|
|
25
25
|
export type TableRowProps = ComponentProps<"tr">;
|
|
26
|
-
declare function TableRow({ className, ref, ...props }: TableRowProps): import("react
|
|
26
|
+
declare function TableRow({ className, ref, ...props }: TableRowProps): import("react").JSX.Element;
|
|
27
27
|
/**
|
|
28
28
|
* TableHead
|
|
29
29
|
*/
|
|
30
30
|
export type TableHeadProps = ComponentProps<"th">;
|
|
31
|
-
declare function TableHead({ className, ref, ...props }: TableHeadProps): import("react
|
|
31
|
+
declare function TableHead({ className, ref, ...props }: TableHeadProps): import("react").JSX.Element;
|
|
32
32
|
/**
|
|
33
33
|
* TableCell
|
|
34
34
|
*/
|
|
35
35
|
export type TableCellProps = ComponentProps<"td">;
|
|
36
|
-
declare function TableCell({ className, ref, ...props }: TableCellProps): import("react
|
|
36
|
+
declare function TableCell({ className, ref, ...props }: TableCellProps): import("react").JSX.Element;
|
|
37
37
|
/**
|
|
38
38
|
* TableCaption
|
|
39
39
|
*/
|
|
40
40
|
export type TableCaptionProps = ComponentProps<"caption">;
|
|
41
|
-
declare function TableCaption({ className, ref, ...props }: TableCaptionProps): import("react
|
|
41
|
+
declare function TableCaption({ className, ref, ...props }: TableCaptionProps): import("react").JSX.Element;
|
|
42
42
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, };
|
|
@@ -10,10 +10,10 @@ function TableBody({ className, ref, ...props }) {
|
|
|
10
10
|
return (_jsx("tbody", { ref: ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
11
11
|
}
|
|
12
12
|
function TableFooter({ className, ref, ...props }) {
|
|
13
|
-
return (_jsx("tfoot", { ref: ref, className: cn("border-t bg-surface-muted font-medium [&>tr]:bg-surface-muted! [&>tr]:text-text-secondary! [&>tr]:last:border-b-0", className), ...props }));
|
|
13
|
+
return (_jsx("tfoot", { ref: ref, className: cn("border-border border-t bg-surface-muted font-medium [&>tr]:bg-surface-muted! [&>tr]:text-text-secondary! [&>tr]:last:border-b-0", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
function TableRow({ className, ref, ...props }) {
|
|
16
|
-
return (_jsx("tr", { ref: ref, className: cn("border-b transition-colors data-[state=selected]:bg-indicator data-[state=selected]:text-on-primary", className), ...props }));
|
|
16
|
+
return (_jsx("tr", { ref: ref, className: cn("border-border border-b transition-colors data-[state=selected]:bg-indicator data-[state=selected]:text-on-primary", className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function TableHead({ className, ref, ...props }) {
|
|
19
19
|
return (_jsx("th", { ref: ref, className: cn("h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"/","sources":["components/table/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAStC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAc;IACtD,OAAO,CACN,cAAK,SAAS,EAAC,+BAA+B,YAC7C,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"/","sources":["components/table/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAStC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAc;IACtD,OAAO,CACN,cAAK,SAAS,EAAC,+BAA+B,YAC7C,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,iIAAiI,EACjI,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAiB;IAC5D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,mHAAmH,EACnH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,sFAAsF,EACtF,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAqB;IACpE,OAAO,CACN,kBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EACN,KAAK,EACL,SAAS,EACT,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,GACR,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport type { ComponentProps } from \"react\";\n\n/**\n * Table\n */\n\nexport type TableProps = ComponentProps<\"table\">;\n\nfunction Table({ className, ref, ...props }: TableProps) {\n\treturn (\n\t\t<div className=\"relative w-full overflow-auto\">\n\t\t\t<table\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n/**\n * TableHeader\n */\n\nexport type TableHeaderProps = ComponentProps<\"thead\">;\n\nfunction TableHeader({ className, ref, ...props }: TableHeaderProps) {\n\treturn (\n\t\t<thead\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"[&_tr]:border-b [&_tr]:bg-primary! [&_tr]:text-on-primary [&_tr]:hover:bg-primary! [&_tr]:hover:text-on-primary!\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableBody\n */\n\nexport type TableBodyProps = ComponentProps<\"tbody\">;\n\nfunction TableBody({ className, ref, ...props }: TableBodyProps) {\n\treturn (\n\t\t<tbody\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableFooter\n */\n\nexport type TableFooterProps = ComponentProps<\"tfoot\">;\n\nfunction TableFooter({ className, ref, ...props }: TableFooterProps) {\n\treturn (\n\t\t<tfoot\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-border border-t bg-surface-muted font-medium [&>tr]:bg-surface-muted! [&>tr]:text-text-secondary! [&>tr]:last:border-b-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableRow\n */\n\nexport type TableRowProps = ComponentProps<\"tr\">;\n\nfunction TableRow({ className, ref, ...props }: TableRowProps) {\n\treturn (\n\t\t<tr\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-border border-b transition-colors data-[state=selected]:bg-indicator data-[state=selected]:text-on-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableHead\n */\n\nexport type TableHeadProps = ComponentProps<\"th\">;\n\nfunction TableHead({ className, ref, ...props }: TableHeadProps) {\n\treturn (\n\t\t<th\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableCell\n */\n\nexport type TableCellProps = ComponentProps<\"td\">;\n\nfunction TableCell({ className, ref, ...props }: TableCellProps) {\n\treturn (\n\t\t<td\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableCaption\n */\n\nexport type TableCaptionProps = ComponentProps<\"caption\">;\n\nfunction TableCaption({ className, ref, ...props }: TableCaptionProps) {\n\treturn (\n\t\t<caption\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"mt-4 text-start text-sm text-text-muted\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tTable,\n\tTableBody,\n\tTableCaption,\n\tTableCell,\n\tTableFooter,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n};\n"]}
|
|
@@ -2,9 +2,9 @@ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
declare const Tabs: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export type TabsListProps = ComponentProps<typeof TabsPrimitive.List>;
|
|
5
|
-
declare function TabsList({ className, ref, ...props }: TabsListProps): import("react
|
|
5
|
+
declare function TabsList({ className, ref, ...props }: TabsListProps): import("react").JSX.Element;
|
|
6
6
|
export type TabsTriggerProps = ComponentProps<typeof TabsPrimitive.Tab>;
|
|
7
|
-
declare function TabsTrigger({ className, ref, ...props }: TabsTriggerProps): import("react
|
|
7
|
+
declare function TabsTrigger({ className, ref, ...props }: TabsTriggerProps): import("react").JSX.Element;
|
|
8
8
|
export type TabsContentProps = ComponentProps<typeof TabsPrimitive.Panel>;
|
|
9
|
-
declare function TabsContent({ className, ref, ...props }: TabsContentProps): import("react
|
|
9
|
+
declare function TabsContent({ className, ref, ...props }: TabsContentProps): import("react").JSX.Element;
|
|
10
10
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -2,4 +2,4 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
export type TextareaProps = ComponentProps<"textarea"> & {
|
|
3
3
|
error?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare function Textarea({ className, error, disabled, ref, ...props }: TextareaProps): import("react
|
|
5
|
+
export declare function Textarea({ className, error, disabled, ref, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -23,5 +23,5 @@ export type ToastProps = {
|
|
|
23
23
|
declare function toast(toast: Omit<ToastProps, "id">): string | number;
|
|
24
24
|
declare const Toaster: import("react").ForwardRefExoticComponent<ToasterProps & import("react").RefAttributes<HTMLElement>>;
|
|
25
25
|
/** A fully custom toast built on top of sonner. */
|
|
26
|
-
declare function Toast({ title, description, button, id, ref }: ToastProps): import("react
|
|
26
|
+
declare function Toast({ title, description, button, id, ref }: ToastProps): import("react").JSX.Element;
|
|
27
27
|
export { Toast, Toaster, toast };
|
|
@@ -26,19 +26,19 @@ export type TooltipProps = ComponentProps<typeof TooltipPrimitive.Root> & {
|
|
|
26
26
|
* </Tooltip>
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
declare function Tooltip({ children, showArrow, side, sideOffset, delayDuration, ...props }: TooltipProps): import("react
|
|
29
|
+
declare function Tooltip({ children, showArrow, side, sideOffset, delayDuration, ...props }: TooltipProps): import("react").JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* Tooltip Trigger
|
|
32
32
|
*/
|
|
33
33
|
export type TooltipTriggerProps = ComponentProps<typeof TooltipPrimitive.Trigger> & {
|
|
34
34
|
render?: React.ReactElement;
|
|
35
35
|
};
|
|
36
|
-
declare function TooltipTrigger({ render, children, ref, ...props }: TooltipTriggerProps): import("react
|
|
36
|
+
declare function TooltipTrigger({ render, children, ref, ...props }: TooltipTriggerProps): import("react").JSX.Element;
|
|
37
37
|
/**
|
|
38
38
|
* Tooltip Content
|
|
39
39
|
*/
|
|
40
40
|
export type TooltipContentProps = ComponentProps<typeof TooltipPrimitive.Popup> & {
|
|
41
41
|
showArrow?: boolean;
|
|
42
42
|
};
|
|
43
|
-
declare function TooltipContent({ className, children, ref, ...props }: TooltipContentProps): import("react
|
|
43
|
+
declare function TooltipContent({ className, children, ref, ...props }: TooltipContentProps): import("react").JSX.Element;
|
|
44
44
|
export { Tooltip, TooltipContent, TooltipTrigger };
|
|
@@ -3,5 +3,5 @@ type TruncatedElementsOptions = {
|
|
|
3
3
|
page: number;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export declare const getTruncatedElements: ({ page, children, }: TruncatedElementsOptions) => ReactNode[] | (string | number | bigint | Iterable<ReactNode> | Promise<string | number | bigint | boolean |
|
|
6
|
+
export declare const getTruncatedElements: ({ page, children, }: TruncatedElementsOptions) => ReactNode[] | (string | number | bigint | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined>)[];
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-navigation.js","sourceRoot":"/","sources":["utilities/pagination/keyboard-navigation.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACvC,CAAgB,EAChB,IAAqD,EACrD,UAAkB,EACjB,EAAE;IACH,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAO;IAE/B,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CA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AAS,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QAClE,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC;IACtC,CAAC;AACF,CAAC,CAAC","sourcesContent":["export const handleKeyboardNavigation = (\n\te: KeyboardEvent,\n\trefs: React.RefObject<Map<number, HTMLButtonElement>>,\n\ttotalPages: number,\n) => {\n\tif (!refs.current.size) return;\n\n\tconst currentFocusedIndex = Array.from(refs.current.entries()).find(\n\t\t([_, el]) => el === document.activeElement,\n\t)?.[0];\n\n\tif (currentFocusedIndex === undefined) return;\n\n\tlet nextIndex: number | undefined;\n\n\tswitch (e.key) {\n\t\tcase \"ArrowLeft\":\n\t\tcase \"ArrowUp\": {\n\t\t\tif (currentFocusedIndex === 0) {\n\t\t\t\tnextIndex = totalPages;\n\t\t\t} else if (currentFocusedIndex === totalPages + 1) {\n\t\t\t\tnextIndex = totalPages;\n\t\t\t} else if (currentFocusedIndex === 1) {\n\t\t\t\tnextIndex = 0;\n\t\t\t} else {\n\t\t\t\t// Find the next available index to the left\n\t\t\t\tfor (let i = currentFocusedIndex - 1; i >= 0; i--) {\n\t\t\t\t\tif (refs.current.has(i)) {\n\t\t\t\t\t\tnextIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If no index found to the left, try wrapping to the end\n\t\t\t\tif (nextIndex === undefined) {\n\t\t\t\t\tnextIndex = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"ArrowRight\":\n\t\tcase \"ArrowDown\": {\n\t\t\tif (currentFocusedIndex === 0) {\n\t\t\t\tnextIndex = 1;\n\t\t\t} else if (currentFocusedIndex === totalPages) {\n\t\t\t\tnextIndex = totalPages + 1;\n\t\t\t} else {\n\t\t\t\t// Find the next available index to the right\n\t\t\t\tfor (let i = currentFocusedIndex + 1; i <= totalPages + 1; i++) {\n\t\t\t\t\tif (refs.current.has(i)) {\n\t\t\t\t\t\tnextIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If no index found to the right, try wrapping to the start\n\t\t\t\tif (nextIndex === undefined) {\n\t\t\t\t\tnextIndex = totalPages + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"Home\":\n\t\t\tnextIndex = 1;\n\t\t\tbreak;\n\t\tcase \"End\":\n\t\t\tnextIndex = totalPages;\n\t\t\tbreak;\n\t}\n\n\tif (nextIndex !== undefined && nextIndex !== currentFocusedIndex) {\n\t\te.preventDefault();\n\t\trefs.current.get(nextIndex)?.focus();\n\t}\n};\n"]}
|
|
@@ -4,15 +4,17 @@ export declare const getVariants: {
|
|
|
4
4
|
<T extends import("responsive-class-variants/dist/types").VariantConfig = Record<never, import("responsive-class-variants/dist/types").VariantValue>, S extends Record<string, import("responsive-class-variants/dist/types").SlotConfig> = Record<string, import("responsive-class-variants/dist/types").ClassValue>>(config: {
|
|
5
5
|
slots: S;
|
|
6
6
|
variants?: T | undefined;
|
|
7
|
-
compoundVariants?: import("responsive-class-variants/dist/types").CompoundVariantWithSlots<T, keyof S & string, "
|
|
7
|
+
compoundVariants?: import("responsive-class-variants/dist/types").CompoundVariantWithSlots<T, keyof S & string, "lg" | "md" | "sm" | "xl">[] | undefined;
|
|
8
|
+
breakpoints?: readonly ("lg" | "md" | "sm" | "xl")[] | undefined;
|
|
8
9
|
onComplete?: (classes: string) => string;
|
|
9
|
-
}): () => { [K in keyof S]: (props?: import("responsive-class-variants/dist/types").VariantProps<T, "
|
|
10
|
+
}): () => { [K in keyof S]: (props?: import("responsive-class-variants/dist/types").VariantProps<T, "lg" | "md" | "sm" | "xl"> | undefined) => string; };
|
|
10
11
|
<T extends import("responsive-class-variants/dist/types").VariantConfig = Record<never, import("responsive-class-variants/dist/types").VariantValue>>(config: {
|
|
11
12
|
base: string;
|
|
12
13
|
variants?: T | undefined;
|
|
13
|
-
compoundVariants?: Partial<import("responsive-class-variants/dist/types").VariantProps<T, "
|
|
14
|
+
compoundVariants?: Partial<import("responsive-class-variants/dist/types").VariantProps<T, "lg" | "md" | "sm" | "xl">>[] | undefined;
|
|
15
|
+
breakpoints?: readonly ("lg" | "md" | "sm" | "xl")[] | undefined;
|
|
14
16
|
onComplete?: (classes: string) => string;
|
|
15
|
-
}): (props?: import("responsive-class-variants/dist/types").VariantProps<T, "
|
|
17
|
+
}): (props?: import("responsive-class-variants/dist/types").VariantProps<T, "lg" | "md" | "sm" | "xl"> | undefined) => string;
|
|
16
18
|
};
|
|
17
19
|
export type Breakpoints = (typeof breakpoints)[number];
|
|
18
20
|
export type ResponsiveValue<T> = RcvResponsiveValue<T, Breakpoints>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luan-ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "A UI library for React",
|
|
5
5
|
"author": "benebene84 <benedikt.sperl@gmail.com> (https://github.com/benebene84)",
|
|
6
6
|
"main": "/dist/index.js",
|
|
@@ -33,41 +33,41 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/benebene84/luan-ui#readme",
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@biomejs/biome": "2.
|
|
37
|
-
"@chromatic-com/storybook": "^5.
|
|
38
|
-
"@storybook/addon-docs": "^10.
|
|
39
|
-
"@storybook/addon-onboarding": "^10.
|
|
40
|
-
"@storybook/react-vite": "^10.
|
|
41
|
-
"@tailwindcss/postcss": "^4.
|
|
42
|
-
"@tailwindcss/vite": "^4.
|
|
36
|
+
"@biomejs/biome": "2.5.12",
|
|
37
|
+
"@chromatic-com/storybook": "^5.3.1",
|
|
38
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
39
|
+
"@storybook/addon-onboarding": "^10.6.0",
|
|
40
|
+
"@storybook/react-vite": "^10.6.0",
|
|
41
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
42
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
43
43
|
"@testing-library/dom": "^10.4.1",
|
|
44
|
-
"@testing-library/jest-dom": "^
|
|
45
|
-
"@testing-library/react": "^16.3.
|
|
46
|
-
"@testing-library/user-event": "^14.6.
|
|
47
|
-
"@types/node": "^
|
|
48
|
-
"@types/react": "^19.2.
|
|
49
|
-
"@types/react-dom": "^19.2.
|
|
50
|
-
"@vitejs/plugin-react": "^6.
|
|
51
|
-
"jsdom": "^
|
|
52
|
-
"lefthook": "^2.1.
|
|
53
|
-
"responsive-class-variants": "^1.
|
|
54
|
-
"storybook": "^10.
|
|
55
|
-
"tailwindcss": "^4.
|
|
56
|
-
"tsc-alias": "^1.
|
|
57
|
-
"typescript": "^
|
|
58
|
-
"vite": "^8.
|
|
59
|
-
"vitest": "^
|
|
44
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
45
|
+
"@testing-library/react": "^16.3.3",
|
|
46
|
+
"@testing-library/user-event": "^14.6.7",
|
|
47
|
+
"@types/node": "^26.4.1",
|
|
48
|
+
"@types/react": "^19.2.18",
|
|
49
|
+
"@types/react-dom": "^19.2.7",
|
|
50
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
51
|
+
"jsdom": "^30.0.1",
|
|
52
|
+
"lefthook": "^2.1.12",
|
|
53
|
+
"responsive-class-variants": "^1.4.1",
|
|
54
|
+
"storybook": "^10.6.0",
|
|
55
|
+
"tailwindcss": "^4.3.3",
|
|
56
|
+
"tsc-alias": "^1.9.4",
|
|
57
|
+
"typescript": "^7.0.2",
|
|
58
|
+
"vite": "^8.2.2",
|
|
59
|
+
"vitest": "^5.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": "^19.0.0",
|
|
63
63
|
"react-dom": "^19.0.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@base-ui/react": "^1.
|
|
66
|
+
"@base-ui/react": "^1.8.0",
|
|
67
67
|
"@radix-ui/react-icons": "^1.3.2",
|
|
68
68
|
"clsx": "^2.1.1",
|
|
69
|
-
"sonner": "^2.0.
|
|
70
|
-
"tailwind-merge": "^3.
|
|
69
|
+
"sonner": "^2.0.8",
|
|
70
|
+
"tailwind-merge": "^3.6.0"
|
|
71
71
|
},
|
|
72
|
-
"packageManager": "pnpm@
|
|
72
|
+
"packageManager": "pnpm@12.3.4"
|
|
73
73
|
}
|