rupoui 1.3.2 → 1.3.3
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 +13 -13
- package/dist/components/button/Button.d.ts +6 -3
- package/dist/components/button/button.styles.d.ts +176 -162
- package/dist/components/button/button.types.d.ts +14 -14
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/calendar/Calendar.d.ts +3 -2
- package/dist/components/calendar/calendar.grid.d.ts +5 -2
- package/dist/components/calendar/calendar.navigation.d.ts +1 -1
- package/dist/components/calendar/calendar.selection.d.ts +6 -2
- package/dist/components/calendar/calendar.state.d.ts +1 -1
- package/dist/components/calendar/calendar.styles.d.ts +106 -83
- package/dist/components/calendar/calendar.types.d.ts +39 -39
- package/dist/components/calendar/index.d.ts +3 -3
- package/dist/components/checkbox/Checkbox.d.ts +4 -2
- package/dist/components/checkbox/CheckboxGroup.d.ts +4 -2
- package/dist/components/checkbox/checkbox-group-context.d.ts +12 -12
- package/dist/components/checkbox/checkbox.styles.d.ts +313 -285
- package/dist/components/checkbox/checkbox.types.d.ts +161 -154
- package/dist/components/checkbox/index.d.ts +3 -3
- package/dist/components/checkbox/useCheckbox.d.ts +389 -311
- package/dist/components/checkbox/useCheckboxGroup.d.ts +353 -280
- package/dist/components/chip/Chip.d.ts +4 -2
- package/dist/components/chip/ChipGroup.d.ts +4 -2
- package/dist/components/chip/chip-group-context.d.ts +9 -6
- package/dist/components/chip/chip.styles.d.ts +206 -192
- package/dist/components/chip/chip.types.d.ts +155 -149
- package/dist/components/chip/index.d.ts +5 -5
- package/dist/components/chip/useChip.d.ts +22 -20
- package/dist/components/chip/useChipGroup.d.ts +350 -277
- package/dist/components/datepicker/DatePart.d.ts +16 -14
- package/dist/components/datepicker/DatePicker.d.ts +17 -16
- package/dist/components/datepicker/DatePickerCalendar.d.ts +8 -7
- package/dist/components/datepicker/DatePickerDay.d.ts +11 -9
- package/dist/components/datepicker/DatePickerInput.d.ts +16 -15
- package/dist/components/datepicker/DatePickerPopover.d.ts +7 -6
- package/dist/components/datepicker/SegmentedDatePickerInput.d.ts +9 -8
- package/dist/components/datepicker/datepicker.controller.d.ts +6 -2
- package/dist/components/datepicker/datepicker.input.logic.d.ts +16 -6
- package/dist/components/datepicker/datepicker.input.state.d.ts +1 -1
- package/dist/components/datepicker/datepicker.input.types.d.ts +20 -20
- package/dist/components/datepicker/datepicker.keyboard.d.ts +6 -2
- package/dist/components/datepicker/datepicker.state.d.ts +1 -1
- package/dist/components/datepicker/datepicker.styles.d.ts +118 -95
- package/dist/components/datepicker/datepicker.types.d.ts +52 -52
- package/dist/components/datepicker/index.d.ts +5 -5
- package/dist/components/dropdown/Dropdown.d.ts +3 -2
- package/dist/components/dropdown/DropdownContent.d.ts +3 -2
- package/dist/components/dropdown/DropdownItem.d.ts +3 -2
- package/dist/components/dropdown/DropdownSection.d.ts +3 -2
- package/dist/components/dropdown/DropdownSeparator.d.ts +3 -2
- package/dist/components/dropdown/DropdownTrigger.d.ts +3 -2
- package/dist/components/dropdown/context.d.ts +22 -21
- package/dist/components/dropdown/dropdown.styles.d.ts +180 -166
- package/dist/components/dropdown/dropdown.types.d.ts +97 -85
- package/dist/components/dropdown/index.d.ts +9 -9
- package/dist/components/dropdown/useDropdown.d.ts +15 -15
- package/dist/components/input/Input.d.ts +9 -4
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/input.styles.d.ts +239 -225
- package/dist/components/input/input.types.d.ts +60 -58
- package/dist/components/input-number/InputNumber.d.ts +24 -5
- package/dist/components/input-number/index.d.ts +2 -2
- package/dist/components/input-number/input-number.styles.d.ts +331 -317
- package/dist/components/input-number/input-number.types.d.ts +132 -116
- package/dist/components/input-number/utils.d.ts +11 -3
- package/dist/components/modal/Modal.d.ts +4 -3
- package/dist/components/modal/ModalContent.d.ts +7 -3
- package/dist/components/modal/ModalLayout.d.ts +16 -4
- package/dist/components/modal/ModalTrigger.d.ts +5 -3
- package/dist/components/modal/context.d.ts +8 -8
- package/dist/components/modal/index.d.ts +6 -6
- package/dist/components/modal/modal.styles.d.ts +233 -219
- package/dist/components/modal/modal.types.d.ts +35 -34
- package/dist/components/modal/useModal.d.ts +7 -7
- package/dist/components/pagination/Pagination.d.ts +6 -3
- package/dist/components/pagination/PaginationContent.d.ts +6 -3
- package/dist/components/pagination/PaginationContext.d.ts +54 -54
- package/dist/components/pagination/PaginationEllipsis.d.ts +6 -3
- package/dist/components/pagination/PaginationItem.d.ts +6 -3
- package/dist/components/pagination/PaginationItems.d.ts +2 -2
- package/dist/components/pagination/PaginationNext.d.ts +6 -3
- package/dist/components/pagination/PaginationPrevious.d.ts +6 -3
- package/dist/components/pagination/index.d.ts +18 -9
- package/dist/components/pagination/pagination.styles.d.ts +147 -133
- package/dist/components/pagination/pagination.types.d.ts +125 -121
- package/dist/components/pagination/usePagination.d.ts +25 -20
- package/dist/components/popover/Popover.d.ts +3 -2
- package/dist/components/popover/PopoverContent.d.ts +3 -2
- package/dist/components/popover/PopoverContext.d.ts +103 -83
- package/dist/components/popover/PopoverTrigger.d.ts +3 -2
- package/dist/components/popover/index.d.ts +6 -6
- package/dist/components/popover/popover.styles.d.ts +122 -108
- package/dist/components/popover/popover.types.d.ts +96 -95
- package/dist/components/popover/usePopover.d.ts +52 -42
- package/dist/components/radio/Radio.d.ts +4 -2
- package/dist/components/radio/RadioGroup.d.ts +4 -2
- package/dist/components/radio/index.d.ts +3 -3
- package/dist/components/radio/radio-group-context.d.ts +12 -12
- package/dist/components/radio/radio.styles.d.ts +306 -278
- package/dist/components/radio/radio.types.d.ts +145 -138
- package/dist/components/radio/useRadio.d.ts +391 -311
- package/dist/components/radio/useRadioGroup.d.ts +354 -281
- package/dist/components/ripple/Ripple.d.ts +9 -9
- package/dist/components/select/Select.d.ts +6 -3
- package/dist/components/select/SelectItem.d.ts +15 -4
- package/dist/components/select/index.d.ts +5 -5
- package/dist/components/select/select.styles.d.ts +224 -210
- package/dist/components/select/select.types.d.ts +51 -50
- package/dist/components/select/useSelect.d.ts +16 -16
- package/dist/components/spinner/Spinner.d.ts +9 -3
- package/dist/components/spinner/index.d.ts +2 -2
- package/dist/components/spinner/spinner.styles.d.ts +91 -77
- package/dist/components/spinner/spinner.types.d.ts +4 -4
- package/dist/components/switch/Switch.d.ts +4 -2
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/switch.styles.d.ts +147 -133
- package/dist/components/switch/switch.types.d.ts +84 -80
- package/dist/components/switch/useSwitch.d.ts +389 -311
- package/dist/components/tabs/Tab.d.ts +1 -1
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +4 -4
- package/dist/components/tabs/tabs.styles.d.ts +341 -327
- package/dist/components/tabs/tabs.types.d.ts +67 -66
- package/dist/components/tabs/useTabs.d.ts +4 -4
- package/dist/components/textarea/Textarea.d.ts +9 -4
- package/dist/components/textarea/index.d.ts +2 -2
- package/dist/components/textarea/textarea.styles.d.ts +276 -262
- package/dist/components/textarea/textarea.types.d.ts +57 -55
- package/dist/components/toast/Toast.d.ts +8 -4
- package/dist/components/toast/ToastProvider.d.ts +8 -4
- package/dist/components/toast/ToastViewport.d.ts +14 -4
- package/dist/components/toast/Toaster.d.ts +4 -2
- package/dist/components/toast/index.d.ts +7 -7
- package/dist/components/toast/toast-store.d.ts +10 -10
- package/dist/components/toast/toast-subcomponents.d.ts +10 -4
- package/dist/components/toast/toast.types.d.ts +18 -18
- package/dist/components/toast/use-toast-internal.d.ts +1 -1
- package/dist/components/toast/utils.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/tooltip/tooltip.styles.d.ts +187 -173
- package/dist/components/tooltip/tooltip.types.d.ts +85 -72
- package/dist/components/tooltip/useTooltip.d.ts +25 -25
- package/dist/components/tooltip/utils.d.ts +24 -13
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/useDisclosure.d.ts +10 -10
- package/dist/hooks/useFocusTrap.d.ts +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +24 -25
- package/dist/index.js +1697 -1632
- package/dist/motion/focus.d.ts +6 -6
- package/dist/motion/hover.d.ts +8 -8
- package/dist/motion/index.d.ts +5 -5
- package/dist/motion/press.d.ts +7 -7
- package/dist/motion/reveal.d.ts +16 -16
- package/dist/motion/tokens.d.ts +9 -9
- package/dist/provider/RupoUIContext.d.ts +2 -2
- package/dist/provider/RupoUIProvider.d.ts +9 -5
- package/dist/provider/types.d.ts +46 -25
- package/dist/provider/useRupoUI.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/tokens/colors.d.ts +24 -24
- package/dist/styles/tokens/index.d.ts +5 -5
- package/dist/styles/tokens/motion.d.ts +9 -9
- package/dist/styles/tokens/radius.d.ts +6 -6
- package/dist/styles/tokens/spacing.d.ts +11 -11
- package/dist/styles/tokens/typography.d.ts +64 -32
- package/dist/tailwind/index.d.ts +7 -7
- package/dist/tailwind/plugin-utils.d.ts +1 -1
- package/dist/tailwind/theme.d.ts +1 -1
- package/package.json +11 -2
- package/dist/components/toast/ToastDemo.d.ts +0 -1
|
@@ -1,135 +1,139 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { VariantProps } from
|
|
4
|
-
|
|
1
|
+
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { VariantProps } from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
import { pagination } from "./pagination.styles";
|
|
5
6
|
|
|
6
7
|
export type PaginationVariants = VariantProps<typeof pagination>;
|
|
7
8
|
export interface PaginationProps extends Omit<PaginationVariants, "isDisabled"> {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Current page (controlled)
|
|
11
|
+
*/
|
|
12
|
+
page?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Default page (uncontrolled)
|
|
15
|
+
* @default 1
|
|
16
|
+
*/
|
|
17
|
+
defaultPage?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Total number of pages
|
|
20
|
+
*/
|
|
21
|
+
totalPages: number;
|
|
22
|
+
/**
|
|
23
|
+
* Callback when page changes
|
|
24
|
+
*/
|
|
25
|
+
onPageChange?: (page: number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Number of pages to show on each side of current page
|
|
28
|
+
* @default 1
|
|
29
|
+
*/
|
|
30
|
+
siblingCount?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Number of pages to show at start and end
|
|
33
|
+
* @default 1
|
|
34
|
+
*/
|
|
35
|
+
boundaryCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Whether pagination is disabled
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show previous button
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
showPrevious?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to show next button
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
showNext?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Custom class names for slots
|
|
53
|
+
*/
|
|
54
|
+
classNames?: Partial<Record<keyof ReturnType<typeof pagination>, string>>;
|
|
55
|
+
/**
|
|
56
|
+
* Additional className
|
|
57
|
+
*/
|
|
58
|
+
className?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Children (for custom rendering)
|
|
61
|
+
*/
|
|
62
|
+
children?: ReactNode;
|
|
62
63
|
}
|
|
63
64
|
export interface PaginationContentProps {
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
className?: string;
|
|
66
67
|
}
|
|
67
|
-
export interface PaginationItemProps extends Omit<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
export interface PaginationItemProps extends Omit<
|
|
69
|
+
HTMLMotionProps<"button">,
|
|
70
|
+
"onClick" | "value" | "children"
|
|
71
|
+
> {
|
|
72
|
+
/**
|
|
73
|
+
* Page number value
|
|
74
|
+
*/
|
|
75
|
+
value: number;
|
|
76
|
+
/**
|
|
77
|
+
* Whether this item is active
|
|
78
|
+
*/
|
|
79
|
+
isActive?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether this item is disabled
|
|
82
|
+
*/
|
|
83
|
+
isDisabled?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Click handler
|
|
86
|
+
*/
|
|
87
|
+
onClick?: (page: number) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Additional className
|
|
90
|
+
*/
|
|
91
|
+
className?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Children (for custom rendering)
|
|
94
|
+
*/
|
|
95
|
+
children?: ReactNode;
|
|
92
96
|
}
|
|
93
97
|
export interface PaginationPreviousProps {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Whether the button is disabled
|
|
100
|
+
*/
|
|
101
|
+
isDisabled?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Click handler
|
|
104
|
+
*/
|
|
105
|
+
onClick?: () => void;
|
|
106
|
+
/**
|
|
107
|
+
* Additional className
|
|
108
|
+
*/
|
|
109
|
+
className?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Children (for custom rendering)
|
|
112
|
+
*/
|
|
113
|
+
children?: ReactNode;
|
|
110
114
|
}
|
|
111
115
|
export interface PaginationNextProps {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Whether the button is disabled
|
|
118
|
+
*/
|
|
119
|
+
isDisabled?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Click handler
|
|
122
|
+
*/
|
|
123
|
+
onClick?: () => void;
|
|
124
|
+
/**
|
|
125
|
+
* Additional className
|
|
126
|
+
*/
|
|
127
|
+
className?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Children (for custom rendering)
|
|
130
|
+
*/
|
|
131
|
+
children?: ReactNode;
|
|
128
132
|
}
|
|
129
133
|
export interface PaginationEllipsisProps extends HTMLMotionProps<"span"> {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Additional className
|
|
136
|
+
*/
|
|
137
|
+
className?: string;
|
|
134
138
|
}
|
|
135
139
|
export type PaginationRange = (number | "ellipsis")[];
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { PaginationRange } from
|
|
1
|
+
import { PaginationRange } from "./pagination.types";
|
|
2
2
|
|
|
3
3
|
export interface UsePaginationParams {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Total number of pages
|
|
6
|
+
*/
|
|
7
|
+
totalPages: number;
|
|
8
|
+
/**
|
|
9
|
+
* Current page
|
|
10
|
+
*/
|
|
11
|
+
currentPage: number;
|
|
12
|
+
/**
|
|
13
|
+
* Number of pages to show on each side of current page
|
|
14
|
+
* @default 1
|
|
15
|
+
*/
|
|
16
|
+
siblingCount?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Number of pages to show at start and end
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
boundaryCount?: number;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Generate pagination range with ellipsis
|
|
25
25
|
* Logic: [1] ... [4] [5] [6] ... [10]
|
|
26
26
|
*/
|
|
27
|
-
export declare function usePagination({
|
|
27
|
+
export declare function usePagination({
|
|
28
|
+
totalPages,
|
|
29
|
+
currentPage,
|
|
30
|
+
siblingCount,
|
|
31
|
+
boundaryCount,
|
|
32
|
+
}: UsePaginationParams): PaginationRange;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { default as React } from
|
|
2
|
-
|
|
1
|
+
import { default as React } from "react";
|
|
2
|
+
|
|
3
|
+
import { PopoverContentProps } from "./popover.types";
|
|
3
4
|
|
|
4
5
|
export declare const PopoverContent: React.FC<PopoverContentProps>;
|
|
@@ -1,96 +1,116 @@
|
|
|
1
|
-
export declare const PopoverContext: import(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const PopoverContext: import("react").Context<{
|
|
2
|
+
arrowRef: import("react").Dispatch<import("react").SetStateAction<SVGSVGElement | null>>;
|
|
3
|
+
isDisabled: boolean;
|
|
4
|
+
placement: import("@floating-ui/utils").Placement;
|
|
5
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
6
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
isPositioned: boolean;
|
|
10
|
+
update: () => void;
|
|
11
|
+
floatingStyles: React.CSSProperties;
|
|
12
|
+
refs: {
|
|
13
|
+
reference: import("react").MutableRefObject<
|
|
14
|
+
import("@floating-ui/react-dom").ReferenceType | null
|
|
15
|
+
>;
|
|
16
|
+
floating: React.MutableRefObject<HTMLElement | null>;
|
|
17
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
18
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
19
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
20
|
+
elements: {
|
|
21
|
+
reference: import("@floating-ui/react-dom").ReferenceType | null;
|
|
22
|
+
floating: HTMLElement | null;
|
|
23
|
+
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
24
|
+
context: {
|
|
7
25
|
x: number;
|
|
8
26
|
y: number;
|
|
27
|
+
placement: import("@floating-ui/utils").Placement;
|
|
28
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
29
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
9
30
|
isPositioned: boolean;
|
|
10
31
|
update: () => void;
|
|
11
32
|
floatingStyles: React.CSSProperties;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
|
|
38
|
-
elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
|
|
39
|
-
};
|
|
40
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
41
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
42
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
43
|
-
active?: boolean;
|
|
44
|
-
selected?: boolean;
|
|
45
|
-
}) => Record<string, unknown>;
|
|
46
|
-
isOpen: boolean;
|
|
47
|
-
setOpen: (open: boolean) => void;
|
|
33
|
+
open: boolean;
|
|
34
|
+
onOpenChange: (
|
|
35
|
+
open: boolean,
|
|
36
|
+
event?: Event,
|
|
37
|
+
reason?: import("@floating-ui/react").OpenChangeReason,
|
|
38
|
+
) => void;
|
|
39
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
40
|
+
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
41
|
+
nodeId: string | undefined;
|
|
42
|
+
floatingId: string | undefined;
|
|
43
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
44
|
+
elements: import("@floating-ui/react").ExtendedElements<
|
|
45
|
+
import("@floating-ui/react").ReferenceType
|
|
46
|
+
>;
|
|
47
|
+
};
|
|
48
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
49
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
50
|
+
getItemProps: (
|
|
51
|
+
userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
52
|
+
active?: boolean;
|
|
53
|
+
selected?: boolean;
|
|
54
|
+
},
|
|
55
|
+
) => Record<string, unknown>;
|
|
56
|
+
isOpen: boolean;
|
|
57
|
+
setOpen: (open: boolean) => void;
|
|
48
58
|
} | null>;
|
|
49
59
|
export declare const usePopoverContext: () => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
arrowRef: import("react").Dispatch<import("react").SetStateAction<SVGSVGElement | null>>;
|
|
61
|
+
isDisabled: boolean;
|
|
62
|
+
placement: import("@floating-ui/utils").Placement;
|
|
63
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
64
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
isPositioned: boolean;
|
|
68
|
+
update: () => void;
|
|
69
|
+
floatingStyles: React.CSSProperties;
|
|
70
|
+
refs: {
|
|
71
|
+
reference: import("react").MutableRefObject<
|
|
72
|
+
import("@floating-ui/react-dom").ReferenceType | null
|
|
73
|
+
>;
|
|
74
|
+
floating: React.MutableRefObject<HTMLElement | null>;
|
|
75
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
76
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
77
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
78
|
+
elements: {
|
|
79
|
+
reference: import("@floating-ui/react-dom").ReferenceType | null;
|
|
80
|
+
floating: HTMLElement | null;
|
|
81
|
+
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
82
|
+
context: {
|
|
55
83
|
x: number;
|
|
56
84
|
y: number;
|
|
85
|
+
placement: import("@floating-ui/utils").Placement;
|
|
86
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
87
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
57
88
|
isPositioned: boolean;
|
|
58
89
|
update: () => void;
|
|
59
90
|
floatingStyles: React.CSSProperties;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
|
|
86
|
-
elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
|
|
87
|
-
};
|
|
88
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
89
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
90
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
91
|
-
active?: boolean;
|
|
92
|
-
selected?: boolean;
|
|
93
|
-
}) => Record<string, unknown>;
|
|
94
|
-
isOpen: boolean;
|
|
95
|
-
setOpen: (open: boolean) => void;
|
|
91
|
+
open: boolean;
|
|
92
|
+
onOpenChange: (
|
|
93
|
+
open: boolean,
|
|
94
|
+
event?: Event,
|
|
95
|
+
reason?: import("@floating-ui/react").OpenChangeReason,
|
|
96
|
+
) => void;
|
|
97
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
98
|
+
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
99
|
+
nodeId: string | undefined;
|
|
100
|
+
floatingId: string | undefined;
|
|
101
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
102
|
+
elements: import("@floating-ui/react").ExtendedElements<
|
|
103
|
+
import("@floating-ui/react").ReferenceType
|
|
104
|
+
>;
|
|
105
|
+
};
|
|
106
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
107
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
108
|
+
getItemProps: (
|
|
109
|
+
userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
110
|
+
active?: boolean;
|
|
111
|
+
selected?: boolean;
|
|
112
|
+
},
|
|
113
|
+
) => Record<string, unknown>;
|
|
114
|
+
isOpen: boolean;
|
|
115
|
+
setOpen: (open: boolean) => void;
|
|
96
116
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { default as React } from
|
|
2
|
-
|
|
1
|
+
import { default as React } from "react";
|
|
2
|
+
|
|
3
|
+
import { PopoverTriggerProps } from "./popover.types";
|
|
3
4
|
|
|
4
5
|
export declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Popover } from
|
|
2
|
-
export { PopoverTrigger } from
|
|
3
|
-
export { PopoverContent } from
|
|
4
|
-
export { usePopover } from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export { Popover } from "./Popover";
|
|
2
|
+
export { PopoverTrigger } from "./PopoverTrigger";
|
|
3
|
+
export { PopoverContent } from "./PopoverContent";
|
|
4
|
+
export { usePopover } from "./usePopover";
|
|
5
|
+
export * from "./popover.types";
|
|
6
|
+
export * from "./PopoverContext";
|