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,151 +1,165 @@
|
|
|
1
|
-
export declare const popover: import(
|
|
1
|
+
export declare const popover: import("tailwind-variants").TVReturnType<
|
|
2
|
+
{
|
|
2
3
|
size: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
sm: {
|
|
5
|
+
base: string;
|
|
6
|
+
};
|
|
7
|
+
md: {
|
|
8
|
+
base: string;
|
|
9
|
+
};
|
|
10
|
+
lg: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
12
13
|
};
|
|
13
14
|
shadow: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
sm: {
|
|
16
|
+
base: string;
|
|
17
|
+
};
|
|
18
|
+
md: {
|
|
19
|
+
base: string;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
base: string;
|
|
23
|
+
};
|
|
24
|
+
none: {
|
|
25
|
+
base: string;
|
|
26
|
+
};
|
|
26
27
|
};
|
|
27
28
|
radius: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
none: {
|
|
30
|
+
base: string;
|
|
31
|
+
};
|
|
32
|
+
sm: {
|
|
33
|
+
base: string;
|
|
34
|
+
};
|
|
35
|
+
md: {
|
|
36
|
+
base: string;
|
|
37
|
+
};
|
|
38
|
+
lg: {
|
|
39
|
+
base: string;
|
|
40
|
+
};
|
|
41
|
+
xl: {
|
|
42
|
+
base: string;
|
|
43
|
+
};
|
|
44
|
+
full: {
|
|
45
|
+
base: string;
|
|
46
|
+
};
|
|
46
47
|
};
|
|
47
|
-
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
48
50
|
base: string[];
|
|
49
51
|
arrow: string[];
|
|
50
52
|
trigger: string[];
|
|
51
|
-
},
|
|
53
|
+
},
|
|
54
|
+
undefined,
|
|
55
|
+
{
|
|
52
56
|
size: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
sm: {
|
|
58
|
+
base: string;
|
|
59
|
+
};
|
|
60
|
+
md: {
|
|
61
|
+
base: string;
|
|
62
|
+
};
|
|
63
|
+
lg: {
|
|
64
|
+
base: string;
|
|
65
|
+
};
|
|
62
66
|
};
|
|
63
67
|
shadow: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
sm: {
|
|
69
|
+
base: string;
|
|
70
|
+
};
|
|
71
|
+
md: {
|
|
72
|
+
base: string;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
base: string;
|
|
76
|
+
};
|
|
77
|
+
none: {
|
|
78
|
+
base: string;
|
|
79
|
+
};
|
|
76
80
|
};
|
|
77
81
|
radius: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
82
|
+
none: {
|
|
83
|
+
base: string;
|
|
84
|
+
};
|
|
85
|
+
sm: {
|
|
86
|
+
base: string;
|
|
87
|
+
};
|
|
88
|
+
md: {
|
|
89
|
+
base: string;
|
|
90
|
+
};
|
|
91
|
+
lg: {
|
|
92
|
+
base: string;
|
|
93
|
+
};
|
|
94
|
+
xl: {
|
|
95
|
+
base: string;
|
|
96
|
+
};
|
|
97
|
+
full: {
|
|
98
|
+
base: string;
|
|
99
|
+
};
|
|
96
100
|
};
|
|
97
|
-
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
98
103
|
base: string[];
|
|
99
104
|
arrow: string[];
|
|
100
105
|
trigger: string[];
|
|
101
|
-
},
|
|
102
|
-
|
|
106
|
+
},
|
|
107
|
+
import("tailwind-variants").TVReturnType<
|
|
108
|
+
{
|
|
109
|
+
size: {
|
|
103
110
|
sm: {
|
|
104
|
-
|
|
111
|
+
base: string;
|
|
105
112
|
};
|
|
106
113
|
md: {
|
|
107
|
-
|
|
114
|
+
base: string;
|
|
108
115
|
};
|
|
109
116
|
lg: {
|
|
110
|
-
|
|
117
|
+
base: string;
|
|
111
118
|
};
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
};
|
|
120
|
+
shadow: {
|
|
114
121
|
sm: {
|
|
115
|
-
|
|
122
|
+
base: string;
|
|
116
123
|
};
|
|
117
124
|
md: {
|
|
118
|
-
|
|
125
|
+
base: string;
|
|
119
126
|
};
|
|
120
127
|
lg: {
|
|
121
|
-
|
|
128
|
+
base: string;
|
|
122
129
|
};
|
|
123
130
|
none: {
|
|
124
|
-
|
|
131
|
+
base: string;
|
|
125
132
|
};
|
|
126
|
-
|
|
127
|
-
|
|
133
|
+
};
|
|
134
|
+
radius: {
|
|
128
135
|
none: {
|
|
129
|
-
|
|
136
|
+
base: string;
|
|
130
137
|
};
|
|
131
138
|
sm: {
|
|
132
|
-
|
|
139
|
+
base: string;
|
|
133
140
|
};
|
|
134
141
|
md: {
|
|
135
|
-
|
|
142
|
+
base: string;
|
|
136
143
|
};
|
|
137
144
|
lg: {
|
|
138
|
-
|
|
145
|
+
base: string;
|
|
139
146
|
};
|
|
140
147
|
xl: {
|
|
141
|
-
|
|
148
|
+
base: string;
|
|
142
149
|
};
|
|
143
150
|
full: {
|
|
144
|
-
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
base: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
base: string[];
|
|
157
|
+
arrow: string[];
|
|
158
|
+
trigger: string[];
|
|
159
|
+
},
|
|
160
|
+
undefined,
|
|
161
|
+
unknown,
|
|
162
|
+
unknown,
|
|
163
|
+
undefined
|
|
164
|
+
>
|
|
165
|
+
>;
|
|
@@ -1,106 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Placement } from "@floating-ui/react";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
import { popover } from "./popover.styles";
|
|
4
5
|
|
|
5
6
|
export type PopoverPlacement = Placement;
|
|
6
7
|
export interface PopoverOptions {
|
|
7
|
-
|
|
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
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The open state of the popover (controlled).
|
|
10
|
+
*/
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The default open state (uncontrolled).
|
|
14
|
+
*/
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Handler that is called when the popover's open state changes.
|
|
18
|
+
*/
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
/**
|
|
21
|
+
* The placement of the popover relative to the trigger.
|
|
22
|
+
* @default "bottom"
|
|
23
|
+
*/
|
|
24
|
+
placement?: PopoverPlacement;
|
|
25
|
+
/**
|
|
26
|
+
* The offset from the trigger in pixels.
|
|
27
|
+
* @default 8
|
|
28
|
+
*/
|
|
29
|
+
offset?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The cross axis offset in pixels.
|
|
32
|
+
* @default 0
|
|
33
|
+
*/
|
|
34
|
+
crossOffset?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the popover is disabled.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to close the popover when the user clicks outside.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
closeOnBlur?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to close the popover when the Escape key is pressed.
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
closeOnEsc?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The trigger event for the popover.
|
|
52
|
+
* @default "click"
|
|
53
|
+
*/
|
|
54
|
+
trigger?: "click" | "hover";
|
|
54
55
|
}
|
|
55
56
|
export interface PopoverProps extends PopoverOptions {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
/**
|
|
58
|
+
* The content of the popover.
|
|
59
|
+
*/
|
|
60
|
+
children: ReactNode;
|
|
60
61
|
}
|
|
61
62
|
export interface PopoverTriggerProps {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Whether to merge the trigger props into the child element.
|
|
65
|
+
* If true, it renders the child directly with the props merged.
|
|
66
|
+
* If false, it renders a div or default trigger wrapper (implementation dependent).
|
|
67
|
+
* Usually we want to cloneElement or use a Slot (like Radix).
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
asChild?: boolean;
|
|
71
|
+
children: ReactElement;
|
|
72
|
+
className?: string;
|
|
72
73
|
}
|
|
73
74
|
export type PopoverSlots = keyof ReturnType<typeof popover>;
|
|
74
75
|
export interface PopoverContentProps {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Whether to show an arrow pointing to the trigger.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
showArrow?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The size of the arrow in pixels.
|
|
83
|
+
* @default 8
|
|
84
|
+
*/
|
|
85
|
+
arrowSize?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Motion preset for the entry/exit animation.
|
|
88
|
+
* @default "scale"
|
|
89
|
+
*/
|
|
90
|
+
motionPreset?: "fade" | "scale" | "slide";
|
|
91
|
+
/**
|
|
92
|
+
* Custom class names for the popover slots.
|
|
93
|
+
*/
|
|
94
|
+
classNames?: Partial<Record<PopoverSlots, string>>;
|
|
95
|
+
/**
|
|
96
|
+
* The accessible role of the popover content.
|
|
97
|
+
* @default "dialog"
|
|
98
|
+
*/
|
|
99
|
+
role?: "dialog" | "menu" | "listbox" | "tooltip";
|
|
100
|
+
/**
|
|
101
|
+
* Whether to trap focus inside the popover.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
trapFocus?: boolean;
|
|
105
|
+
children: ReactNode;
|
|
106
|
+
className?: string;
|
|
106
107
|
}
|
|
@@ -1,51 +1,61 @@
|
|
|
1
|
-
import { PopoverOptions } from
|
|
1
|
+
import { PopoverOptions } from "./popover.types";
|
|
2
2
|
|
|
3
3
|
export declare function usePopover(props: PopoverOptions): {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
arrowRef: import("react").Dispatch<import("react").SetStateAction<SVGSVGElement | null>>;
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
placement: import("@floating-ui/utils").Placement;
|
|
7
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
8
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
isPositioned: boolean;
|
|
12
|
+
update: () => void;
|
|
13
|
+
floatingStyles: React.CSSProperties;
|
|
14
|
+
refs: {
|
|
15
|
+
reference: import("react").MutableRefObject<
|
|
16
|
+
import("@floating-ui/react-dom").ReferenceType | null
|
|
17
|
+
>;
|
|
18
|
+
floating: React.MutableRefObject<HTMLElement | null>;
|
|
19
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
20
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
21
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
22
|
+
elements: {
|
|
23
|
+
reference: import("@floating-ui/react-dom").ReferenceType | null;
|
|
24
|
+
floating: HTMLElement | null;
|
|
25
|
+
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
26
|
+
context: {
|
|
9
27
|
x: number;
|
|
10
28
|
y: number;
|
|
29
|
+
placement: import("@floating-ui/utils").Placement;
|
|
30
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
31
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
11
32
|
isPositioned: boolean;
|
|
12
33
|
update: () => void;
|
|
13
34
|
floatingStyles: React.CSSProperties;
|
|
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
|
-
refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
|
|
40
|
-
elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
|
|
41
|
-
};
|
|
42
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
43
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
44
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
45
|
-
active?: boolean;
|
|
46
|
-
selected?: boolean;
|
|
47
|
-
}) => Record<string, unknown>;
|
|
48
|
-
isOpen: boolean;
|
|
49
|
-
setOpen: (open: boolean) => void;
|
|
35
|
+
open: boolean;
|
|
36
|
+
onOpenChange: (
|
|
37
|
+
open: boolean,
|
|
38
|
+
event?: Event,
|
|
39
|
+
reason?: import("@floating-ui/react").OpenChangeReason,
|
|
40
|
+
) => void;
|
|
41
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
42
|
+
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
43
|
+
nodeId: string | undefined;
|
|
44
|
+
floatingId: string | undefined;
|
|
45
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
46
|
+
elements: import("@floating-ui/react").ExtendedElements<
|
|
47
|
+
import("@floating-ui/react").ReferenceType
|
|
48
|
+
>;
|
|
49
|
+
};
|
|
50
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
51
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
52
|
+
getItemProps: (
|
|
53
|
+
userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
54
|
+
active?: boolean;
|
|
55
|
+
selected?: boolean;
|
|
56
|
+
},
|
|
57
|
+
) => Record<string, unknown>;
|
|
58
|
+
isOpen: boolean;
|
|
59
|
+
setOpen: (open: boolean) => void;
|
|
50
60
|
};
|
|
51
61
|
export type UsePopoverReturn = ReturnType<typeof usePopover>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { RadioProps } from
|
|
1
|
+
import { RadioProps } from "./radio.types";
|
|
2
2
|
|
|
3
|
-
export declare const Radio: import(
|
|
3
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<
|
|
4
|
+
Omit<RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>
|
|
5
|
+
>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { RadioGroupProps } from
|
|
1
|
+
import { RadioGroupProps } from "./radio.types";
|
|
2
2
|
|
|
3
|
-
export declare const RadioGroup: import(
|
|
3
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<
|
|
4
|
+
RadioGroupProps & import("react").RefAttributes<HTMLDivElement>
|
|
5
|
+
>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Radio } from
|
|
2
|
-
import { RadioGroup } from
|
|
1
|
+
import { Radio } from "./Radio";
|
|
2
|
+
import { RadioGroup } from "./RadioGroup";
|
|
3
3
|
|
|
4
4
|
export { Radio, RadioGroup };
|
|
5
|
-
export type { RadioProps, RadioGroupProps } from
|
|
5
|
+
export type { RadioProps, RadioGroupProps } from "./radio.types";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { RadioGroupProps } from
|
|
1
|
+
import { RadioGroupProps } from "./radio.types";
|
|
2
2
|
|
|
3
3
|
interface RadioGroupContextValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
groupState: string | undefined;
|
|
5
|
+
setGroupState: (value: string) => void;
|
|
6
|
+
name?: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isReadOnly?: boolean;
|
|
9
|
+
isInvalid?: boolean;
|
|
10
|
+
size?: RadioGroupProps["size"];
|
|
11
|
+
color?: RadioGroupProps["color"];
|
|
12
|
+
radius?: RadioGroupProps["radius"];
|
|
13
|
+
variant?: RadioGroupProps["variant"];
|
|
14
14
|
}
|
|
15
|
-
export declare const RadioGroupContext: import(
|
|
15
|
+
export declare const RadioGroupContext: import("react").Context<RadioGroupContextValue | null>;
|
|
16
16
|
export declare const useRadioGroupContext: () => RadioGroupContextValue | null;
|
|
17
17
|
export {};
|