@ssa-ui-kit/core 2.33.0 → 3.1.0
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/AccordionGroup/Accordion.d.ts +37 -0
- package/dist/components/AccordionGroup/AccordionContent.d.ts +48 -0
- package/dist/components/AccordionGroup/AccordionContext.d.ts +76 -2
- package/dist/components/AccordionGroup/AccordionGroup.d.ts +56 -0
- package/dist/components/AccordionGroup/AccordionTitle.d.ts +41 -0
- package/dist/components/AccordionGroup/types.d.ts +199 -1
- package/dist/components/Avatar/Avatar.d.ts +33 -0
- package/dist/components/Button/Button.d.ts +61 -0
- package/dist/components/Button/fixtures.d.ts +52 -31
- package/dist/components/Button/styles.d.ts +7 -12
- package/dist/components/Button/types.d.ts +98 -4
- package/dist/components/Charts/BarGaugeChart/components/BarGaugeChartHeader.d.ts +1 -1
- package/dist/components/Charts/BarLineComplexChart/BarLineComplexChartView.d.ts +2 -2
- package/dist/components/Charts/BarLineComplexChart/types.d.ts +2 -2
- package/dist/components/Charts/BigNumberChart/BigNumberChart.d.ts +4 -2
- package/dist/components/Charts/BigNumberChart/components/BigNumberChartHeader.d.ts +1 -1
- package/dist/components/Charts/BigNumberChart/components/TrendLine.d.ts +8 -3
- package/dist/components/Charts/BigNumberChart/components/TrendLineTooltip.d.ts +8 -5
- package/dist/components/Charts/GaugeChart/components/GaugeChartBase.d.ts +3 -1
- package/dist/components/Charts/GaugeChart/components/GaugeChartHeader.d.ts +1 -1
- package/dist/components/Charts/PieChart/PieChartLegendMarker.d.ts +1 -1
- package/dist/components/Charts/PieChart/styles.d.ts +1 -1
- package/dist/components/Charts/PieChart/types.d.ts +1 -1
- package/dist/components/Charts/RadarChart/RadarChart.d.ts +1 -1
- package/dist/components/Charts/RadarChart/components/RadarChartHeader.d.ts +1 -1
- package/dist/components/Charts/TreeMapChart/TreeMapChart.d.ts +1 -1
- package/dist/components/Charts/TreeMapChart/TreeMapChartHeader.d.ts +1 -1
- package/dist/components/Charts/index.d.ts +1 -0
- package/dist/components/Charts/utils/nivoReact19Compat.d.ts +18 -0
- package/dist/components/Checkbox/Checkbox.d.ts +84 -0
- package/dist/components/Checkbox/CheckboxBase.d.ts +1 -1
- package/dist/components/Checkbox/styles.d.ts +2 -2
- package/dist/components/Checkbox/types.d.ts +104 -3
- package/dist/components/Chip/Chip.d.ts +70 -0
- package/dist/components/Chip/constants.d.ts +1 -1
- package/dist/components/Chip/helpers.d.ts +6 -0
- package/dist/components/Chip/types.d.ts +129 -1
- package/dist/components/CollapsibleNavBar/CollapsibleNavBar.d.ts +1 -1
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarContext.d.ts +2 -2
- package/dist/components/CollapsibleNavBar/components/TriggerIcon.d.ts +4 -2
- package/dist/components/CollapsibleNavBar/types.d.ts +9 -2
- package/dist/components/ColorPicker/components/CopyButton.d.ts +1 -1
- package/dist/components/DatePicker/constants.d.ts +22 -0
- package/dist/components/DatePicker/hooks/useDatePicker.d.ts +7 -5
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/styles.d.ts +3 -2
- package/dist/components/DatePicker/types.d.ts +10 -2
- package/dist/components/DatePicker/utils/dates.d.ts +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePickerFormBridge.d.ts +46 -0
- package/dist/components/DateRangePicker/components/DatesListWrapper.d.ts +3 -2
- package/dist/components/DateRangePicker/constants.d.ts +1 -0
- package/dist/components/DateRangePicker/hooks/useDateRangePicker.d.ts +22 -17
- package/dist/components/DateRangePicker/index.d.ts +3 -0
- package/dist/components/DateRangePicker/styles.d.ts +6 -4
- package/dist/components/DateRangePicker/types.d.ts +24 -7
- package/dist/components/DateRangePicker/utils/dates.d.ts +2 -2
- package/dist/components/Drawer/index.d.ts +2 -1
- package/dist/components/Dropdown/Dropdown.d.ts +88 -0
- package/dist/components/Dropdown/types.d.ts +102 -1
- package/dist/components/DropdownOption/DropdownOption.d.ts +2 -0
- package/dist/components/DropdownOptions/DropdownOptions.d.ts +31 -0
- package/dist/components/DropdownOptions/types.d.ts +22 -0
- package/dist/components/DropdownToggle/DropdownToggle.d.ts +3 -2
- package/dist/components/DropdownToggle/types.d.ts +5 -3
- package/dist/components/Field/FieldControl.d.ts +62 -1
- package/dist/components/Field/FieldDescription.d.ts +33 -0
- package/dist/components/Field/FieldError.d.ts +36 -0
- package/dist/components/Field/FieldLabel.d.ts +37 -0
- package/dist/components/Field/FieldProvider.d.ts +19 -1
- package/dist/components/Field/FieldRoot.d.ts +90 -0
- package/dist/components/Field/FieldSuccess.d.ts +34 -0
- package/dist/components/Field/index.d.ts +4 -0
- package/dist/components/Filters/FilterBlockWrapper.d.ts +3 -2
- package/dist/components/Filters/FiltersContext.d.ts +4 -4
- package/dist/components/Filters/hooks/useVisibility.d.ts +2 -2
- package/dist/components/FullscreenModeContext.d.ts +1 -4
- package/dist/components/Icon/icons/Assessment.d.ts +1 -1
- package/dist/components/Icon/icons/Award.d.ts +3 -0
- package/dist/components/Icon/icons/Bench.d.ts +3 -0
- package/dist/components/Icon/icons/Briefcase.d.ts +3 -0
- package/dist/components/Icon/icons/Building.d.ts +3 -0
- package/dist/components/Icon/icons/CalendarSchedule.d.ts +3 -0
- package/dist/components/Icon/icons/Camera.d.ts +3 -0
- package/dist/components/Icon/icons/CardText.d.ts +3 -0
- package/dist/components/Icon/icons/Case.d.ts +3 -0
- package/dist/components/Icon/icons/Comments.d.ts +3 -0
- package/dist/components/Icon/icons/Compensation.d.ts +3 -0
- package/dist/components/Icon/icons/Contacts.d.ts +3 -0
- package/dist/components/Icon/icons/CopyLink.d.ts +3 -0
- package/dist/components/Icon/icons/Delete.d.ts +3 -0
- package/dist/components/Icon/icons/DiamondRing.d.ts +3 -0
- package/dist/components/Icon/icons/Document.d.ts +3 -0
- package/dist/components/Icon/icons/Documents.d.ts +3 -0
- package/dist/components/Icon/icons/Education.d.ts +3 -0
- package/dist/components/Icon/icons/EmployeeProfile.d.ts +3 -0
- package/dist/components/Icon/icons/Export.d.ts +3 -0
- package/dist/components/Icon/icons/FollowLink.d.ts +3 -0
- package/dist/components/Icon/icons/Form.d.ts +3 -0
- package/dist/components/Icon/icons/Gender.d.ts +3 -0
- package/dist/components/Icon/icons/Gift.d.ts +3 -0
- package/dist/components/Icon/icons/Inventory.d.ts +3 -0
- package/dist/components/Icon/icons/Link.d.ts +3 -0
- package/dist/components/Icon/icons/OfficeChair.d.ts +3 -0
- package/dist/components/Icon/icons/OpenBook.d.ts +3 -0
- package/dist/components/Icon/icons/Report.d.ts +1 -1
- package/dist/components/Icon/icons/Results.d.ts +3 -0
- package/dist/components/Icon/icons/Signature.d.ts +3 -0
- package/dist/components/Icon/icons/Summery.d.ts +3 -0
- package/dist/components/Icon/icons/Team.d.ts +3 -0
- package/dist/components/Icon/icons/TechnicalReview.d.ts +3 -0
- package/dist/components/Icon/icons/TennisBall.d.ts +3 -0
- package/dist/components/Icon/icons/Timeline.d.ts +3 -0
- package/dist/components/Icon/icons/UnionCircle.d.ts +3 -0
- package/dist/components/Icon/icons/Url.d.ts +3 -0
- package/dist/components/Icon/icons/all.d.ts +36 -1
- package/dist/components/Icon/icons/iconsList.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +39 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/IconButton/styles.d.ts +2 -0
- package/dist/components/IconButton/types.d.ts +41 -0
- package/dist/components/Indicator/types.d.ts +4 -2
- package/dist/components/Input/types.d.ts +157 -0
- package/dist/components/JsonSchemaForm/fields/DateRangeField.d.ts +15 -1
- package/dist/components/JsonSchemaForm/utils/dateFormats.d.ts +37 -0
- package/dist/components/JsonSchemaForm/utils/dateRangeField.d.ts +24 -0
- package/dist/components/JsonSchemaForm/utils/index.d.ts +1 -0
- package/dist/components/JsonSchemaForm/utils/selectWidget.d.ts +16 -0
- package/dist/components/Modal/Modal.d.ts +60 -0
- package/dist/components/Modal/types.d.ts +21 -1
- package/dist/components/ModalContent/ModalContent.d.ts +42 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +27 -0
- package/dist/components/ModalDialog/types.d.ts +18 -0
- package/dist/components/ModalDismissButton/ModalDismissButton.d.ts +29 -2
- package/dist/components/ModalOpenButton/ModalOpenButton.d.ts +25 -1
- package/dist/components/MultipleDropdown/index.d.ts +1 -0
- package/dist/components/MultipleDropdown/types.d.ts +74 -0
- package/dist/components/NavBar/types.d.ts +1 -1
- package/dist/components/NotificationMenu/types.d.ts +3 -3
- package/dist/components/Pagination/ArrowButton.d.ts +32 -0
- package/dist/components/Pagination/Pagination.d.ts +81 -0
- package/dist/components/Pagination/PaginationButtons.d.ts +35 -0
- package/dist/components/Pagination/PaginationContext.d.ts +30 -0
- package/dist/components/Pagination/WithPagination.d.ts +47 -4
- package/dist/components/Pagination/components/RowsPerPageDropdown/RowsPerPageDropdown.d.ts +41 -0
- package/dist/components/Pagination/components/RowsPerPageDropdown/types.d.ts +39 -0
- package/dist/components/Pagination/styles.d.ts +1 -1
- package/dist/components/Pagination/types.d.ts +178 -0
- package/dist/components/PersonInfo/styles.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts +120 -0
- package/dist/components/Popover/PopoverClose.d.ts +26 -0
- package/dist/components/Popover/PopoverContent.d.ts +33 -0
- package/dist/components/Popover/PopoverDescription.d.ts +22 -1
- package/dist/components/Popover/PopoverHeading.d.ts +22 -1
- package/dist/components/Popover/PopoverTrigger.d.ts +30 -0
- package/dist/components/Popover/hooks/usePopover.d.ts +21 -0
- package/dist/components/Popover/hooks/usePopoverContext.d.ts +23 -0
- package/dist/components/Popover/types.d.ts +86 -0
- package/dist/components/Radio/Radio.d.ts +69 -1
- package/dist/components/Radio/RadioBase.d.ts +1 -1
- package/dist/components/Radio/types.d.ts +109 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/RadioGroup/types.d.ts +42 -0
- package/dist/components/SearchBox/SearchBox.d.ts +60 -0
- package/dist/components/SearchBox/SearchBoxInput.d.ts +1 -1
- package/dist/components/SearchBox/types.d.ts +46 -0
- package/dist/components/Slider/Slider.d.ts +53 -0
- package/dist/components/Slider/consts.d.ts +4 -0
- package/dist/components/Slider/index.d.ts +4 -0
- package/dist/components/Slider/styles.d.ts +90 -0
- package/dist/components/Slider/types.d.ts +69 -0
- package/dist/components/Switch/Switch.d.ts +66 -1
- package/dist/components/Switch/SwitchBase.d.ts +5 -1
- package/dist/components/Switch/SwitchContext.d.ts +50 -0
- package/dist/components/Switch/types.d.ts +74 -0
- package/dist/components/Table/Table.d.ts +74 -0
- package/dist/components/TableBody/TableBody.d.ts +55 -0
- package/dist/components/TableCell/TableCell.d.ts +56 -4
- package/dist/components/TableCell/types.d.ts +33 -0
- package/dist/components/TableCellHeader/TableCellHeader.d.ts +63 -2
- package/dist/components/TableCellHeader/types.d.ts +28 -0
- package/dist/components/TableFilters/TableFilters.d.ts +72 -0
- package/dist/components/TableFilters/hooks/useTableData.d.ts +3 -3
- package/dist/components/TableFilters/types.d.ts +130 -2
- package/dist/components/TableHead/TableHead.d.ts +37 -0
- package/dist/components/TableRow/TableRow.d.ts +2 -7
- package/dist/components/TableRow/types.d.ts +34 -0
- package/dist/components/TextField/TextField.d.ts +76 -0
- package/dist/components/TextField/types.d.ts +80 -0
- package/dist/components/Textarea/Textarea.d.ts +81 -0
- package/dist/components/Textarea/TextareaBase.d.ts +6 -1
- package/dist/components/Textarea/types.d.ts +109 -0
- package/dist/components/Tooltip/SimpleChartTooltip.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts +73 -0
- package/dist/components/Tooltip/types.d.ts +116 -5
- package/dist/components/TooltipContent/TooltipContent.d.ts +45 -0
- package/dist/components/TooltipTrigger/TooltipTrigger.d.ts +27 -1
- package/dist/components/Typeahead/Typeahead.context.d.ts +10 -4
- package/dist/components/Typeahead/Typeahead.d.ts +173 -9
- package/dist/components/Typeahead/components/TypeaheadOption.d.ts +1 -1
- package/dist/components/Typeahead/styles.d.ts +10 -5
- package/dist/components/Typeahead/types.d.ts +191 -1
- package/dist/components/Typeahead/useTypeahead.d.ts +13 -5
- package/dist/components/Typography/Typography.d.ts +50 -0
- package/dist/components/Typography/types.d.ts +67 -0
- package/dist/components/UserProfile/UserProfile.d.ts +76 -0
- package/dist/components/UserProfile/styles.d.ts +6 -4
- package/dist/components/UserProfile/types.d.ts +85 -1
- package/dist/components/WidgetCard/Title.d.ts +1 -1
- package/dist/components/WidgetCard/WidgetCardBase.d.ts +1 -1
- package/dist/components/WithLink.d.ts +1 -1
- package/dist/components/Wrapper/Wrapper.d.ts +83 -2
- package/dist/components/Wrapper/index.d.ts +1 -0
- package/dist/components/index.d.ts +113 -85
- package/dist/index.d.ts +1 -0
- package/dist/index.js +48942 -19624
- package/dist/index.js.map +1 -1
- package/dist/types/emotion.d.ts +65 -0
- package/dist/utils/react19HocCompat.d.ts +14 -0
- package/package.json +42 -33
- package/dist/components/Icon/icons/Company.d.ts +0 -3
|
@@ -1,3 +1,79 @@
|
|
|
1
1
|
import { TextFieldProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* TextField - Ready-to-use text input (single- or multi-line) with label and validation UI.
|
|
4
|
+
*
|
|
5
|
+
* Purpose: one component for text inputs with built-in label, helper text, validation
|
|
6
|
+
* error/success display, and optional character counting. Renders as Input or Textarea
|
|
7
|
+
* based on the `multirow` prop. Automatically manages status (basic, error, success)
|
|
8
|
+
* from props. Use when you want a complete text field without composing Field primitives;
|
|
9
|
+
* use Field when you need custom layout or non-text controls.
|
|
10
|
+
*
|
|
11
|
+
* @category Form Controls
|
|
12
|
+
* @subcategory Input
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* // Single-line text field
|
|
17
|
+
* const { register } = useForm();
|
|
18
|
+
* <TextField
|
|
19
|
+
* name="username"
|
|
20
|
+
* label="Username"
|
|
21
|
+
* placeholder="Enter your username"
|
|
22
|
+
* register={register}
|
|
23
|
+
* helperText="Choose a unique username"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* // Multi-line text field with character count
|
|
30
|
+
* <TextField
|
|
31
|
+
* name="description"
|
|
32
|
+
* label="Description"
|
|
33
|
+
* multirow
|
|
34
|
+
* rows={5}
|
|
35
|
+
* maxLength={500}
|
|
36
|
+
* register={register}
|
|
37
|
+
* helperText="Tell us about yourself"
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Text field with validation errors
|
|
44
|
+
* <TextField
|
|
45
|
+
* name="email"
|
|
46
|
+
* label="Email Address"
|
|
47
|
+
* register={register}
|
|
48
|
+
* errors={errors.email}
|
|
49
|
+
* helperText="We'll never share your email"
|
|
50
|
+
* />
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* // Success state
|
|
56
|
+
* <TextField
|
|
57
|
+
* name="username"
|
|
58
|
+
* label="Username"
|
|
59
|
+
* register={register}
|
|
60
|
+
* success={isValid}
|
|
61
|
+
* helperText="Username is available!"
|
|
62
|
+
* />
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @see {@link Input} - For single-line input component
|
|
66
|
+
* @see {@link Textarea} - For multi-line textarea component
|
|
67
|
+
* @see {@link Field} - For more advanced field layout with Field.Root
|
|
68
|
+
*
|
|
69
|
+
* @note React Hook Form integration is optional. If `register` is not provided,
|
|
70
|
+
* the component will still work but validation features will be unavailable.
|
|
71
|
+
*
|
|
72
|
+
* @accessibility
|
|
73
|
+
* - Full keyboard navigation support
|
|
74
|
+
* - Screen reader friendly with proper labels
|
|
75
|
+
* - ARIA attributes via React Hook Form (when register is provided)
|
|
76
|
+
* - Error messages announced to screen readers
|
|
77
|
+
*/
|
|
2
78
|
declare const TextField: ({ multirow, name, label, errors, helperText, success, disabled, maxLength, ...props }: TextFieldProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
79
|
export default TextField;
|
|
@@ -1,11 +1,91 @@
|
|
|
1
1
|
import type { UseFormReturn, FieldError } from 'react-hook-form';
|
|
2
2
|
import { InputProps } from '../Input/types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the TextField component
|
|
5
|
+
*
|
|
6
|
+
* A unified text input component that can render as either a single-line Input
|
|
7
|
+
* or multi-line Textarea based on the `multirow` prop. Includes built-in label,
|
|
8
|
+
* helper text, error handling, and character counting. Automatically switches
|
|
9
|
+
* between Input and Textarea components while maintaining consistent API.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // Single-line text field
|
|
14
|
+
* const { register } = useForm();
|
|
15
|
+
* <TextField
|
|
16
|
+
* name="username"
|
|
17
|
+
* label="Username"
|
|
18
|
+
* placeholder="Enter your username"
|
|
19
|
+
* register={register}
|
|
20
|
+
* helperText="Choose a unique username"
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* // Multi-line text field
|
|
27
|
+
* <TextField
|
|
28
|
+
* name="description"
|
|
29
|
+
* label="Description"
|
|
30
|
+
* multirow
|
|
31
|
+
* rows={5}
|
|
32
|
+
* maxLength={500}
|
|
33
|
+
* register={register}
|
|
34
|
+
* helperText="Maximum 500 characters"
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* // Text field with validation
|
|
41
|
+
* <TextField
|
|
42
|
+
* name="email"
|
|
43
|
+
* label="Email"
|
|
44
|
+
* register={register}
|
|
45
|
+
* errors={errors.email}
|
|
46
|
+
* helperText="We'll never share your email"
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @note React Hook Form integration is optional. If `register` is not provided,
|
|
51
|
+
* the component will still work but validation features will be unavailable.
|
|
52
|
+
*/
|
|
3
53
|
export interface TextFieldProps extends InputProps, Partial<Pick<UseFormReturn, 'register'>> {
|
|
54
|
+
/**
|
|
55
|
+
* Label text displayed above the input field
|
|
56
|
+
*/
|
|
4
57
|
label?: string;
|
|
58
|
+
/**
|
|
59
|
+
* React Hook Form field error object
|
|
60
|
+
* Used to display validation error messages
|
|
61
|
+
*/
|
|
5
62
|
errors?: FieldError;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to display success state styling
|
|
65
|
+
* When true, status is set to 'success'
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
6
68
|
success?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Helper text displayed below the input
|
|
71
|
+
* Shown when no errors are present
|
|
72
|
+
*/
|
|
7
73
|
helperText?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Number of rows for multi-row text fields
|
|
76
|
+
* Only applies when `multirow` is true
|
|
77
|
+
* @default undefined (uses Textarea default)
|
|
78
|
+
*/
|
|
8
79
|
rows?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Whether to render as multi-line textarea
|
|
82
|
+
* When true, uses Textarea component; when false, uses Input component
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
9
85
|
multirow?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Maximum character length
|
|
88
|
+
* When provided, displays character count (e.g., "45 / 500")
|
|
89
|
+
*/
|
|
10
90
|
maxLength?: number;
|
|
11
91
|
}
|
|
@@ -1,4 +1,85 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextareaProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Textarea - Multi-line text input component
|
|
5
|
+
*
|
|
6
|
+
* A textarea component with React Hook Form integration, validation support,
|
|
7
|
+
* character limits, and paste handling. Designed for longer text input such as
|
|
8
|
+
* comments, descriptions, messages, or any multi-line content.
|
|
9
|
+
*
|
|
10
|
+
* @category Form Controls
|
|
11
|
+
* @subcategory Input
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Basic textarea with React Hook Form
|
|
16
|
+
* const { register } = useForm();
|
|
17
|
+
* <Textarea
|
|
18
|
+
* name="message"
|
|
19
|
+
* placeholder="Enter your message"
|
|
20
|
+
* register={register}
|
|
21
|
+
* rows={5}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* // Textarea with validation and character limit
|
|
28
|
+
* const { register } = useForm();
|
|
29
|
+
* const [charCount, setCharCount] = useState(0);
|
|
30
|
+
*
|
|
31
|
+
* <Textarea
|
|
32
|
+
* name="description"
|
|
33
|
+
* placeholder="Describe your project..."
|
|
34
|
+
* register={register}
|
|
35
|
+
* validationSchema={{
|
|
36
|
+
* required: 'Description is required',
|
|
37
|
+
* maxLength: { value: 500, message: 'Maximum 500 characters' }
|
|
38
|
+
* }}
|
|
39
|
+
* maxLength={500}
|
|
40
|
+
* rows={8}
|
|
41
|
+
* setCountChar={(e) => setCharCount(e.target.value.length)}
|
|
42
|
+
* />
|
|
43
|
+
* <span>{charCount} / 500 characters</span>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* // Using with Field component
|
|
49
|
+
* <Field.Root>
|
|
50
|
+
* <Field.Label htmlFor="comments">Comments</Field.Label>
|
|
51
|
+
* <Field.Control>
|
|
52
|
+
* <Textarea
|
|
53
|
+
* id="comments"
|
|
54
|
+
* name="comments"
|
|
55
|
+
* register={register}
|
|
56
|
+
* rows={6}
|
|
57
|
+
* css={{ width: '100%', border: '0 !important' }}
|
|
58
|
+
* />
|
|
59
|
+
* </Field.Control>
|
|
60
|
+
* <Field.Description>Optional feedback or notes</Field.Description>
|
|
61
|
+
* </Field.Root>
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* // Standalone textarea without React Hook Form
|
|
67
|
+
* <Textarea
|
|
68
|
+
* name="notes"
|
|
69
|
+
* placeholder="Enter notes..."
|
|
70
|
+
* rows={5}
|
|
71
|
+
* onChange={(e) => handleChange(e.target.value)}
|
|
72
|
+
* />
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @see {@link Field} - Use Field.Root to wrap Textarea for labels and validation
|
|
76
|
+
* @see {@link Input} - For single-line text input
|
|
77
|
+
*
|
|
78
|
+
* @accessibility
|
|
79
|
+
* - Full keyboard navigation support
|
|
80
|
+
* - Screen reader friendly
|
|
81
|
+
* - ARIA attributes via React Hook Form (when register is provided)
|
|
82
|
+
* - Respects disabled and readOnly states
|
|
83
|
+
*/
|
|
3
84
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
4
85
|
export default Textarea;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { Theme } from '@emotion/react';
|
|
2
|
+
type TextareaStatus = 'basic' | 'error' | 'success' | 'custom';
|
|
1
3
|
export declare const TextareaBase: import("@emotion/styled").StyledComponent<{
|
|
2
|
-
theme?:
|
|
4
|
+
theme?: Theme;
|
|
3
5
|
as?: React.ElementType;
|
|
6
|
+
} & {
|
|
7
|
+
status?: TextareaStatus;
|
|
4
8
|
}, import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {}>;
|
|
9
|
+
export {};
|
|
@@ -1,16 +1,125 @@
|
|
|
1
1
|
import { ReactEventHandler } from 'react';
|
|
2
2
|
import type { UseFormReturn } from 'react-hook-form';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Textarea component
|
|
5
|
+
*
|
|
6
|
+
* A multi-line text input component with React Hook Form integration and validation.
|
|
7
|
+
* Supports character limits, paste handling, and all standard textarea features.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Basic textarea with React Hook Form
|
|
12
|
+
* const { register } = useForm();
|
|
13
|
+
* <Textarea
|
|
14
|
+
* name="message"
|
|
15
|
+
* placeholder="Enter your message"
|
|
16
|
+
* register={register}
|
|
17
|
+
* rows={5}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* // Textarea with validation and character limit
|
|
24
|
+
* <Textarea
|
|
25
|
+
* name="description"
|
|
26
|
+
* register={register}
|
|
27
|
+
* validationSchema={{
|
|
28
|
+
* required: 'Description is required',
|
|
29
|
+
* maxLength: { value: 500, message: 'Maximum 500 characters' }
|
|
30
|
+
* }}
|
|
31
|
+
* maxLength={500}
|
|
32
|
+
* rows={10}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* // Read-only textarea
|
|
39
|
+
* <Textarea
|
|
40
|
+
* name="readonly-content"
|
|
41
|
+
* register={register}
|
|
42
|
+
* readOnly
|
|
43
|
+
* rows={8}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @note React Hook Form integration is optional. If `register` is not provided,
|
|
48
|
+
* the component will still work but validation features will be unavailable.
|
|
49
|
+
*/
|
|
3
50
|
export interface TextareaProps extends Partial<Pick<UseFormReturn, 'register'>> {
|
|
51
|
+
/**
|
|
52
|
+
* Name attribute for the textarea, required for React Hook Form integration
|
|
53
|
+
*/
|
|
4
54
|
name: string;
|
|
55
|
+
/**
|
|
56
|
+
* Placeholder text displayed when textarea is empty
|
|
57
|
+
*/
|
|
5
58
|
placeholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* React Hook Form validation schema
|
|
61
|
+
* Object containing validation rules (required, maxLength, pattern, etc.)
|
|
62
|
+
*/
|
|
6
63
|
validationSchema?: Record<string, unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the textarea is disabled
|
|
66
|
+
* Disabled textarea elements cannot be edited
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
7
69
|
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the textarea is read-only
|
|
72
|
+
* Read-only textarea elements can be focused and scrolled but not edited
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
8
75
|
readOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Number of visible text rows
|
|
78
|
+
* Determines the initial height of the textarea
|
|
79
|
+
* @default 10
|
|
80
|
+
*/
|
|
9
81
|
rows?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Maximum character length for the textarea
|
|
84
|
+
* Use with setCountChar callback to track character count
|
|
85
|
+
*/
|
|
10
86
|
maxLength?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Visual validation status (aligns with Input/TextField palette behavior).
|
|
89
|
+
* - `basic`: default border/outline (theme.colors grey)
|
|
90
|
+
* - `error`: error state (theme.palette.error)
|
|
91
|
+
* - `success`: success state (theme.palette.success)
|
|
92
|
+
* - `custom`: same as basic (no palette styling)
|
|
93
|
+
* @default 'basic'
|
|
94
|
+
*/
|
|
95
|
+
status?: 'basic' | 'error' | 'success' | 'custom';
|
|
96
|
+
/**
|
|
97
|
+
* Custom element type to render as (for composition)
|
|
98
|
+
*/
|
|
11
99
|
as?: React.ElementType;
|
|
100
|
+
/**
|
|
101
|
+
* Custom CSS class name
|
|
102
|
+
*/
|
|
12
103
|
className?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Title attribute for the textarea element
|
|
106
|
+
* Provides tooltip text on hover
|
|
107
|
+
*/
|
|
13
108
|
title?: string;
|
|
109
|
+
/**
|
|
110
|
+
* HTML id attribute for the textarea (e.g. for label htmlFor).
|
|
111
|
+
* Defaults to `formElement-${name}` when not provided.
|
|
112
|
+
*/
|
|
113
|
+
id?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Paste event handler
|
|
116
|
+
* Fired when content is pasted into the textarea
|
|
117
|
+
*/
|
|
14
118
|
onPaste?: React.ClipboardEventHandler<HTMLTextAreaElement>;
|
|
119
|
+
/**
|
|
120
|
+
* Callback function to track character count
|
|
121
|
+
* Called with the event when content changes
|
|
122
|
+
* Useful for displaying character count UI
|
|
123
|
+
*/
|
|
15
124
|
setCountChar?: ReactEventHandler;
|
|
16
125
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { LineSeries } from '@nivo/line';
|
|
1
2
|
import { SimpleChartTooltipProps } from './types';
|
|
2
|
-
export declare const SimpleChartTooltip: ({ point, size, renderValue, }: SimpleChartTooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const SimpleChartTooltip: <Series extends LineSeries>({ point, size, renderValue, }: SimpleChartTooltipProps<Series>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,76 @@
|
|
|
1
1
|
import { TooltipProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip - Contextual information component
|
|
4
|
+
*
|
|
5
|
+
* A flexible tooltip system built on Floating UI that provides contextual
|
|
6
|
+
* information when users interact with trigger elements. Uses a compound
|
|
7
|
+
* component pattern with Tooltip (root), TooltipTrigger (activator), and
|
|
8
|
+
* TooltipContent (display).
|
|
9
|
+
*
|
|
10
|
+
* Supports multiple interaction modes (hover, click, follow cursor), flexible
|
|
11
|
+
* positioning with auto-adjustment, and customizable appearance with size
|
|
12
|
+
* variants and optional arrows.
|
|
13
|
+
*
|
|
14
|
+
* @category Components
|
|
15
|
+
* @subcategory Overlay
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* // Basic tooltip on hover
|
|
20
|
+
* <Tooltip>
|
|
21
|
+
* <TooltipTrigger>
|
|
22
|
+
* <Button>Hover me</Button>
|
|
23
|
+
* </TooltipTrigger>
|
|
24
|
+
* <TooltipContent>This is helpful information</TooltipContent>
|
|
25
|
+
* </Tooltip>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* // Tooltip with custom placement
|
|
31
|
+
* <Tooltip placement="bottom" size="large">
|
|
32
|
+
* <TooltipTrigger>
|
|
33
|
+
* <Icon name="info" />
|
|
34
|
+
* </TooltipTrigger>
|
|
35
|
+
* <TooltipContent>
|
|
36
|
+
* <div>
|
|
37
|
+
* <strong>Detailed Information</strong>
|
|
38
|
+
* <p>This is a larger tooltip with more content</p>
|
|
39
|
+
* </div>
|
|
40
|
+
* </TooltipContent>
|
|
41
|
+
* </Tooltip>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* // Click-to-open tooltip
|
|
47
|
+
* <Tooltip enableClick enableHover={false}>
|
|
48
|
+
* <TooltipTrigger>
|
|
49
|
+
* <Button>Click for info</Button>
|
|
50
|
+
* </TooltipTrigger>
|
|
51
|
+
* <TooltipContent>Information that appears on click</TooltipContent>
|
|
52
|
+
* </Tooltip>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* // Tooltip without arrow
|
|
58
|
+
* <Tooltip hasArrow={false}>
|
|
59
|
+
* <TooltipTrigger>
|
|
60
|
+
* <span>?</span>
|
|
61
|
+
* </TooltipTrigger>
|
|
62
|
+
* <TooltipContent>No arrow tooltip</TooltipContent>
|
|
63
|
+
* </Tooltip>
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @see {@link TooltipTrigger} - Trigger element component
|
|
67
|
+
* @see {@link TooltipContent} - Content display component
|
|
68
|
+
*
|
|
69
|
+
* @accessibility
|
|
70
|
+
* - Keyboard accessible (ESC to close)
|
|
71
|
+
* - Focus management for click-triggered tooltips
|
|
72
|
+
* - ARIA attributes automatically applied
|
|
73
|
+
* - Screen reader friendly
|
|
74
|
+
*/
|
|
2
75
|
declare const Tooltip: ({ children, ...props }: TooltipProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
76
|
export default Tooltip;
|
|
@@ -1,30 +1,110 @@
|
|
|
1
1
|
import { useInteractions, FloatingArrow, Placement, UseFloatingReturn, OffsetOptions } from '@floating-ui/react';
|
|
2
|
-
import { PointTooltipProps, Point } from '@nivo/line';
|
|
2
|
+
import { PointTooltipProps, Point, LineSeries } from '@nivo/line';
|
|
3
3
|
import { MapIconsType } from '../Icon/types';
|
|
4
4
|
import { ProgressBarProps } from '../ProgressBar/types';
|
|
5
5
|
import { SerializedStyles } from '@emotion/react';
|
|
6
6
|
import { CommonProps } from '../../types/emotion';
|
|
7
|
+
/**
|
|
8
|
+
* Size variant for tooltip content
|
|
9
|
+
* - `small`: Compact tooltip with minimal padding
|
|
10
|
+
* - `medium`: Standard tooltip size (default)
|
|
11
|
+
* - `large`: Larger tooltip for more content
|
|
12
|
+
*/
|
|
7
13
|
export type TooltipSize = 'small' | 'medium' | 'large';
|
|
14
|
+
/**
|
|
15
|
+
* Props for the Tooltip component
|
|
16
|
+
*
|
|
17
|
+
* Root container component for tooltip system using compound component pattern.
|
|
18
|
+
* Provides context and positioning configuration for TooltipTrigger and TooltipContent.
|
|
19
|
+
* Built on Floating UI for flexible positioning and interaction modes.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <Tooltip placement="top">
|
|
24
|
+
* <TooltipTrigger>
|
|
25
|
+
* <Button>Hover me</Button>
|
|
26
|
+
* </TooltipTrigger>
|
|
27
|
+
* <TooltipContent>This is a tooltip</TooltipContent>
|
|
28
|
+
* </Tooltip>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
8
31
|
export interface TooltipProps extends CommonProps {
|
|
32
|
+
/**
|
|
33
|
+
* TooltipTrigger and TooltipContent components
|
|
34
|
+
* Must include both TooltipTrigger and TooltipContent as children
|
|
35
|
+
*/
|
|
9
36
|
children: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Preferred placement of the tooltip relative to trigger
|
|
39
|
+
* Floating UI will auto-adjust if space is insufficient
|
|
40
|
+
*/
|
|
10
41
|
placement?: Placement;
|
|
42
|
+
/**
|
|
43
|
+
* Enable tooltip on hover interaction
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
11
46
|
enableHover?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Enable tooltip on click interaction
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
12
51
|
enableClick?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Enable tooltip to follow client point (mouse position)
|
|
54
|
+
* Useful for interactive tooltips like charts
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
13
57
|
enableClientPoint?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Offset configuration for tooltip positioning
|
|
60
|
+
* Allows fine-tuning of spacing from trigger element
|
|
61
|
+
*/
|
|
14
62
|
offsetOptions?: OffsetOptions;
|
|
63
|
+
/**
|
|
64
|
+
* Allow hovering over tooltip content itself
|
|
65
|
+
* When true, tooltip stays open when hovering over content
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
15
68
|
allowHoverContent?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Delay in milliseconds before tooltip appears on hover
|
|
71
|
+
* Helps prevent "traffic light" effect when quickly moving through multiple tooltips
|
|
72
|
+
* @default 0
|
|
73
|
+
*/
|
|
74
|
+
hoverOpenDelay?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Delay in milliseconds before tooltip disappears after mouse leaves
|
|
77
|
+
* Helps prevent tooltip from flickering when moving between trigger and content
|
|
78
|
+
* @default 0
|
|
79
|
+
*/
|
|
80
|
+
hoverCloseDelay?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Size variant of the tooltip content
|
|
83
|
+
* @default 'medium'
|
|
84
|
+
*/
|
|
16
85
|
size?: TooltipSize;
|
|
86
|
+
/**
|
|
87
|
+
* Whether to display arrow pointing to trigger
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
17
90
|
hasArrow?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Additional props for the arrow element
|
|
93
|
+
*/
|
|
18
94
|
arrowProps?: TooltipArrowProps;
|
|
95
|
+
/**
|
|
96
|
+
* Controlled open state
|
|
97
|
+
* When provided, controls tooltip visibility externally
|
|
98
|
+
*/
|
|
19
99
|
isOpen?: boolean;
|
|
20
100
|
}
|
|
21
101
|
export type UseTooltipArgs = Omit<TooltipProps, 'children'>;
|
|
22
102
|
type UseInteractions = ReturnType<typeof useInteractions>;
|
|
23
|
-
interface
|
|
103
|
+
interface RefObject<T> {
|
|
24
104
|
current: T;
|
|
25
105
|
}
|
|
26
106
|
export type UseTooltip = (props?: UseTooltipArgs) => Pick<TooltipProps, 'size' | 'hasArrow' | 'arrowProps'> & {
|
|
27
|
-
arrowRef:
|
|
107
|
+
arrowRef: RefObject<null>;
|
|
28
108
|
isOpen: boolean;
|
|
29
109
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
30
110
|
} & UseFloatingReturn & UseInteractions;
|
|
@@ -34,9 +114,26 @@ export type TooltipContextType = (UseFloatingReturn & ReturnType<typeof useInter
|
|
|
34
114
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
35
115
|
} & Pick<TooltipProps, 'size' | 'hasArrow' | 'arrowProps'>) | null;
|
|
36
116
|
export type TooltipArrowProps = Omit<React.ComponentProps<typeof FloatingArrow>, 'context'>;
|
|
117
|
+
/**
|
|
118
|
+
* Props for TooltipContent component
|
|
119
|
+
*
|
|
120
|
+
* Content container for tooltip. Renders the actual tooltip content that appears
|
|
121
|
+
* when the trigger is activated. Supports custom styling and is automatically
|
|
122
|
+
* positioned using Floating UI.
|
|
123
|
+
*/
|
|
37
124
|
export interface TooltipContentProps {
|
|
125
|
+
/**
|
|
126
|
+
* Tooltip content to display
|
|
127
|
+
* Can be text, React nodes, or formatted content
|
|
128
|
+
*/
|
|
38
129
|
children: React.ReactNode;
|
|
130
|
+
/**
|
|
131
|
+
* Custom CSS class name
|
|
132
|
+
*/
|
|
39
133
|
className?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Inline styles for the tooltip content
|
|
136
|
+
*/
|
|
40
137
|
style?: React.CSSProperties;
|
|
41
138
|
}
|
|
42
139
|
export interface TooltipContentSizes {
|
|
@@ -44,12 +141,26 @@ export interface TooltipContentSizes {
|
|
|
44
141
|
medium: SerializedStyles;
|
|
45
142
|
large: SerializedStyles;
|
|
46
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Props for TooltipTrigger component
|
|
146
|
+
*
|
|
147
|
+
* Trigger element that activates the tooltip. Must be a single React element
|
|
148
|
+
* (component or DOM element) that will receive the tooltip trigger props.
|
|
149
|
+
*/
|
|
47
150
|
export interface TooltipTriggerProps {
|
|
151
|
+
/**
|
|
152
|
+
* Single React element to use as trigger
|
|
153
|
+
* Can be any element (Button, Icon, div, etc.)
|
|
154
|
+
* Must be a valid React element (not fragment or array)
|
|
155
|
+
*/
|
|
48
156
|
children: React.ReactNode;
|
|
157
|
+
/**
|
|
158
|
+
* Custom CSS class name
|
|
159
|
+
*/
|
|
49
160
|
className?: string;
|
|
50
161
|
}
|
|
51
|
-
export type SimpleChartTooltipProps = PointTooltipProps & Pick<TooltipProps, 'size'> & {
|
|
52
|
-
renderValue?: (data: Point['data']) => React.ReactNode;
|
|
162
|
+
export type SimpleChartTooltipProps<Series extends LineSeries> = PointTooltipProps<Series> & Pick<TooltipProps, 'size'> & {
|
|
163
|
+
renderValue?: (data: Point<Series>['data']) => React.ReactNode;
|
|
53
164
|
};
|
|
54
165
|
export interface ProgressChartTooltipProps {
|
|
55
166
|
caption: string;
|
|
@@ -1,3 +1,48 @@
|
|
|
1
1
|
import { TooltipContentProps } from '../Tooltip/types';
|
|
2
|
+
/**
|
|
3
|
+
* TooltipContent - Content container for tooltip display
|
|
4
|
+
*
|
|
5
|
+
* Renders the actual tooltip content that appears when the trigger is activated.
|
|
6
|
+
* Uses Floating Portal for proper z-index stacking and FloatingFocusManager for
|
|
7
|
+
* keyboard accessibility. Automatically positions based on Floating UI context
|
|
8
|
+
* and respects size variants and arrow configuration.
|
|
9
|
+
*
|
|
10
|
+
* Only renders when tooltip is open (isOpen is true). Supports custom styling
|
|
11
|
+
* and can contain any React content.
|
|
12
|
+
*
|
|
13
|
+
* @category Components
|
|
14
|
+
* @subcategory Overlay
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Tooltip>
|
|
19
|
+
* <TooltipTrigger>
|
|
20
|
+
* <Button>Info</Button>
|
|
21
|
+
* </TooltipTrigger>
|
|
22
|
+
* <TooltipContent>
|
|
23
|
+
* This is the tooltip content
|
|
24
|
+
* </TooltipContent>
|
|
25
|
+
* </Tooltip>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* // Tooltip with custom styling
|
|
31
|
+
* <TooltipContent style={{ padding: 16, maxWidth: 300 }}>
|
|
32
|
+
* <div>
|
|
33
|
+
* <strong>Title</strong>
|
|
34
|
+
* <p>Detailed description here</p>
|
|
35
|
+
* </div>
|
|
36
|
+
* </TooltipContent>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see {@link Tooltip} - Parent component that provides context
|
|
40
|
+
* @see {@link TooltipTrigger} - Trigger component that activates tooltip
|
|
41
|
+
*
|
|
42
|
+
* @accessibility
|
|
43
|
+
* - Renders in FloatingPortal for proper stacking
|
|
44
|
+
* - Uses FloatingFocusManager for keyboard navigation
|
|
45
|
+
* - Only visible when isOpen is true
|
|
46
|
+
*/
|
|
2
47
|
declare const TooltipContent: import("react").ForwardRefExoticComponent<TooltipContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
48
|
export default TooltipContent;
|