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.
Files changed (172) hide show
  1. package/README.md +13 -13
  2. package/dist/components/button/Button.d.ts +6 -3
  3. package/dist/components/button/button.styles.d.ts +176 -162
  4. package/dist/components/button/button.types.d.ts +14 -14
  5. package/dist/components/button/index.d.ts +2 -2
  6. package/dist/components/calendar/Calendar.d.ts +3 -2
  7. package/dist/components/calendar/calendar.grid.d.ts +5 -2
  8. package/dist/components/calendar/calendar.navigation.d.ts +1 -1
  9. package/dist/components/calendar/calendar.selection.d.ts +6 -2
  10. package/dist/components/calendar/calendar.state.d.ts +1 -1
  11. package/dist/components/calendar/calendar.styles.d.ts +106 -83
  12. package/dist/components/calendar/calendar.types.d.ts +39 -39
  13. package/dist/components/calendar/index.d.ts +3 -3
  14. package/dist/components/checkbox/Checkbox.d.ts +4 -2
  15. package/dist/components/checkbox/CheckboxGroup.d.ts +4 -2
  16. package/dist/components/checkbox/checkbox-group-context.d.ts +12 -12
  17. package/dist/components/checkbox/checkbox.styles.d.ts +313 -285
  18. package/dist/components/checkbox/checkbox.types.d.ts +161 -154
  19. package/dist/components/checkbox/index.d.ts +3 -3
  20. package/dist/components/checkbox/useCheckbox.d.ts +389 -311
  21. package/dist/components/checkbox/useCheckboxGroup.d.ts +353 -280
  22. package/dist/components/chip/Chip.d.ts +4 -2
  23. package/dist/components/chip/ChipGroup.d.ts +4 -2
  24. package/dist/components/chip/chip-group-context.d.ts +9 -6
  25. package/dist/components/chip/chip.styles.d.ts +206 -192
  26. package/dist/components/chip/chip.types.d.ts +155 -149
  27. package/dist/components/chip/index.d.ts +5 -5
  28. package/dist/components/chip/useChip.d.ts +22 -20
  29. package/dist/components/chip/useChipGroup.d.ts +350 -277
  30. package/dist/components/datepicker/DatePart.d.ts +16 -14
  31. package/dist/components/datepicker/DatePicker.d.ts +17 -16
  32. package/dist/components/datepicker/DatePickerCalendar.d.ts +8 -7
  33. package/dist/components/datepicker/DatePickerDay.d.ts +11 -9
  34. package/dist/components/datepicker/DatePickerInput.d.ts +16 -15
  35. package/dist/components/datepicker/DatePickerPopover.d.ts +7 -6
  36. package/dist/components/datepicker/SegmentedDatePickerInput.d.ts +9 -8
  37. package/dist/components/datepicker/datepicker.controller.d.ts +6 -2
  38. package/dist/components/datepicker/datepicker.input.logic.d.ts +16 -6
  39. package/dist/components/datepicker/datepicker.input.state.d.ts +1 -1
  40. package/dist/components/datepicker/datepicker.input.types.d.ts +20 -20
  41. package/dist/components/datepicker/datepicker.keyboard.d.ts +6 -2
  42. package/dist/components/datepicker/datepicker.state.d.ts +1 -1
  43. package/dist/components/datepicker/datepicker.styles.d.ts +118 -95
  44. package/dist/components/datepicker/datepicker.types.d.ts +52 -52
  45. package/dist/components/datepicker/index.d.ts +5 -5
  46. package/dist/components/dropdown/Dropdown.d.ts +3 -2
  47. package/dist/components/dropdown/DropdownContent.d.ts +3 -2
  48. package/dist/components/dropdown/DropdownItem.d.ts +3 -2
  49. package/dist/components/dropdown/DropdownSection.d.ts +3 -2
  50. package/dist/components/dropdown/DropdownSeparator.d.ts +3 -2
  51. package/dist/components/dropdown/DropdownTrigger.d.ts +3 -2
  52. package/dist/components/dropdown/context.d.ts +22 -21
  53. package/dist/components/dropdown/dropdown.styles.d.ts +180 -166
  54. package/dist/components/dropdown/dropdown.types.d.ts +97 -85
  55. package/dist/components/dropdown/index.d.ts +9 -9
  56. package/dist/components/dropdown/useDropdown.d.ts +15 -15
  57. package/dist/components/input/Input.d.ts +9 -4
  58. package/dist/components/input/index.d.ts +2 -2
  59. package/dist/components/input/input.styles.d.ts +239 -225
  60. package/dist/components/input/input.types.d.ts +60 -58
  61. package/dist/components/input-number/InputNumber.d.ts +24 -5
  62. package/dist/components/input-number/index.d.ts +2 -2
  63. package/dist/components/input-number/input-number.styles.d.ts +331 -317
  64. package/dist/components/input-number/input-number.types.d.ts +132 -116
  65. package/dist/components/input-number/utils.d.ts +11 -3
  66. package/dist/components/modal/Modal.d.ts +4 -3
  67. package/dist/components/modal/ModalContent.d.ts +7 -3
  68. package/dist/components/modal/ModalLayout.d.ts +16 -4
  69. package/dist/components/modal/ModalTrigger.d.ts +5 -3
  70. package/dist/components/modal/context.d.ts +8 -8
  71. package/dist/components/modal/index.d.ts +6 -6
  72. package/dist/components/modal/modal.styles.d.ts +233 -219
  73. package/dist/components/modal/modal.types.d.ts +35 -34
  74. package/dist/components/modal/useModal.d.ts +7 -7
  75. package/dist/components/pagination/Pagination.d.ts +6 -3
  76. package/dist/components/pagination/PaginationContent.d.ts +6 -3
  77. package/dist/components/pagination/PaginationContext.d.ts +54 -54
  78. package/dist/components/pagination/PaginationEllipsis.d.ts +6 -3
  79. package/dist/components/pagination/PaginationItem.d.ts +6 -3
  80. package/dist/components/pagination/PaginationItems.d.ts +2 -2
  81. package/dist/components/pagination/PaginationNext.d.ts +6 -3
  82. package/dist/components/pagination/PaginationPrevious.d.ts +6 -3
  83. package/dist/components/pagination/index.d.ts +18 -9
  84. package/dist/components/pagination/pagination.styles.d.ts +147 -133
  85. package/dist/components/pagination/pagination.types.d.ts +125 -121
  86. package/dist/components/pagination/usePagination.d.ts +25 -20
  87. package/dist/components/popover/Popover.d.ts +3 -2
  88. package/dist/components/popover/PopoverContent.d.ts +3 -2
  89. package/dist/components/popover/PopoverContext.d.ts +103 -83
  90. package/dist/components/popover/PopoverTrigger.d.ts +3 -2
  91. package/dist/components/popover/index.d.ts +6 -6
  92. package/dist/components/popover/popover.styles.d.ts +122 -108
  93. package/dist/components/popover/popover.types.d.ts +96 -95
  94. package/dist/components/popover/usePopover.d.ts +52 -42
  95. package/dist/components/radio/Radio.d.ts +4 -2
  96. package/dist/components/radio/RadioGroup.d.ts +4 -2
  97. package/dist/components/radio/index.d.ts +3 -3
  98. package/dist/components/radio/radio-group-context.d.ts +12 -12
  99. package/dist/components/radio/radio.styles.d.ts +306 -278
  100. package/dist/components/radio/radio.types.d.ts +145 -138
  101. package/dist/components/radio/useRadio.d.ts +391 -311
  102. package/dist/components/radio/useRadioGroup.d.ts +354 -281
  103. package/dist/components/ripple/Ripple.d.ts +9 -9
  104. package/dist/components/select/Select.d.ts +6 -3
  105. package/dist/components/select/SelectItem.d.ts +15 -4
  106. package/dist/components/select/index.d.ts +5 -5
  107. package/dist/components/select/select.styles.d.ts +224 -210
  108. package/dist/components/select/select.types.d.ts +51 -50
  109. package/dist/components/select/useSelect.d.ts +16 -16
  110. package/dist/components/spinner/Spinner.d.ts +9 -3
  111. package/dist/components/spinner/index.d.ts +2 -2
  112. package/dist/components/spinner/spinner.styles.d.ts +91 -77
  113. package/dist/components/spinner/spinner.types.d.ts +4 -4
  114. package/dist/components/switch/Switch.d.ts +4 -2
  115. package/dist/components/switch/index.d.ts +2 -2
  116. package/dist/components/switch/switch.styles.d.ts +147 -133
  117. package/dist/components/switch/switch.types.d.ts +84 -80
  118. package/dist/components/switch/useSwitch.d.ts +389 -311
  119. package/dist/components/tabs/Tab.d.ts +1 -1
  120. package/dist/components/tabs/Tabs.d.ts +1 -1
  121. package/dist/components/tabs/index.d.ts +4 -4
  122. package/dist/components/tabs/tabs.styles.d.ts +341 -327
  123. package/dist/components/tabs/tabs.types.d.ts +67 -66
  124. package/dist/components/tabs/useTabs.d.ts +4 -4
  125. package/dist/components/textarea/Textarea.d.ts +9 -4
  126. package/dist/components/textarea/index.d.ts +2 -2
  127. package/dist/components/textarea/textarea.styles.d.ts +276 -262
  128. package/dist/components/textarea/textarea.types.d.ts +57 -55
  129. package/dist/components/toast/Toast.d.ts +8 -4
  130. package/dist/components/toast/ToastProvider.d.ts +8 -4
  131. package/dist/components/toast/ToastViewport.d.ts +14 -4
  132. package/dist/components/toast/Toaster.d.ts +4 -2
  133. package/dist/components/toast/index.d.ts +7 -7
  134. package/dist/components/toast/toast-store.d.ts +10 -10
  135. package/dist/components/toast/toast-subcomponents.d.ts +10 -4
  136. package/dist/components/toast/toast.types.d.ts +18 -18
  137. package/dist/components/toast/use-toast-internal.d.ts +1 -1
  138. package/dist/components/toast/utils.d.ts +1 -1
  139. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  140. package/dist/components/tooltip/index.d.ts +3 -3
  141. package/dist/components/tooltip/tooltip.styles.d.ts +187 -173
  142. package/dist/components/tooltip/tooltip.types.d.ts +85 -72
  143. package/dist/components/tooltip/useTooltip.d.ts +25 -25
  144. package/dist/components/tooltip/utils.d.ts +24 -13
  145. package/dist/hooks/index.d.ts +3 -3
  146. package/dist/hooks/useDisclosure.d.ts +10 -10
  147. package/dist/hooks/useFocusTrap.d.ts +1 -1
  148. package/dist/index.cjs +2 -2
  149. package/dist/index.d.ts +24 -25
  150. package/dist/index.js +1697 -1632
  151. package/dist/motion/focus.d.ts +6 -6
  152. package/dist/motion/hover.d.ts +8 -8
  153. package/dist/motion/index.d.ts +5 -5
  154. package/dist/motion/press.d.ts +7 -7
  155. package/dist/motion/reveal.d.ts +16 -16
  156. package/dist/motion/tokens.d.ts +9 -9
  157. package/dist/provider/RupoUIContext.d.ts +2 -2
  158. package/dist/provider/RupoUIProvider.d.ts +9 -5
  159. package/dist/provider/types.d.ts +46 -25
  160. package/dist/provider/useRupoUI.d.ts +1 -1
  161. package/dist/style.css +1 -1
  162. package/dist/styles/tokens/colors.d.ts +24 -24
  163. package/dist/styles/tokens/index.d.ts +5 -5
  164. package/dist/styles/tokens/motion.d.ts +9 -9
  165. package/dist/styles/tokens/radius.d.ts +6 -6
  166. package/dist/styles/tokens/spacing.d.ts +11 -11
  167. package/dist/styles/tokens/typography.d.ts +64 -32
  168. package/dist/tailwind/index.d.ts +7 -7
  169. package/dist/tailwind/plugin-utils.d.ts +1 -1
  170. package/dist/tailwind/theme.d.ts +1 -1
  171. package/package.json +11 -2
  172. package/dist/components/toast/ToastDemo.d.ts +0 -1
@@ -1,232 +1,246 @@
1
- export declare const tooltip: import('tailwind-variants').TVReturnType<{
1
+ export declare const tooltip: import("tailwind-variants").TVReturnType<
2
+ {
2
3
  size: {
3
- sm: {
4
- content: string;
5
- };
6
- md: {
7
- content: string;
8
- };
9
- lg: {
10
- content: string;
11
- };
4
+ sm: {
5
+ content: string;
6
+ };
7
+ md: {
8
+ content: string;
9
+ };
10
+ lg: {
11
+ content: string;
12
+ };
12
13
  };
13
14
  color: {
14
- default: {
15
- content: string;
16
- arrow: string;
17
- };
18
- foreground: {
19
- content: string;
20
- arrow: string;
21
- };
22
- primary: {
23
- content: string;
24
- arrow: string;
25
- };
26
- secondary: {
27
- content: string;
28
- arrow: string;
29
- };
30
- success: {
31
- content: string;
32
- arrow: string;
33
- };
34
- warning: {
35
- content: string;
36
- arrow: string;
37
- };
38
- danger: {
39
- content: string;
40
- arrow: string;
41
- };
15
+ default: {
16
+ content: string;
17
+ arrow: string;
18
+ };
19
+ foreground: {
20
+ content: string;
21
+ arrow: string;
22
+ };
23
+ primary: {
24
+ content: string;
25
+ arrow: string;
26
+ };
27
+ secondary: {
28
+ content: string;
29
+ arrow: string;
30
+ };
31
+ success: {
32
+ content: string;
33
+ arrow: string;
34
+ };
35
+ warning: {
36
+ content: string;
37
+ arrow: string;
38
+ };
39
+ danger: {
40
+ content: string;
41
+ arrow: string;
42
+ };
42
43
  };
43
44
  radius: {
44
- none: {
45
- content: string;
46
- };
47
- sm: {
48
- content: string;
49
- };
50
- md: {
51
- content: string;
52
- };
53
- lg: {
54
- content: string;
55
- };
56
- xl: {
57
- content: string;
58
- };
59
- full: {
60
- content: string;
61
- };
45
+ none: {
46
+ content: string;
47
+ };
48
+ sm: {
49
+ content: string;
50
+ };
51
+ md: {
52
+ content: string;
53
+ };
54
+ lg: {
55
+ content: string;
56
+ };
57
+ xl: {
58
+ content: string;
59
+ };
60
+ full: {
61
+ content: string;
62
+ };
62
63
  };
63
64
  shadow: {
64
- sm: {
65
- content: string;
66
- };
67
- md: {
68
- content: string;
69
- };
70
- lg: {
71
- content: string;
72
- };
65
+ sm: {
66
+ content: string;
67
+ };
68
+ md: {
69
+ content: string;
70
+ };
71
+ lg: {
72
+ content: string;
73
+ };
73
74
  };
74
- }, {
75
+ },
76
+ {
75
77
  base: string[];
76
78
  content: string[];
77
79
  arrow: string[];
78
- }, undefined, {
80
+ },
81
+ undefined,
82
+ {
79
83
  size: {
80
- sm: {
81
- content: string;
82
- };
83
- md: {
84
- content: string;
85
- };
86
- lg: {
87
- content: string;
88
- };
84
+ sm: {
85
+ content: string;
86
+ };
87
+ md: {
88
+ content: string;
89
+ };
90
+ lg: {
91
+ content: string;
92
+ };
89
93
  };
90
94
  color: {
91
- default: {
92
- content: string;
93
- arrow: string;
94
- };
95
- foreground: {
96
- content: string;
97
- arrow: string;
98
- };
99
- primary: {
100
- content: string;
101
- arrow: string;
102
- };
103
- secondary: {
104
- content: string;
105
- arrow: string;
106
- };
107
- success: {
108
- content: string;
109
- arrow: string;
110
- };
111
- warning: {
112
- content: string;
113
- arrow: string;
114
- };
115
- danger: {
116
- content: string;
117
- arrow: string;
118
- };
95
+ default: {
96
+ content: string;
97
+ arrow: string;
98
+ };
99
+ foreground: {
100
+ content: string;
101
+ arrow: string;
102
+ };
103
+ primary: {
104
+ content: string;
105
+ arrow: string;
106
+ };
107
+ secondary: {
108
+ content: string;
109
+ arrow: string;
110
+ };
111
+ success: {
112
+ content: string;
113
+ arrow: string;
114
+ };
115
+ warning: {
116
+ content: string;
117
+ arrow: string;
118
+ };
119
+ danger: {
120
+ content: string;
121
+ arrow: string;
122
+ };
119
123
  };
120
124
  radius: {
121
- none: {
122
- content: string;
123
- };
124
- sm: {
125
- content: string;
126
- };
127
- md: {
128
- content: string;
129
- };
130
- lg: {
131
- content: string;
132
- };
133
- xl: {
134
- content: string;
135
- };
136
- full: {
137
- content: string;
138
- };
125
+ none: {
126
+ content: string;
127
+ };
128
+ sm: {
129
+ content: string;
130
+ };
131
+ md: {
132
+ content: string;
133
+ };
134
+ lg: {
135
+ content: string;
136
+ };
137
+ xl: {
138
+ content: string;
139
+ };
140
+ full: {
141
+ content: string;
142
+ };
139
143
  };
140
144
  shadow: {
141
- sm: {
142
- content: string;
143
- };
144
- md: {
145
- content: string;
146
- };
147
- lg: {
148
- content: string;
149
- };
145
+ sm: {
146
+ content: string;
147
+ };
148
+ md: {
149
+ content: string;
150
+ };
151
+ lg: {
152
+ content: string;
153
+ };
150
154
  };
151
- }, {
155
+ },
156
+ {
152
157
  base: string[];
153
158
  content: string[];
154
159
  arrow: string[];
155
- }, import('tailwind-variants').TVReturnType<{
156
- size: {
160
+ },
161
+ import("tailwind-variants").TVReturnType<
162
+ {
163
+ size: {
157
164
  sm: {
158
- content: string;
165
+ content: string;
159
166
  };
160
167
  md: {
161
- content: string;
168
+ content: string;
162
169
  };
163
170
  lg: {
164
- content: string;
171
+ content: string;
165
172
  };
166
- };
167
- color: {
173
+ };
174
+ color: {
168
175
  default: {
169
- content: string;
170
- arrow: string;
176
+ content: string;
177
+ arrow: string;
171
178
  };
172
179
  foreground: {
173
- content: string;
174
- arrow: string;
180
+ content: string;
181
+ arrow: string;
175
182
  };
176
183
  primary: {
177
- content: string;
178
- arrow: string;
184
+ content: string;
185
+ arrow: string;
179
186
  };
180
187
  secondary: {
181
- content: string;
182
- arrow: string;
188
+ content: string;
189
+ arrow: string;
183
190
  };
184
191
  success: {
185
- content: string;
186
- arrow: string;
192
+ content: string;
193
+ arrow: string;
187
194
  };
188
195
  warning: {
189
- content: string;
190
- arrow: string;
196
+ content: string;
197
+ arrow: string;
191
198
  };
192
199
  danger: {
193
- content: string;
194
- arrow: string;
200
+ content: string;
201
+ arrow: string;
195
202
  };
196
- };
197
- radius: {
203
+ };
204
+ radius: {
198
205
  none: {
199
- content: string;
206
+ content: string;
200
207
  };
201
208
  sm: {
202
- content: string;
209
+ content: string;
203
210
  };
204
211
  md: {
205
- content: string;
212
+ content: string;
206
213
  };
207
214
  lg: {
208
- content: string;
215
+ content: string;
209
216
  };
210
217
  xl: {
211
- content: string;
218
+ content: string;
212
219
  };
213
220
  full: {
214
- content: string;
221
+ content: string;
215
222
  };
216
- };
217
- shadow: {
223
+ };
224
+ shadow: {
218
225
  sm: {
219
- content: string;
226
+ content: string;
220
227
  };
221
228
  md: {
222
- content: string;
229
+ content: string;
223
230
  };
224
231
  lg: {
225
- content: string;
226
- };
227
- };
228
- }, {
229
- base: string[];
230
- content: string[];
231
- arrow: string[];
232
- }, undefined, unknown, unknown, undefined>>;
232
+ content: string;
233
+ };
234
+ };
235
+ },
236
+ {
237
+ base: string[];
238
+ content: string[];
239
+ arrow: string[];
240
+ },
241
+ undefined,
242
+ unknown,
243
+ unknown,
244
+ undefined
245
+ >
246
+ >;
@@ -1,75 +1,88 @@
1
- import { ReactNode } from 'react';
2
- import { VariantProps } from 'tailwind-variants';
3
- import { tooltip } from './tooltip.styles';
1
+ import { ReactNode } from "react";
2
+ import { VariantProps } from "tailwind-variants";
4
3
 
5
- export type Placement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
4
+ import { tooltip } from "./tooltip.styles";
5
+
6
+ export type Placement =
7
+ | "top"
8
+ | "bottom"
9
+ | "left"
10
+ | "right"
11
+ | "top-start"
12
+ | "top-end"
13
+ | "bottom-start"
14
+ | "bottom-end"
15
+ | "left-start"
16
+ | "left-end"
17
+ | "right-start"
18
+ | "right-end";
6
19
  export interface TooltipProps extends VariantProps<typeof tooltip> {
7
- /**
8
- * The content to be displayed in the tooltip.
9
- */
10
- content: ReactNode;
11
- /**
12
- * The element that triggers the tooltip.
13
- */
14
- children?: ReactNode;
15
- /**
16
- * The placement of the tooltip relative to the trigger.
17
- * @default "top"
18
- */
19
- placement?: Placement;
20
- /**
21
- * The delay in milliseconds before the tooltip appears.
22
- * @default 0
23
- */
24
- delay?: number;
25
- /**
26
- * The delay in milliseconds before the tooltip appears when closing.
27
- * @default 500
28
- */
29
- closeDelay?: number;
30
- /**
31
- * Whether the tooltip is open (controlled).
32
- */
33
- isOpen?: boolean;
34
- /**
35
- * Whether the tooltip is open by default (uncontrolled).
36
- */
37
- defaultOpen?: boolean;
38
- /**
39
- * Handler that is called when the tooltip's open state changes.
40
- */
41
- onOpenChange?: (open: boolean) => void;
42
- /**
43
- * Whether the tooltip is disabled.
44
- */
45
- isDisabled?: boolean;
46
- /**
47
- * The offset distance in pixels between the trigger and the tooltip.
48
- * @default 7
49
- */
50
- offset?: number;
51
- /**
52
- * Classname or List of classes to change the classNames of the element.
53
- * if `className` is passed, it will be added to the base slot.
54
- *
55
- * @example
56
- * ```ts
57
- * <Tooltip classNames={{
58
- * base:"base-classes",
59
- * content: "content-classes",
60
- * arrow: "arrow-classes",
61
- * }} />
62
- * ```
63
- */
64
- classNames?: Partial<ReturnType<typeof tooltip>>;
65
- className?: string;
66
- /**
67
- * Whether to show the arrow.
68
- * @default true
69
- */
70
- showArrow?: boolean;
71
- /**
72
- * Container to mount the portal into. Defaults to document.body
73
- */
74
- portalContainer?: HTMLElement;
20
+ /**
21
+ * The content to be displayed in the tooltip.
22
+ */
23
+ content: ReactNode;
24
+ /**
25
+ * The element that triggers the tooltip.
26
+ */
27
+ children?: ReactNode;
28
+ /**
29
+ * The placement of the tooltip relative to the trigger.
30
+ * @default "top"
31
+ */
32
+ placement?: Placement;
33
+ /**
34
+ * The delay in milliseconds before the tooltip appears.
35
+ * @default 0
36
+ */
37
+ delay?: number;
38
+ /**
39
+ * The delay in milliseconds before the tooltip appears when closing.
40
+ * @default 500
41
+ */
42
+ closeDelay?: number;
43
+ /**
44
+ * Whether the tooltip is open (controlled).
45
+ */
46
+ isOpen?: boolean;
47
+ /**
48
+ * Whether the tooltip is open by default (uncontrolled).
49
+ */
50
+ defaultOpen?: boolean;
51
+ /**
52
+ * Handler that is called when the tooltip's open state changes.
53
+ */
54
+ onOpenChange?: (open: boolean) => void;
55
+ /**
56
+ * Whether the tooltip is disabled.
57
+ */
58
+ isDisabled?: boolean;
59
+ /**
60
+ * The offset distance in pixels between the trigger and the tooltip.
61
+ * @default 7
62
+ */
63
+ offset?: number;
64
+ /**
65
+ * Classname or List of classes to change the classNames of the element.
66
+ * if `className` is passed, it will be added to the base slot.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * <Tooltip classNames={{
71
+ * base:"base-classes",
72
+ * content: "content-classes",
73
+ * arrow: "arrow-classes",
74
+ * }} />
75
+ * ```
76
+ */
77
+ classNames?: Partial<ReturnType<typeof tooltip>>;
78
+ className?: string;
79
+ /**
80
+ * Whether to show the arrow.
81
+ * @default true
82
+ */
83
+ showArrow?: boolean;
84
+ /**
85
+ * Container to mount the portal into. Defaults to document.body
86
+ */
87
+ portalContainer?: HTMLElement;
75
88
  }
@@ -1,29 +1,29 @@
1
- import { TooltipProps } from './tooltip.types';
2
- import { Position } from './utils';
1
+ import { TooltipProps } from "./tooltip.types";
2
+ import { Position } from "./utils";
3
3
 
4
4
  export declare function useTooltip(props: TooltipProps): {
5
- isOpen: boolean;
6
- triggerRef: import('react').RefObject<HTMLElement>;
7
- contentRef: import('react').RefObject<HTMLDivElement>;
8
- getTriggerProps: () => {
9
- ref: import('react').RefObject<HTMLElement>;
10
- onMouseEnter: () => void;
11
- onMouseLeave: () => void;
12
- onFocus: () => void;
13
- onBlur: () => void;
14
- "aria-describedby": string | undefined;
5
+ isOpen: boolean;
6
+ triggerRef: import("react").RefObject<HTMLElement>;
7
+ contentRef: import("react").RefObject<HTMLDivElement>;
8
+ getTriggerProps: () => {
9
+ ref: import("react").RefObject<HTMLElement>;
10
+ onMouseEnter: () => void;
11
+ onMouseLeave: () => void;
12
+ onFocus: () => void;
13
+ onBlur: () => void;
14
+ "aria-describedby": string | undefined;
15
+ };
16
+ getTooltipProps: () => {
17
+ ref: import("react").RefObject<HTMLDivElement>;
18
+ id: string;
19
+ role: string;
20
+ style: {
21
+ position: "fixed";
22
+ top: number;
23
+ left: number;
15
24
  };
16
- getTooltipProps: () => {
17
- ref: import('react').RefObject<HTMLDivElement>;
18
- id: string;
19
- role: string;
20
- style: {
21
- position: "fixed";
22
- top: number;
23
- left: number;
24
- };
25
- onMouseEnter: () => void;
26
- onMouseLeave: () => void;
27
- };
28
- position: Position;
25
+ onMouseEnter: () => void;
26
+ onMouseLeave: () => void;
27
+ };
28
+ position: Position;
29
29
  };
@@ -1,22 +1,33 @@
1
- import { Placement } from './tooltip.types';
1
+ import { Placement } from "./tooltip.types";
2
2
 
3
3
  export type Position = {
4
- x: number;
5
- y: number;
6
- placement: Placement;
4
+ x: number;
5
+ y: number;
6
+ placement: Placement;
7
7
  };
8
8
  interface Rect {
9
- top: number;
10
- left: number;
11
- width: number;
12
- height: number;
13
- bottom: number;
14
- right: number;
9
+ top: number;
10
+ left: number;
11
+ width: number;
12
+ height: number;
13
+ bottom: number;
14
+ right: number;
15
15
  }
16
16
  export declare function getScrollParent(node: HTMLElement | null): HTMLElement | Window;
17
- export declare function calculatePosition(triggerRect: Rect, contentRect: Rect, placement: Placement, offset: number): Position;
18
- export declare function getAutoPosition(triggerRect: Rect, contentRect: Rect, placement: Placement, offset: number, viewport: {
17
+ export declare function calculatePosition(
18
+ triggerRect: Rect,
19
+ contentRect: Rect,
20
+ placement: Placement,
21
+ offset: number,
22
+ ): Position;
23
+ export declare function getAutoPosition(
24
+ triggerRect: Rect,
25
+ contentRect: Rect,
26
+ placement: Placement,
27
+ offset: number,
28
+ viewport: {
19
29
  width: number;
20
30
  height: number;
21
- }): Position;
31
+ },
32
+ ): Position;
22
33
  export {};