@boreal-ui/types 0.1.426 → 0.2.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/README.md +3 -0
- package/dist/types/components/Accordion/Accordion.types.d.ts +15 -3
- package/dist/types/components/Accordion/Accordion.types.d.ts.map +1 -1
- package/dist/types/components/Accordion/AccordionBase.d.ts +0 -1
- package/dist/types/components/Accordion/AccordionBase.d.ts.map +1 -1
- package/dist/types/components/Accordion/core/Accordion.d.ts.map +1 -1
- package/dist/types/components/Accordion/next/Accordion.d.ts.map +1 -1
- package/dist/types/components/Alert/Alert.types.d.ts +2 -2
- package/dist/types/components/AppShell/AppShell.types.d.ts +2 -2
- package/dist/types/components/Avatar/Avatar.types.d.ts +1 -1
- package/dist/types/components/Badge/Badge.types.d.ts +1 -1
- package/dist/types/components/Badge/BadgeBase.d.ts.map +1 -1
- package/dist/types/components/Badge/core/Badge.d.ts.map +1 -1
- package/dist/types/components/Badge/server/Badge.d.ts.map +1 -1
- package/dist/types/components/BarChart/core/BarChart.d.ts.map +1 -1
- package/dist/types/components/BreadCrumbPageHeader/BreadCrumbPageHeader.types.d.ts +2 -2
- package/dist/types/components/BreadCrumbPageHeader/core/BreadCrumbPageHeader.d.ts.map +1 -1
- package/dist/types/components/Breadcrumbs/Breadcrumbs.types.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/core/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/components/Button/Button.types.d.ts +12 -1
- package/dist/types/components/Button/Button.types.d.ts.map +1 -1
- package/dist/types/components/Button/ButtonBase.d.ts +2 -2
- package/dist/types/components/Button/ButtonBase.d.ts.map +1 -1
- package/dist/types/components/Button/core/Button.d.ts +2 -2
- package/dist/types/components/Button/core/Button.d.ts.map +1 -1
- package/dist/types/components/Button/next/Button.d.ts +2 -2
- package/dist/types/components/Button/next/Button.d.ts.map +1 -1
- package/dist/types/components/Card/Card.types.d.ts +4 -4
- package/dist/types/components/CheckBox/CheckBox.types.d.ts +2 -2
- package/dist/types/components/CheckBox/server/CheckBox.d.ts.map +1 -1
- package/dist/types/components/Chip/Chip.types.d.ts +1 -1
- package/dist/types/components/Chip/ChipBase.d.ts.map +1 -1
- package/dist/types/components/Chip/ChipGroup/core/ChipGroup.d.ts.map +1 -1
- package/dist/types/components/Chip/core/Chip.d.ts.map +1 -1
- package/dist/types/components/CircularProgress/CircularProgress.types.d.ts +1 -1
- package/dist/types/components/CircularProgress/core/CircularProgress.d.ts.map +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.types.d.ts +1 -1
- package/dist/types/components/ColorPicker/ColorPickerBase.d.ts.map +1 -1
- package/dist/types/components/ColorPicker/core/ColorPicker.d.ts.map +1 -1
- package/dist/types/components/ComboBox/ComboBox.types.d.ts +3 -3
- package/dist/types/components/ComboBox/core/ComboBox.d.ts.map +1 -1
- package/dist/types/components/CommandPalette/CommandPalette.types.d.ts +4 -2
- package/dist/types/components/CommandPalette/CommandPalette.types.d.ts.map +1 -1
- package/dist/types/components/CommandPalette/CommandPaletteBase.d.ts.map +1 -1
- package/dist/types/components/DataTable/DataTable.types.d.ts +8 -2
- package/dist/types/components/DataTable/DataTable.types.d.ts.map +1 -1
- package/dist/types/components/DataTable/DataTableBase.d.ts.map +1 -1
- package/dist/types/components/DataTable/core/DataTable.d.ts.map +1 -1
- package/dist/types/components/DataTable/dataTableRows.d.ts +18 -0
- package/dist/types/components/DataTable/dataTableRows.d.ts.map +1 -0
- package/dist/types/components/DataTable/dataTableVirtualization.d.ts +7 -0
- package/dist/types/components/DataTable/dataTableVirtualization.d.ts.map +1 -0
- package/dist/types/components/DatePicker/DatePicker.types.d.ts +3 -3
- package/dist/types/components/DateRangePicker/DateRangePicker.types.d.ts +3 -3
- package/dist/types/components/DateTimePicker/DateTimePicker.types.d.ts +2 -2
- package/dist/types/components/Divider/Divider.types.d.ts +1 -1
- package/dist/types/components/Divider/core/Divider.d.ts.map +1 -1
- package/dist/types/components/DonutChart/core/DonutChart.d.ts.map +1 -1
- package/dist/types/components/Drawer/Drawer.types.d.ts +2 -2
- package/dist/types/components/Drawer/DrawerBase.d.ts.map +1 -1
- package/dist/types/components/Drawer/core/Drawer.d.ts.map +1 -1
- package/dist/types/components/Dropdown/Dropdown.types.d.ts +1 -1
- package/dist/types/components/Dropdown/DropdownBase.d.ts.map +1 -1
- package/dist/types/components/EmptyState/EmptyState.types.d.ts +1 -1
- package/dist/types/components/EmptyState/server/EmptyState.d.ts.map +1 -1
- package/dist/types/components/FieldSet/FieldSet.types.d.ts +2 -2
- package/dist/types/components/FileUpload/FileUpload.types.d.ts +1 -1
- package/dist/types/components/FileUpload/FileUploadBase.d.ts.map +1 -1
- package/dist/types/components/FileUpload/core/FileUpload.d.ts.map +1 -1
- package/dist/types/components/FileUpload/fileValidation.d.ts +20 -0
- package/dist/types/components/FileUpload/fileValidation.d.ts.map +1 -0
- package/dist/types/components/Footer/Footer.types.d.ts +1 -1
- package/dist/types/components/IconButton/IconButton.types.d.ts +2 -2
- package/dist/types/components/IconButton/core/IconButton.d.ts.map +1 -1
- package/dist/types/components/InputGroup/InputGroup.types.d.ts +2 -2
- package/dist/types/components/Legend/core/Legend.d.ts.map +1 -1
- package/dist/types/components/LineChart/core/LineChart.d.ts.map +1 -1
- package/dist/types/components/MarkdownRenderer/MarkdownRendererBase.d.ts.map +1 -1
- package/dist/types/components/MarkdownRenderer/core/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/components/Menu/Menu.types.d.ts +1 -1
- package/dist/types/components/Menu/MenuBase.d.ts.map +1 -1
- package/dist/types/components/MessagePopup/MessagePopupBase.d.ts.map +1 -1
- package/dist/types/components/MetricBox/MetricBox.types.d.ts +2 -2
- package/dist/types/components/MetricBox/core/MetricBox.d.ts.map +1 -1
- package/dist/types/components/MetricBox/server/MetricBox.d.ts.map +1 -1
- package/dist/types/components/Modal/ModalBase.d.ts.map +1 -1
- package/dist/types/components/MultiSelect/MultiSelect.types.d.ts +3 -3
- package/dist/types/components/MultiSelect/MultiSelectBase.d.ts.map +1 -1
- package/dist/types/components/NavBar/NavBar.types.d.ts +2 -2
- package/dist/types/components/NotificationCenter/NotificationCenterBase.d.ts.map +1 -1
- package/dist/types/components/NotificationCenter/core/NotificationCenter.d.ts.map +1 -1
- package/dist/types/components/NumberInput/NumberInput.types.d.ts +2 -2
- package/dist/types/components/PageHeader/PageHeader.types.d.ts +1 -1
- package/dist/types/components/Pager/Pager.types.d.ts +1 -1
- package/dist/types/components/Pager/PagerBase.d.ts.map +1 -1
- package/dist/types/components/Pager/core/Pager.d.ts.map +1 -1
- package/dist/types/components/PopOver/PopOver.types.d.ts +1 -1
- package/dist/types/components/PopOver/PopOverBase.d.ts.map +1 -1
- package/dist/types/components/PopOver/core/PopOver.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.types.d.ts +2 -2
- package/dist/types/components/ProgressBar/ProgressBarBase.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/core/ProgressBar.d.ts.map +1 -1
- package/dist/types/components/RadioButton/RadioButton.types.d.ts +4 -4
- package/dist/types/components/RadioButton/server/RadioButton.d.ts.map +1 -1
- package/dist/types/components/RadioButton/server/RadioGroup.d.ts.map +1 -1
- package/dist/types/components/Rating/Rating.types.d.ts +1 -1
- package/dist/types/components/Rating/core/Rating.d.ts.map +1 -1
- package/dist/types/components/SearchInput/SearchInput.types.d.ts +3 -3
- package/dist/types/components/SegmentedControl/SegmentedControl.types.d.ts +2 -2
- package/dist/types/components/Select/Select.types.d.ts +3 -3
- package/dist/types/components/Select/core/Select.d.ts.map +1 -1
- package/dist/types/components/Select/server/Select.d.ts.map +1 -1
- package/dist/types/components/Sidebar/Sidebar.types.d.ts +1 -1
- package/dist/types/components/Sidebar/SidebarBase.d.ts.map +1 -1
- package/dist/types/components/Sidebar/core/Sidebar.d.ts.map +1 -1
- package/dist/types/components/Skeleton/SkeletonBase.d.ts.map +1 -1
- package/dist/types/components/Skeleton/core/Skeleton.d.ts.map +1 -1
- package/dist/types/components/Skeleton/next/Skeleton.d.ts.map +1 -1
- package/dist/types/components/Slider/Slider.types.d.ts +2 -2
- package/dist/types/components/Slider/core/Slider.d.ts.map +1 -1
- package/dist/types/components/Sparkline/core/Sparkline.d.ts.map +1 -1
- package/dist/types/components/Spinner/Spinner.types.d.ts +1 -1
- package/dist/types/components/Spinner/core/Spinner.d.ts.map +1 -1
- package/dist/types/components/SplitPane/SplitPane.types.d.ts +2 -2
- package/dist/types/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/types/components/Stepper/StepperBase.d.ts.map +1 -1
- package/dist/types/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/types/components/Tabs/TabsBase.d.ts.map +1 -1
- package/dist/types/components/Tabs/core/Tabs.d.ts.map +1 -1
- package/dist/types/components/TagInput/TagInput.types.d.ts +1 -1
- package/dist/types/components/TagInput/core/TagInput.d.ts.map +1 -1
- package/dist/types/components/TextArea/TextArea.types.d.ts +2 -2
- package/dist/types/components/TextArea/core/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextArea/server/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextInput/TextInput.types.d.ts +2 -2
- package/dist/types/components/TextInput/server/TextInput.d.ts.map +1 -1
- package/dist/types/components/TimePicker/TimePicker.types.d.ts +3 -3
- package/dist/types/components/Timeline/Timeline.types.d.ts +1 -1
- package/dist/types/components/Timeline/TimelineBase.d.ts.map +1 -1
- package/dist/types/components/ToastProvider/ToastProvider.types.d.ts +1 -1
- package/dist/types/components/ToastProvider/core/ToastProvider.d.ts.map +1 -1
- package/dist/types/components/Toggle/Toggle.types.d.ts +2 -2
- package/dist/types/components/Toolbar/Toolbar.types.d.ts +2 -2
- package/dist/types/components/Toolbar/ToolbarBase.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/types/components/Tooltip/TooltipBase.d.ts.map +1 -1
- package/dist/types/components/Tooltip/core/Tooltip.d.ts.map +1 -1
- package/dist/types/components/TreeView/TreeView.types.d.ts +2 -2
- package/dist/types/components/TreeView/TreeViewBase.d.ts.map +1 -1
- package/dist/types/components/TreeView/core/TreeView.d.ts.map +1 -1
- package/dist/types/components/Typography/Typography.types.d.ts +1 -1
- package/dist/types/components/Typography/core/Typography.d.ts.map +1 -1
- package/dist/types/components/ValidationSummary/ValidationSummary.types.d.ts +2 -2
- package/dist/types/components/ValidationSummary/server/ValidationSummary.d.ts.map +1 -1
- package/dist/types/hooks/useFloatingPanelSync.d.ts +11 -0
- package/dist/types/hooks/useFloatingPanelSync.d.ts.map +1 -0
- package/dist/types/hooks/useModalLayer.d.ts +10 -0
- package/dist/types/hooks/useModalLayer.d.ts.map +1 -0
- package/dist/types/hooks/useOutsideInteraction.d.ts +15 -0
- package/dist/types/hooks/useOutsideInteraction.d.ts.map +1 -0
- package/dist/types/hooks/usePortalHost.d.ts +7 -0
- package/dist/types/hooks/usePortalHost.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/types.d.ts +208 -0
- package/dist/types/utils/eventHandlers.d.ts +7 -0
- package/dist/types/utils/eventHandlers.d.ts.map +1 -0
- package/dist/types/utils/floatingPanelGeometry.d.ts +36 -0
- package/dist/types/utils/floatingPanelGeometry.d.ts.map +1 -0
- package/dist/types/utils/menuNavigation.d.ts +32 -0
- package/dist/types/utils/menuNavigation.d.ts.map +1 -1
- package/dist/types/utils/modalLayerManager.d.ts +10 -0
- package/dist/types/utils/modalLayerManager.d.ts.map +1 -0
- package/dist/types/utils/navigationSecurity.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { ComponentType, SVGProps } from "react";
|
|
2
|
+
|
|
3
|
+
/** A framework-neutral SVG icon component accepted by Boreal UI components. */
|
|
4
|
+
export type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Represents a named color scheme used for theming components.
|
|
8
|
+
*/
|
|
9
|
+
export interface ColorScheme {
|
|
10
|
+
/** The unique name of the color scheme. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The primary brand or accent color. */
|
|
13
|
+
primaryColor: string;
|
|
14
|
+
/** The secondary brand or accent color. */
|
|
15
|
+
secondaryColor: string;
|
|
16
|
+
/** A tertiary accent color. */
|
|
17
|
+
tertiaryColor: string;
|
|
18
|
+
/** A quaternary accent or background support color. */
|
|
19
|
+
quaternaryColor: string;
|
|
20
|
+
/** The base background color for surfaces using this scheme. */
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
/** Optional override for text color to ensure contrast (e.g., force white text on dark themes). */
|
|
23
|
+
forceTextColor?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Visual theme options used to style components.
|
|
28
|
+
*/
|
|
29
|
+
export type ThemeType =
|
|
30
|
+
| "primary"
|
|
31
|
+
| "p"
|
|
32
|
+
| "secondary"
|
|
33
|
+
| "s"
|
|
34
|
+
| "tertiary"
|
|
35
|
+
| "t"
|
|
36
|
+
| "quaternary"
|
|
37
|
+
| "q"
|
|
38
|
+
| "clear"
|
|
39
|
+
| "c";
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* UI state indicators typically used for validation or status feedback.
|
|
43
|
+
*/
|
|
44
|
+
export type StateType =
|
|
45
|
+
| "success"
|
|
46
|
+
| "error"
|
|
47
|
+
| "warning"
|
|
48
|
+
| "info"
|
|
49
|
+
| "disabled"
|
|
50
|
+
| "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Types of notifications that determine visual appearance or icon.
|
|
54
|
+
*/
|
|
55
|
+
export type NotificationType =
|
|
56
|
+
| "general"
|
|
57
|
+
| "success"
|
|
58
|
+
| "error"
|
|
59
|
+
| "warning"
|
|
60
|
+
| "info";
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Predefined sizing scale for components.
|
|
64
|
+
*/
|
|
65
|
+
export type SizeType =
|
|
66
|
+
| "xs"
|
|
67
|
+
| "small"
|
|
68
|
+
| "sm"
|
|
69
|
+
| "medium"
|
|
70
|
+
| "md"
|
|
71
|
+
| "large"
|
|
72
|
+
| "lg"
|
|
73
|
+
| "xl";
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Orientation of components or layout elements.
|
|
77
|
+
*/
|
|
78
|
+
export type OrientationType = "horizontal" | "h" | "vertical" | "v";
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Shadow depth for component elevation and emphasis.
|
|
82
|
+
*/
|
|
83
|
+
export type ShadowType =
|
|
84
|
+
| "none"
|
|
85
|
+
| "light"
|
|
86
|
+
| "lt"
|
|
87
|
+
| "sm"
|
|
88
|
+
| "medium"
|
|
89
|
+
| "md"
|
|
90
|
+
| "strong"
|
|
91
|
+
| "str"
|
|
92
|
+
| "lg"
|
|
93
|
+
| "intense"
|
|
94
|
+
| "xl";
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Border radius values used for rounding component corners.
|
|
98
|
+
*/
|
|
99
|
+
export type RoundingType =
|
|
100
|
+
| "none"
|
|
101
|
+
| "small"
|
|
102
|
+
| "sm"
|
|
103
|
+
| "medium"
|
|
104
|
+
| "md"
|
|
105
|
+
| "large"
|
|
106
|
+
| "lg";
|
|
107
|
+
|
|
108
|
+
/** Border radius values for controls and surfaces that support pill or circular shapes. */
|
|
109
|
+
export type RoundableRoundingType = RoundingType | "full";
|
|
110
|
+
|
|
111
|
+
/** Common surface treatments, including the composable glass-and-outline treatment. */
|
|
112
|
+
export type VariantType = "solid" | "outline" | "glass" | "glassOutline";
|
|
113
|
+
|
|
114
|
+
/** Common placement values for floating UI and edge-attached surfaces. */
|
|
115
|
+
export type PlacementType = "top" | "bottom" | "left" | "right";
|
|
116
|
+
|
|
117
|
+
/** Direction-aware content alignment. */
|
|
118
|
+
export type AlignmentType = "start" | "center" | "end";
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Border width values used for component borders.
|
|
122
|
+
*/
|
|
123
|
+
export type BorderType =
|
|
124
|
+
| "none"
|
|
125
|
+
| "xs"
|
|
126
|
+
| "small"
|
|
127
|
+
| "sm"
|
|
128
|
+
| "medium"
|
|
129
|
+
| "md"
|
|
130
|
+
| "large"
|
|
131
|
+
| "lg"
|
|
132
|
+
| "xl";
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Anchor position typically used for tooltips, badges, or floating elements.
|
|
136
|
+
*/
|
|
137
|
+
export type PositionType =
|
|
138
|
+
| "topLeft"
|
|
139
|
+
| "tl"
|
|
140
|
+
| "topCenter"
|
|
141
|
+
| "tc"
|
|
142
|
+
| "topRight"
|
|
143
|
+
| "tr"
|
|
144
|
+
| "bottomLeft"
|
|
145
|
+
| "bl"
|
|
146
|
+
| "bottomCenter"
|
|
147
|
+
| "bc"
|
|
148
|
+
| "bottomRight"
|
|
149
|
+
| "br";
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Shape type used for avatars, buttons, badges, etc.
|
|
153
|
+
*/
|
|
154
|
+
export type ShapeType = "circle" | "rounded" | "square";
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Status type used to represent presence or activity.
|
|
158
|
+
*/
|
|
159
|
+
export type StatusType = "online" | "offline" | "busy" | "away" | "custom";
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Position of the status indicator relative to the parent element (e.g., avatar).
|
|
163
|
+
*/
|
|
164
|
+
export type StatusPositionType =
|
|
165
|
+
| "topLeft"
|
|
166
|
+
| "tl"
|
|
167
|
+
| "topRight"
|
|
168
|
+
| "tr"
|
|
169
|
+
| "bottomLeft"
|
|
170
|
+
| "bl"
|
|
171
|
+
| "bottomRight"
|
|
172
|
+
| "br";
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* How a component should attach to the viewport or page layout.
|
|
176
|
+
*/
|
|
177
|
+
export type AttachmentType = "static" | "st" | "fixed" | "fx" | "sticky" | "sk";
|
|
178
|
+
|
|
179
|
+
export type TitlePositionType =
|
|
180
|
+
| "top"
|
|
181
|
+
| "t"
|
|
182
|
+
| "bottom"
|
|
183
|
+
| "b"
|
|
184
|
+
| "left"
|
|
185
|
+
| "l"
|
|
186
|
+
| "right"
|
|
187
|
+
| "r"
|
|
188
|
+
| "overlay";
|
|
189
|
+
export type LabelPositionType =
|
|
190
|
+
| "top"
|
|
191
|
+
| "t"
|
|
192
|
+
| "bottom"
|
|
193
|
+
| "b"
|
|
194
|
+
| "left"
|
|
195
|
+
| "l"
|
|
196
|
+
| "right"
|
|
197
|
+
| "r";
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Props for interactive components that require user input or actions.
|
|
201
|
+
*/
|
|
202
|
+
export type InteractiveProps = {
|
|
203
|
+
onClick?: React.MouseEventHandler;
|
|
204
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
205
|
+
onKeyUp?: React.KeyboardEventHandler;
|
|
206
|
+
tabIndex?: number;
|
|
207
|
+
role?: string;
|
|
208
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SyntheticEvent } from "react";
|
|
2
|
+
export type ReactEventHandler<Event extends SyntheticEvent> = (event: Event) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Runs a consumer handler before Boreal's corresponding default interaction.
|
|
5
|
+
* Consumers can cancel the internal behavior with `event.preventDefault()`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function composeEventHandlers<Event extends SyntheticEvent>(consumerHandler?: ReactEventHandler<Event>, internalHandler?: ReactEventHandler<Event>): ReactEventHandler<Event> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHandlers.d.ts","sourceRoot":"","sources":["../../../src/utils/eventHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,cAAc,IAAI,CAC5D,KAAK,EAAE,KAAK,KACT,IAAI,CAAC;AAEV;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,SAAS,cAAc,EAC/D,eAAe,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAC1C,eAAe,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,GACzC,iBAAiB,CAAC,KAAK,CAAC,GAAG,SAAS,CAQtC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type FloatingPanelRect = Pick<DOMRect, "top" | "right" | "bottom" | "left" | "width" | "height">;
|
|
2
|
+
export type FloatingPanelViewport = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
export type FloatingPanelCoordinates = {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
export type NestedPanelLayout = {
|
|
11
|
+
placement: "left" | "right";
|
|
12
|
+
offsetY: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const readFloatingPanelViewport: () => FloatingPanelViewport;
|
|
15
|
+
export declare const getFloatingPanelSizeLimits: (viewport: FloatingPanelViewport, padding: number, minimumWidth?: number, minimumHeight?: number) => {
|
|
16
|
+
maxWidth: number;
|
|
17
|
+
maxHeight: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const clampFloatingPanelCoordinates: ({ requested, panelWidth, panelHeight, viewport, padding, }: {
|
|
20
|
+
requested: FloatingPanelCoordinates;
|
|
21
|
+
panelWidth: number;
|
|
22
|
+
panelHeight: number;
|
|
23
|
+
viewport: FloatingPanelViewport;
|
|
24
|
+
padding: number;
|
|
25
|
+
}) => FloatingPanelCoordinates;
|
|
26
|
+
export declare const getFloatingPanelHorizontalOverflow: (rect: FloatingPanelRect, viewportWidth: number, padding: number) => {
|
|
27
|
+
overflowLeft: boolean;
|
|
28
|
+
overflowRight: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare const resolveNestedPanelLayout: ({ panelRect, anchorRect, panelWidth, viewport, padding, }: {
|
|
31
|
+
panelRect: FloatingPanelRect;
|
|
32
|
+
anchorRect?: FloatingPanelRect;
|
|
33
|
+
panelWidth: number;
|
|
34
|
+
viewport: FloatingPanelViewport;
|
|
35
|
+
padding: number;
|
|
36
|
+
}) => NestedPanelLayout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatingPanelGeometry.d.ts","sourceRoot":"","sources":["../../../src/utils/floatingPanelGeometry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,OAAO,EACP,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CACzD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAO,qBAiB5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,UAAU,qBAAqB,EAC/B,SAAS,MAAM,EACf,qBAAkB,EAClB,sBAAmB;;;CAInB,CAAC;AAEH,eAAO,MAAM,6BAA6B,GAAI,4DAM3C;IACD,SAAS,EAAE,wBAAwB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,qBAAqB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB,KAAG,wBASF,CAAC;AAEH,eAAO,MAAM,kCAAkC,GAC7C,MAAM,iBAAiB,EACvB,eAAe,MAAM,EACrB,SAAS,MAAM;;;CAIf,CAAC;AAEH,eAAO,MAAM,wBAAwB,GAAI,2DAMtC;IACD,SAAS,EAAE,iBAAiB,CAAC;IAC7B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,qBAAqB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB,KAAG,iBAoBH,CAAC"}
|
|
@@ -4,3 +4,35 @@ export declare const getMenuItemPath: (parentPath: string, index: number) => str
|
|
|
4
4
|
export declare const getParentMenuPath: (path: string) => string | null;
|
|
5
5
|
export declare const isMenuPathOpen: (openPath: string | null, path: string) => boolean;
|
|
6
6
|
export declare const isDisabledMenuElement: (element: HTMLElement) => boolean;
|
|
7
|
+
export declare const getWrappedMenuIndex: (index: number, itemCount: number) => number;
|
|
8
|
+
export type MenuNavigationIntent = {
|
|
9
|
+
type: "none";
|
|
10
|
+
} | {
|
|
11
|
+
type: "dismiss";
|
|
12
|
+
} | {
|
|
13
|
+
type: "tab-dismiss";
|
|
14
|
+
} | {
|
|
15
|
+
type: "focus";
|
|
16
|
+
index: number;
|
|
17
|
+
} | {
|
|
18
|
+
type: "open-submenu";
|
|
19
|
+
} | {
|
|
20
|
+
type: "close-submenu";
|
|
21
|
+
} | {
|
|
22
|
+
type: "activate";
|
|
23
|
+
};
|
|
24
|
+
type ResolveMenuNavigationIntentOptions = {
|
|
25
|
+
key: string;
|
|
26
|
+
currentIndex: number;
|
|
27
|
+
itemCount: number;
|
|
28
|
+
activeHasSubmenu: boolean;
|
|
29
|
+
activeItemAvailable: boolean;
|
|
30
|
+
isSubmenuPanel: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Resolves vertical menu keyboard input without reading or mutating the DOM.
|
|
34
|
+
* The owning component remains responsible for focus, submenu state, and
|
|
35
|
+
* dismissal side effects.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveMenuNavigationIntent: ({ key, currentIndex, itemCount, activeHasSubmenu, activeItemAvailable, isSubmenuPanel, }: ResolveMenuNavigationIntentOptions) => MenuNavigationIntent;
|
|
38
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuNavigation.d.ts","sourceRoot":"","sources":["../../../src/utils/menuNavigation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,OAAO,MAAM,WACb,CAAC;AAErD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,IAGzD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,MAAM,MAAM,YACJ,CAAC;AAEjE,eAAO,MAAM,qBAAqB,GAAI,SAAS,WAAW,YAEE,CAAC"}
|
|
1
|
+
{"version":3,"file":"menuNavigation.d.ts","sourceRoot":"","sources":["../../../src/utils/menuNavigation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,OAAO,MAAM,WACb,CAAC;AAErD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,IAGzD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,MAAM,MAAM,YACJ,CAAC;AAEjE,eAAO,MAAM,qBAAqB,GAAI,SAAS,WAAW,YAEE,CAAC;AAE7D,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,WAAW,MAAM,WACd,CAAC;AAEvD,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAEzB,KAAK,kCAAkC,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GAAI,0FAOzC,kCAAkC,KAAG,oBAwCvC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ModalLayerId = symbol;
|
|
2
|
+
export interface ModalLayerOptions {
|
|
3
|
+
getLayerElement: () => HTMLElement | null;
|
|
4
|
+
getFocusScope: () => HTMLElement | null;
|
|
5
|
+
onEscape?: () => void;
|
|
6
|
+
restoreFocus?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const getFocusableElements: (scope: HTMLElement) => HTMLElement[];
|
|
9
|
+
export declare const registerModalLayer: (id: ModalLayerId, options: ModalLayerOptions) => () => void;
|
|
10
|
+
export declare const __resetModalLayerManagerForTests: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modalLayerManager.d.ts","sourceRoot":"","sources":["../../../src/utils/modalLayerManager.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IAC1C,aAAa,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA8BD,eAAO,MAAM,oBAAoB,GAAI,OAAO,WAAW,KAAG,WAAW,EAGlE,CAAC;AAmKJ,eAAO,MAAM,kBAAkB,GAC7B,IAAI,YAAY,EAChB,SAAS,iBAAiB,eA8C3B,CAAC;AAEF,eAAO,MAAM,gCAAgC,YAY5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigationSecurity.d.ts","sourceRoot":"","sources":["../../../src/utils/navigationSecurity.ts"],"names":[],"mappings":"AAUA,wBAAgB,sBAAsB,CACpC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,MAAM,GAAG,SAAS,CAgBpB;AAED,wBAAgB,YAAY,CAC1B,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"navigationSecurity.d.ts","sourceRoot":"","sources":["../../../src/utils/navigationSecurity.ts"],"names":[],"mappings":"AAUA,wBAAgB,sBAAsB,CACpC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,MAAM,GAAG,SAAS,CAgBpB;AAED,wBAAgB,YAAY,CAC1B,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CA0BpB"}
|