fix(dropdown): preserve disabled and click semantics during submenu delays
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
MenuItemIndicator,
|
||||
MenuItemSubmenuIndicator,
|
||||
MenuSection,
|
||||
type DropdownSubmenuTriggerProps,
|
||||
type DropdownRootProps,
|
||||
type DropdownMenuProps,
|
||||
type DropdownItemProps,
|
||||
@@ -103,3 +104,9 @@ export const values = {
|
||||
badVariant,
|
||||
badIndicator,
|
||||
};
|
||||
|
||||
const submenuDelay: DropdownSubmenuTriggerProps = { delay: 600 };
|
||||
// @ts-expect-error submenu hover delay is a number of milliseconds
|
||||
const badSubmenuDelay: DropdownSubmenuTriggerProps = { delay: "slow" };
|
||||
void submenuDelay;
|
||||
void badSubmenuDelay;
|
||||
|
||||
@@ -170,9 +170,7 @@
|
||||
]
|
||||
},
|
||||
"color-field-protocol": {
|
||||
"exports": [
|
||||
"ColorPicker"
|
||||
],
|
||||
"exports": ["ColorPicker"],
|
||||
"css": [
|
||||
".hv-color-field",
|
||||
".hv-color-input-group",
|
||||
@@ -183,13 +181,8 @@
|
||||
]
|
||||
},
|
||||
"color-foundation": {
|
||||
"exports": [
|
||||
"ColorPicker"
|
||||
],
|
||||
"css": [
|
||||
".hv-color-area",
|
||||
".hv-color-area__thumb"
|
||||
]
|
||||
"exports": ["ColorPicker"],
|
||||
"css": [".hv-color-area", ".hv-color-area__thumb"]
|
||||
},
|
||||
"color-picker-protocol": {
|
||||
"exports": [
|
||||
@@ -206,9 +199,7 @@
|
||||
]
|
||||
},
|
||||
"color-slider-foundation": {
|
||||
"exports": [
|
||||
"ColorPicker"
|
||||
],
|
||||
"exports": ["ColorPicker"],
|
||||
"css": [
|
||||
".hv-color-slider",
|
||||
".hv-color-slider__track",
|
||||
@@ -300,11 +291,7 @@
|
||||
"PaginationItem",
|
||||
"PaginationLink"
|
||||
],
|
||||
"css": [
|
||||
"hv-header",
|
||||
"hv-pagination",
|
||||
"hv-input-otp"
|
||||
]
|
||||
"css": ["hv-header", "hv-pagination", "hv-input-otp"]
|
||||
},
|
||||
"m33-m34": {
|
||||
"exports": [
|
||||
@@ -416,10 +403,7 @@
|
||||
"Label",
|
||||
"sliderVariants"
|
||||
],
|
||||
"css": [
|
||||
".hv-slider__track",
|
||||
"hv-slider__thumb"
|
||||
]
|
||||
"css": [".hv-slider__track", "hv-slider__thumb"]
|
||||
},
|
||||
"color-swatch": {
|
||||
"exports": [
|
||||
@@ -624,12 +608,7 @@
|
||||
"FieldError",
|
||||
"Button"
|
||||
],
|
||||
"css": [
|
||||
".hv-textfield",
|
||||
".hv-input",
|
||||
".hv-field-error",
|
||||
".hv-button"
|
||||
]
|
||||
"css": [".hv-textfield", ".hv-input", ".hv-field-error", ".hv-button"]
|
||||
},
|
||||
"api-root-aliases": {
|
||||
"exports": [
|
||||
@@ -800,334 +779,88 @@
|
||||
"TypographyRoot"
|
||||
],
|
||||
"aliases": [
|
||||
[
|
||||
"Accordion",
|
||||
"AccordionRoot"
|
||||
],
|
||||
[
|
||||
"Alert",
|
||||
"AlertRoot"
|
||||
],
|
||||
[
|
||||
"AlertDialog",
|
||||
"AlertDialogRoot"
|
||||
],
|
||||
[
|
||||
"Autocomplete",
|
||||
"AutocompleteRoot"
|
||||
],
|
||||
[
|
||||
"Avatar",
|
||||
"AvatarRoot"
|
||||
],
|
||||
[
|
||||
"AvatarGroup",
|
||||
"AvatarGroupRoot"
|
||||
],
|
||||
[
|
||||
"Badge",
|
||||
"BadgeRoot"
|
||||
],
|
||||
[
|
||||
"Breadcrumbs",
|
||||
"BreadcrumbsRoot"
|
||||
],
|
||||
[
|
||||
"Button",
|
||||
"ButtonRoot"
|
||||
],
|
||||
[
|
||||
"ButtonGroup",
|
||||
"ButtonGroupRoot"
|
||||
],
|
||||
[
|
||||
"Calendar",
|
||||
"CalendarRoot"
|
||||
],
|
||||
[
|
||||
"Card",
|
||||
"CardRoot"
|
||||
],
|
||||
[
|
||||
"Checkbox",
|
||||
"CheckboxRoot"
|
||||
],
|
||||
[
|
||||
"Chip",
|
||||
"ChipRoot"
|
||||
],
|
||||
[
|
||||
"CloseButton",
|
||||
"CloseButtonRoot"
|
||||
],
|
||||
[
|
||||
"ColorArea",
|
||||
"ColorAreaRoot"
|
||||
],
|
||||
[
|
||||
"ColorField",
|
||||
"ColorFieldRoot"
|
||||
],
|
||||
[
|
||||
"ColorInputGroup",
|
||||
"ColorInputGroupRoot"
|
||||
],
|
||||
[
|
||||
"ColorPicker",
|
||||
"ColorPickerRoot"
|
||||
],
|
||||
[
|
||||
"ColorSlider",
|
||||
"ColorSliderRoot"
|
||||
],
|
||||
[
|
||||
"ColorSwatch",
|
||||
"ColorSwatchRoot"
|
||||
],
|
||||
[
|
||||
"ColorSwatchPicker",
|
||||
"ColorSwatchPickerRoot"
|
||||
],
|
||||
[
|
||||
"ComboBox",
|
||||
"ComboBoxRoot"
|
||||
],
|
||||
[
|
||||
"DateField",
|
||||
"DateFieldRoot"
|
||||
],
|
||||
[
|
||||
"DateInputGroup",
|
||||
"DateInputGroupRoot"
|
||||
],
|
||||
[
|
||||
"DatePicker",
|
||||
"DatePickerRoot"
|
||||
],
|
||||
[
|
||||
"DateRangePicker",
|
||||
"DateRangePickerRoot"
|
||||
],
|
||||
[
|
||||
"Description",
|
||||
"DescriptionRoot"
|
||||
],
|
||||
[
|
||||
"Disclosure",
|
||||
"DisclosureRoot"
|
||||
],
|
||||
[
|
||||
"DisclosureGroup",
|
||||
"DisclosureGroupRoot"
|
||||
],
|
||||
[
|
||||
"Drawer",
|
||||
"DrawerRoot"
|
||||
],
|
||||
[
|
||||
"Dropdown",
|
||||
"DropdownRoot"
|
||||
],
|
||||
[
|
||||
"EmptyState",
|
||||
"EmptyStateRoot"
|
||||
],
|
||||
[
|
||||
"ErrorMessage",
|
||||
"ErrorMessageRoot"
|
||||
],
|
||||
[
|
||||
"FieldError",
|
||||
"FieldErrorRoot"
|
||||
],
|
||||
[
|
||||
"Fieldset",
|
||||
"FieldsetRoot"
|
||||
],
|
||||
[
|
||||
"Form",
|
||||
"FormRoot"
|
||||
],
|
||||
[
|
||||
"Header",
|
||||
"HeaderRoot"
|
||||
],
|
||||
[
|
||||
"Input",
|
||||
"InputRoot"
|
||||
],
|
||||
[
|
||||
"InputGroup",
|
||||
"InputGroupRoot"
|
||||
],
|
||||
[
|
||||
"InputOTP",
|
||||
"InputOTPRoot"
|
||||
],
|
||||
[
|
||||
"Kbd",
|
||||
"KbdRoot"
|
||||
],
|
||||
[
|
||||
"Label",
|
||||
"LabelRoot"
|
||||
],
|
||||
[
|
||||
"Link",
|
||||
"LinkRoot"
|
||||
],
|
||||
[
|
||||
"ListBox",
|
||||
"ListBoxRoot"
|
||||
],
|
||||
[
|
||||
"ListBoxItem",
|
||||
"ListBoxItemRoot"
|
||||
],
|
||||
[
|
||||
"ListBoxSection",
|
||||
"ListBoxSectionRoot"
|
||||
],
|
||||
[
|
||||
"Menu",
|
||||
"MenuRoot"
|
||||
],
|
||||
[
|
||||
"MenuItem",
|
||||
"MenuItemRoot"
|
||||
],
|
||||
[
|
||||
"MenuSection",
|
||||
"MenuSectionRoot"
|
||||
],
|
||||
[
|
||||
"Meter",
|
||||
"MeterRoot"
|
||||
],
|
||||
[
|
||||
"Modal",
|
||||
"ModalRoot"
|
||||
],
|
||||
[
|
||||
"NumberField",
|
||||
"NumberFieldRoot"
|
||||
],
|
||||
[
|
||||
"Pagination",
|
||||
"PaginationRoot"
|
||||
],
|
||||
[
|
||||
"Popover",
|
||||
"PopoverRoot"
|
||||
],
|
||||
[
|
||||
"ProgressBar",
|
||||
"ProgressBarRoot"
|
||||
],
|
||||
[
|
||||
"ProgressCircle",
|
||||
"ProgressCircleRoot"
|
||||
],
|
||||
[
|
||||
"Radio",
|
||||
"RadioRoot"
|
||||
],
|
||||
[
|
||||
"RadioGroup",
|
||||
"RadioGroupRoot"
|
||||
],
|
||||
[
|
||||
"RangeCalendar",
|
||||
"RangeCalendarRoot"
|
||||
],
|
||||
[
|
||||
"ScrollShadow",
|
||||
"ScrollShadowRoot"
|
||||
],
|
||||
[
|
||||
"SearchField",
|
||||
"SearchFieldRoot"
|
||||
],
|
||||
[
|
||||
"Select",
|
||||
"SelectRoot"
|
||||
],
|
||||
[
|
||||
"Separator",
|
||||
"SeparatorRoot"
|
||||
],
|
||||
[
|
||||
"Skeleton",
|
||||
"SkeletonRoot"
|
||||
],
|
||||
[
|
||||
"Slider",
|
||||
"SliderRoot"
|
||||
],
|
||||
[
|
||||
"Spinner",
|
||||
"SpinnerRoot"
|
||||
],
|
||||
[
|
||||
"Surface",
|
||||
"SurfaceRoot"
|
||||
],
|
||||
[
|
||||
"Switch",
|
||||
"SwitchRoot"
|
||||
],
|
||||
[
|
||||
"SwitchGroup",
|
||||
"SwitchGroupRoot"
|
||||
],
|
||||
[
|
||||
"Table",
|
||||
"TableRoot"
|
||||
],
|
||||
[
|
||||
"Tabs",
|
||||
"TabsRoot"
|
||||
],
|
||||
[
|
||||
"Tag",
|
||||
"TagRoot"
|
||||
],
|
||||
[
|
||||
"TagGroup",
|
||||
"TagGroupRoot"
|
||||
],
|
||||
[
|
||||
"TextArea",
|
||||
"TextAreaRoot"
|
||||
],
|
||||
[
|
||||
"TextField",
|
||||
"TextFieldRoot"
|
||||
],
|
||||
[
|
||||
"TimeField",
|
||||
"TimeFieldRoot"
|
||||
],
|
||||
[
|
||||
"ToggleButton",
|
||||
"ToggleButtonRoot"
|
||||
],
|
||||
[
|
||||
"ToggleButtonGroup",
|
||||
"ToggleButtonGroupRoot"
|
||||
],
|
||||
[
|
||||
"Toolbar",
|
||||
"ToolbarRoot"
|
||||
],
|
||||
[
|
||||
"Tooltip",
|
||||
"TooltipRoot"
|
||||
],
|
||||
[
|
||||
"Typography",
|
||||
"TypographyRoot"
|
||||
]
|
||||
["Accordion", "AccordionRoot"],
|
||||
["Alert", "AlertRoot"],
|
||||
["AlertDialog", "AlertDialogRoot"],
|
||||
["Autocomplete", "AutocompleteRoot"],
|
||||
["Avatar", "AvatarRoot"],
|
||||
["AvatarGroup", "AvatarGroupRoot"],
|
||||
["Badge", "BadgeRoot"],
|
||||
["Breadcrumbs", "BreadcrumbsRoot"],
|
||||
["Button", "ButtonRoot"],
|
||||
["ButtonGroup", "ButtonGroupRoot"],
|
||||
["Calendar", "CalendarRoot"],
|
||||
["Card", "CardRoot"],
|
||||
["Checkbox", "CheckboxRoot"],
|
||||
["Chip", "ChipRoot"],
|
||||
["CloseButton", "CloseButtonRoot"],
|
||||
["ColorArea", "ColorAreaRoot"],
|
||||
["ColorField", "ColorFieldRoot"],
|
||||
["ColorInputGroup", "ColorInputGroupRoot"],
|
||||
["ColorPicker", "ColorPickerRoot"],
|
||||
["ColorSlider", "ColorSliderRoot"],
|
||||
["ColorSwatch", "ColorSwatchRoot"],
|
||||
["ColorSwatchPicker", "ColorSwatchPickerRoot"],
|
||||
["ComboBox", "ComboBoxRoot"],
|
||||
["DateField", "DateFieldRoot"],
|
||||
["DateInputGroup", "DateInputGroupRoot"],
|
||||
["DatePicker", "DatePickerRoot"],
|
||||
["DateRangePicker", "DateRangePickerRoot"],
|
||||
["Description", "DescriptionRoot"],
|
||||
["Disclosure", "DisclosureRoot"],
|
||||
["DisclosureGroup", "DisclosureGroupRoot"],
|
||||
["Drawer", "DrawerRoot"],
|
||||
["Dropdown", "DropdownRoot"],
|
||||
["EmptyState", "EmptyStateRoot"],
|
||||
["ErrorMessage", "ErrorMessageRoot"],
|
||||
["FieldError", "FieldErrorRoot"],
|
||||
["Fieldset", "FieldsetRoot"],
|
||||
["Form", "FormRoot"],
|
||||
["Header", "HeaderRoot"],
|
||||
["Input", "InputRoot"],
|
||||
["InputGroup", "InputGroupRoot"],
|
||||
["InputOTP", "InputOTPRoot"],
|
||||
["Kbd", "KbdRoot"],
|
||||
["Label", "LabelRoot"],
|
||||
["Link", "LinkRoot"],
|
||||
["ListBox", "ListBoxRoot"],
|
||||
["ListBoxItem", "ListBoxItemRoot"],
|
||||
["ListBoxSection", "ListBoxSectionRoot"],
|
||||
["Menu", "MenuRoot"],
|
||||
["MenuItem", "MenuItemRoot"],
|
||||
["MenuSection", "MenuSectionRoot"],
|
||||
["Meter", "MeterRoot"],
|
||||
["Modal", "ModalRoot"],
|
||||
["NumberField", "NumberFieldRoot"],
|
||||
["Pagination", "PaginationRoot"],
|
||||
["Popover", "PopoverRoot"],
|
||||
["ProgressBar", "ProgressBarRoot"],
|
||||
["ProgressCircle", "ProgressCircleRoot"],
|
||||
["Radio", "RadioRoot"],
|
||||
["RadioGroup", "RadioGroupRoot"],
|
||||
["RangeCalendar", "RangeCalendarRoot"],
|
||||
["ScrollShadow", "ScrollShadowRoot"],
|
||||
["SearchField", "SearchFieldRoot"],
|
||||
["Select", "SelectRoot"],
|
||||
["Separator", "SeparatorRoot"],
|
||||
["Skeleton", "SkeletonRoot"],
|
||||
["Slider", "SliderRoot"],
|
||||
["Spinner", "SpinnerRoot"],
|
||||
["Surface", "SurfaceRoot"],
|
||||
["Switch", "SwitchRoot"],
|
||||
["SwitchGroup", "SwitchGroupRoot"],
|
||||
["Table", "TableRoot"],
|
||||
["Tabs", "TabsRoot"],
|
||||
["Tag", "TagRoot"],
|
||||
["TagGroup", "TagGroupRoot"],
|
||||
["TextArea", "TextAreaRoot"],
|
||||
["TextField", "TextFieldRoot"],
|
||||
["TimeField", "TimeFieldRoot"],
|
||||
["ToggleButton", "ToggleButtonRoot"],
|
||||
["ToggleButtonGroup", "ToggleButtonGroupRoot"],
|
||||
["Toolbar", "ToolbarRoot"],
|
||||
["Tooltip", "TooltipRoot"],
|
||||
["Typography", "TypographyRoot"]
|
||||
],
|
||||
"css": []
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user