@msviderok/base-ui-solid 1.0.0-beta.1 → 1.0.0-beta.2
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/cjs/accordion/header/AccordionHeader.js +2 -4
- package/cjs/accordion/item/AccordionItem.js +10 -6
- package/cjs/accordion/panel/AccordionPanel.js +8 -4
- package/cjs/accordion/root/AccordionRoot.js +12 -8
- package/cjs/accordion/trigger/AccordionTrigger.js +2 -4
- package/cjs/alert-dialog/backdrop/AlertDialogBackdrop.js +2 -4
- package/cjs/alert-dialog/close/AlertDialogClose.js +2 -4
- package/cjs/alert-dialog/description/AlertDialogDescription.js +2 -4
- package/cjs/alert-dialog/popup/AlertDialogPopup.js +24 -16
- package/cjs/alert-dialog/portal/AlertDialogPortal.js +20 -10
- package/cjs/alert-dialog/root/AlertDialogRoot.js +5 -3
- package/cjs/alert-dialog/title/AlertDialogTitle.js +1 -4
- package/cjs/alert-dialog/trigger/AlertDialogTrigger.js +2 -4
- package/cjs/avatar/fallback/AvatarFallback.js +2 -4
- package/cjs/avatar/image/AvatarImage.js +2 -4
- package/cjs/avatar/root/AvatarRoot.js +5 -3
- package/cjs/checkbox/indicator/CheckboxIndicator.js +8 -4
- package/cjs/checkbox/root/CheckboxRoot.js +15 -9
- package/cjs/checkbox-group/CheckboxGroup.js +5 -3
- package/cjs/collapsible/panel/CollapsiblePanel.js +8 -4
- package/cjs/collapsible/root/CollapsibleRoot.js +15 -7
- package/cjs/collapsible/trigger/CollapsibleTrigger.js +2 -4
- package/cjs/composite/item/CompositeItem.js +2 -4
- package/cjs/composite/list/CompositeList.js +16 -12
- package/cjs/composite/root/CompositeRoot.js +13 -7
- package/cjs/context-menu/root/ContextMenuRoot.js +10 -8
- package/cjs/context-menu/trigger/ContextMenuTrigger.js +2 -4
- package/cjs/dialog/backdrop/DialogBackdrop.js +2 -4
- package/cjs/dialog/close/DialogClose.js +2 -4
- package/cjs/dialog/description/DialogDescription.js +2 -4
- package/cjs/dialog/popup/DialogPopup.js +30 -18
- package/cjs/dialog/portal/DialogPortal.js +20 -10
- package/cjs/dialog/root/DialogRoot.js +10 -6
- package/cjs/dialog/title/DialogTitle.js +2 -4
- package/cjs/dialog/trigger/DialogTrigger.js +2 -4
- package/cjs/direction-provider/DirectionProvider.js +5 -3
- package/cjs/field/control/FieldControl.js +2 -4
- package/cjs/field/description/FieldDescription.js +2 -4
- package/cjs/field/error/FieldError.js +21 -16
- package/cjs/field/label/FieldLabel.js +2 -4
- package/cjs/field/root/FieldRoot.js +5 -3
- package/cjs/field/validity/FieldValidity.js +6 -6
- package/cjs/fieldset/legend/FieldsetLegend.js +2 -4
- package/cjs/fieldset/root/FieldsetRoot.js +5 -3
- package/cjs/floating-ui-solid/components/FloatingDelayGroup.js +5 -3
- package/cjs/floating-ui-solid/components/FloatingFocusManager.js +39 -24
- package/cjs/floating-ui-solid/components/FloatingPortal.js +73 -47
- package/cjs/floating-ui-solid/components/FloatingTree.js +9 -5
- package/cjs/form/Form.js +5 -3
- package/cjs/input/Input.js +2 -4
- package/cjs/menu/arrow/MenuArrow.js +2 -4
- package/cjs/menu/backdrop/MenuBackdrop.js +2 -4
- package/cjs/menu/checkbox-item/MenuCheckboxItem.js +5 -3
- package/cjs/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +2 -4
- package/cjs/menu/group/MenuGroup.js +5 -3
- package/cjs/menu/group-label/MenuGroupLabel.js +2 -4
- package/cjs/menu/item/MenuItem.js +2 -4
- package/cjs/menu/popup/MenuPopup.js +14 -6
- package/cjs/menu/portal/MenuPortal.js +20 -10
- package/cjs/menu/positioner/MenuPositioner.js +32 -20
- package/cjs/menu/radio-group/MenuRadioGroup.js +5 -3
- package/cjs/menu/radio-item/MenuRadioItem.js +5 -3
- package/cjs/menu/radio-item-indicator/MenuRadioItemIndicator.js +2 -4
- package/cjs/menu/root/MenuRoot.js +24 -12
- package/cjs/menu/submenu-root/MenuSubmenuRoot.js +5 -5
- package/cjs/menu/submenu-trigger/MenuSubmenuTrigger.js +2 -4
- package/cjs/menu/trigger/MenuTrigger.js +13 -7
- package/cjs/menubar/Menubar.js +31 -15
- package/cjs/meter/indicator/MeterIndicator.js +2 -4
- package/cjs/meter/label/MeterLabel.js +2 -4
- package/cjs/meter/root/MeterRoot.js +5 -3
- package/cjs/meter/track/MeterTrack.js +2 -4
- package/cjs/meter/value/MeterValue.js +3 -7
- package/cjs/navigation-menu/arrow/NavigationMenuArrow.js +2 -4
- package/cjs/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -4
- package/cjs/navigation-menu/content/NavigationMenuContent.js +25 -14
- package/cjs/navigation-menu/icon/NavigationMenuIcon.js +2 -4
- package/cjs/navigation-menu/item/NavigationMenuItem.js +5 -5
- package/cjs/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/cjs/navigation-menu/list/NavigationMenuList.js +5 -3
- package/cjs/navigation-menu/popup/NavigationMenuPopup.js +32 -34
- package/cjs/navigation-menu/portal/NavigationMenuPortal.js +20 -10
- package/cjs/navigation-menu/positioner/NavigationMenuPositioner.js +5 -3
- package/cjs/navigation-menu/root/NavigationMenuRoot.js +23 -13
- package/cjs/navigation-menu/trigger/NavigationMenuTrigger.js +56 -49
- package/cjs/navigation-menu/viewport/NavigationMenuViewport.js +2 -4
- package/cjs/number-field/decrement/NumberFieldDecrement.js +2 -4
- package/cjs/number-field/group/NumberFieldGroup.js +2 -4
- package/cjs/number-field/increment/NumberFieldIncrement.js +2 -4
- package/cjs/number-field/input/NumberFieldInput.js +2 -4
- package/cjs/number-field/root/NumberFieldRoot.js +32 -16
- package/cjs/number-field/scrub-area/NumberFieldScrubArea.js +5 -3
- package/cjs/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.js +8 -5
- package/cjs/popover/arrow/PopoverArrow.js +2 -4
- package/cjs/popover/backdrop/PopoverBackdrop.js +2 -4
- package/cjs/popover/close/PopoverClose.js +2 -4
- package/cjs/popover/description/PopoverDescription.js +2 -4
- package/cjs/popover/popup/PopoverPopup.js +20 -8
- package/cjs/popover/portal/PopoverPortal.js +20 -10
- package/cjs/popover/positioner/PopoverPositioner.js +27 -13
- package/cjs/popover/root/PopoverRoot.js +19 -13
- package/cjs/popover/title/PopoverTitle.js +2 -4
- package/cjs/popover/trigger/PopoverTrigger.js +2 -4
- package/cjs/preview-card/arrow/PreviewCardArrow.js +2 -4
- package/cjs/preview-card/backdrop/PreviewCardBackdrop.js +2 -4
- package/cjs/preview-card/popup/PreviewCardPopup.js +2 -4
- package/cjs/preview-card/portal/PreviewCardPortal.js +20 -10
- package/cjs/preview-card/positioner/PreviewCardPositioner.js +5 -3
- package/cjs/preview-card/root/PreviewCardRoot.js +5 -3
- package/cjs/preview-card/trigger/PreviewCardTrigger.js +2 -4
- package/cjs/progress/indicator/ProgressIndicator.js +2 -4
- package/cjs/progress/label/ProgressLabel.js +2 -4
- package/cjs/progress/root/ProgressRoot.js +5 -3
- package/cjs/progress/track/ProgressTrack.js +2 -4
- package/cjs/progress/value/ProgressValue.js +2 -4
- package/cjs/radio/indicator/RadioIndicator.js +8 -4
- package/cjs/radio/root/RadioRoot.js +20 -11
- package/cjs/radio-group/RadioGroup.js +15 -10
- package/cjs/scroll-area/content/ScrollAreaContent.js +2 -4
- package/cjs/scroll-area/corner/ScrollAreaCorner.js +8 -4
- package/cjs/scroll-area/root/ScrollAreaRoot.js +5 -3
- package/cjs/scroll-area/scrollbar/ScrollAreaScrollbar.js +13 -7
- package/cjs/scroll-area/thumb/ScrollAreaThumb.js +2 -4
- package/cjs/scroll-area/viewport/ScrollAreaViewport.js +5 -3
- package/cjs/select/arrow/SelectArrow.js +8 -4
- package/cjs/select/backdrop/SelectBackdrop.js +2 -4
- package/cjs/select/group/SelectGroup.js +5 -3
- package/cjs/select/group-label/SelectGroupLabel.js +2 -4
- package/cjs/select/icon/SelectIcon.js +3 -7
- package/cjs/select/item/SelectItem.js +5 -3
- package/cjs/select/item-indicator/SelectItemIndicator.js +8 -4
- package/cjs/select/item-text/SelectItemText.js +2 -4
- package/cjs/select/popup/SelectPopup.js +12 -10
- package/cjs/select/portal/SelectPortal.js +20 -10
- package/cjs/select/positioner/SelectPositioner.js +23 -13
- package/cjs/select/root/SelectRoot.js +54 -47
- package/cjs/select/scroll-arrow/SelectScrollArrow.js +9 -7
- package/cjs/select/scroll-down-arrow/SelectScrollDownArrow.js +7 -5
- package/cjs/select/scroll-up-arrow/SelectScrollUpArrow.js +7 -5
- package/cjs/select/trigger/SelectTrigger.js +2 -4
- package/cjs/select/value/SelectValue.js +3 -7
- package/cjs/separator/Separator.js +2 -4
- package/cjs/slider/control/SliderControl.js +2 -4
- package/cjs/slider/indicator/SliderIndicator.js +2 -4
- package/cjs/slider/root/SliderRoot.js +66 -47
- package/cjs/slider/thumb/SliderThumb.js +8 -11
- package/cjs/slider/track/SliderTrack.js +2 -4
- package/cjs/slider/value/SliderValue.js +3 -7
- package/cjs/switch/root/SwitchRoot.js +15 -9
- package/cjs/switch/thumb/SwitchThumb.js +2 -4
- package/cjs/tabs/indicator/TabsIndicator.js +13 -11
- package/cjs/tabs/list/TabsList.js +20 -12
- package/cjs/tabs/panel/TabsPanel.js +3 -7
- package/cjs/tabs/root/TabsRoot.js +13 -9
- package/cjs/tabs/tab/TabsTab.js +2 -4
- package/cjs/toast/action/ToastAction.js +3 -7
- package/cjs/toast/close/ToastClose.js +2 -4
- package/cjs/toast/description/ToastDescription.js +3 -7
- package/cjs/toast/portal/ToastPortal.js +8 -4
- package/cjs/toast/provider/ToastProvider.js +5 -3
- package/cjs/toast/root/ToastRoot.js +30 -22
- package/cjs/toast/title/ToastTitle.js +3 -7
- package/cjs/toast/utils/test-utils.js +26 -21
- package/cjs/toast/viewport/ToastViewport.js +13 -14
- package/cjs/toggle/Toggle.js +10 -6
- package/cjs/toggle-group/ToggleGroup.js +19 -11
- package/cjs/toolbar/button/ToolbarButton.js +2 -2
- package/cjs/toolbar/group/ToolbarGroup.js +5 -3
- package/cjs/toolbar/input/ToolbarInput.js +2 -2
- package/cjs/toolbar/link/ToolbarLink.js +2 -2
- package/cjs/toolbar/root/ToolbarRoot.js +20 -10
- package/cjs/toolbar/separator/ToolbarSeparator.js +11 -6
- package/cjs/tooltip/arrow/TooltipArrow.js +2 -4
- package/cjs/tooltip/popup/TooltipPopup.js +2 -4
- package/cjs/tooltip/portal/TooltipPortal.js +20 -10
- package/cjs/tooltip/positioner/TooltipPositioner.js +5 -3
- package/cjs/tooltip/provider/TooltipProvider.js +15 -7
- package/cjs/tooltip/root/TooltipRoot.js +5 -3
- package/cjs/tooltip/trigger/TooltipTrigger.js +2 -4
- package/cjs/unstable-no-ssr/NoSsr.js +11 -5
- package/cjs/utils/FloatingPortalLite.js +7 -4
- package/cjs/utils/FocusGuard.js +19 -10
- package/cjs/utils/InternalBackdrop.js +19 -18
- package/cjs/utils/styles.js +3 -5
- package/cjs/utils/useRenderElement.js +34 -31
- package/esm/accordion/header/AccordionHeader.js +2 -4
- package/esm/accordion/item/AccordionItem.js +10 -6
- package/esm/accordion/panel/AccordionPanel.js +8 -4
- package/esm/accordion/root/AccordionRoot.js +12 -8
- package/esm/accordion/trigger/AccordionTrigger.js +3 -4
- package/esm/alert-dialog/backdrop/AlertDialogBackdrop.js +2 -4
- package/esm/alert-dialog/close/AlertDialogClose.js +2 -4
- package/esm/alert-dialog/description/AlertDialogDescription.js +2 -4
- package/esm/alert-dialog/popup/AlertDialogPopup.js +25 -16
- package/esm/alert-dialog/portal/AlertDialogPortal.js +20 -10
- package/esm/alert-dialog/root/AlertDialogRoot.js +5 -3
- package/esm/alert-dialog/title/AlertDialogTitle.js +1 -4
- package/esm/alert-dialog/trigger/AlertDialogTrigger.js +2 -4
- package/esm/avatar/fallback/AvatarFallback.js +2 -4
- package/esm/avatar/image/AvatarImage.js +2 -4
- package/esm/avatar/root/AvatarRoot.js +5 -3
- package/esm/checkbox/indicator/CheckboxIndicator.js +8 -4
- package/esm/checkbox/root/CheckboxRoot.js +21 -9
- package/esm/checkbox-group/CheckboxGroup.js +5 -3
- package/esm/collapsible/panel/CollapsiblePanel.js +8 -4
- package/esm/collapsible/root/CollapsibleRoot.js +15 -7
- package/esm/collapsible/trigger/CollapsibleTrigger.js +2 -4
- package/esm/composite/item/CompositeItem.js +2 -4
- package/esm/composite/list/CompositeList.js +16 -12
- package/esm/composite/root/CompositeRoot.js +13 -7
- package/esm/context-menu/root/ContextMenuRoot.js +10 -8
- package/esm/context-menu/trigger/ContextMenuTrigger.js +2 -4
- package/esm/dialog/backdrop/DialogBackdrop.js +2 -4
- package/esm/dialog/close/DialogClose.js +2 -4
- package/esm/dialog/description/DialogDescription.js +2 -4
- package/esm/dialog/popup/DialogPopup.js +31 -18
- package/esm/dialog/portal/DialogPortal.js +20 -10
- package/esm/dialog/root/DialogRoot.js +10 -6
- package/esm/dialog/title/DialogTitle.js +2 -4
- package/esm/dialog/trigger/DialogTrigger.js +2 -4
- package/esm/direction-provider/DirectionProvider.js +5 -3
- package/esm/field/control/FieldControl.js +2 -4
- package/esm/field/description/FieldDescription.js +2 -4
- package/esm/field/error/FieldError.js +24 -16
- package/esm/field/label/FieldLabel.js +2 -4
- package/esm/field/root/FieldRoot.js +5 -3
- package/esm/field/validity/FieldValidity.js +7 -5
- package/esm/fieldset/legend/FieldsetLegend.js +2 -4
- package/esm/fieldset/root/FieldsetRoot.js +5 -3
- package/esm/floating-ui-solid/components/FloatingDelayGroup.js +5 -3
- package/esm/floating-ui-solid/components/FloatingFocusManager.js +43 -24
- package/esm/floating-ui-solid/components/FloatingPortal.js +78 -46
- package/esm/floating-ui-solid/components/FloatingTree.js +9 -5
- package/esm/form/Form.js +5 -3
- package/esm/index.js +1 -1
- package/esm/input/Input.js +2 -4
- package/esm/menu/arrow/MenuArrow.js +2 -4
- package/esm/menu/backdrop/MenuBackdrop.js +2 -4
- package/esm/menu/checkbox-item/MenuCheckboxItem.js +5 -3
- package/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js +2 -4
- package/esm/menu/group/MenuGroup.js +5 -3
- package/esm/menu/group-label/MenuGroupLabel.js +2 -4
- package/esm/menu/item/MenuItem.js +2 -4
- package/esm/menu/popup/MenuPopup.js +15 -6
- package/esm/menu/portal/MenuPortal.js +20 -10
- package/esm/menu/positioner/MenuPositioner.js +33 -20
- package/esm/menu/radio-group/MenuRadioGroup.js +5 -3
- package/esm/menu/radio-item/MenuRadioItem.js +5 -3
- package/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js +2 -4
- package/esm/menu/root/MenuRoot.js +25 -12
- package/esm/menu/submenu-root/MenuSubmenuRoot.js +5 -5
- package/esm/menu/submenu-trigger/MenuSubmenuTrigger.js +2 -4
- package/esm/menu/trigger/MenuTrigger.js +13 -7
- package/esm/menubar/Menubar.js +31 -15
- package/esm/meter/indicator/MeterIndicator.js +2 -4
- package/esm/meter/label/MeterLabel.js +2 -4
- package/esm/meter/root/MeterRoot.js +5 -3
- package/esm/meter/track/MeterTrack.js +2 -4
- package/esm/meter/value/MeterValue.js +3 -7
- package/esm/navigation-menu/arrow/NavigationMenuArrow.js +2 -4
- package/esm/navigation-menu/backdrop/NavigationMenuBackdrop.js +2 -4
- package/esm/navigation-menu/content/NavigationMenuContent.js +25 -13
- package/esm/navigation-menu/icon/NavigationMenuIcon.js +2 -4
- package/esm/navigation-menu/item/NavigationMenuItem.js +6 -5
- package/esm/navigation-menu/link/NavigationMenuLink.js +2 -2
- package/esm/navigation-menu/list/NavigationMenuList.js +5 -3
- package/esm/navigation-menu/popup/NavigationMenuPopup.js +33 -34
- package/esm/navigation-menu/portal/NavigationMenuPortal.js +20 -10
- package/esm/navigation-menu/positioner/NavigationMenuPositioner.js +5 -3
- package/esm/navigation-menu/root/NavigationMenuRoot.js +23 -13
- package/esm/navigation-menu/trigger/NavigationMenuTrigger.js +61 -49
- package/esm/navigation-menu/viewport/NavigationMenuViewport.js +2 -4
- package/esm/number-field/decrement/NumberFieldDecrement.js +2 -4
- package/esm/number-field/group/NumberFieldGroup.js +2 -4
- package/esm/number-field/increment/NumberFieldIncrement.js +2 -4
- package/esm/number-field/input/NumberFieldInput.js +2 -4
- package/esm/number-field/root/NumberFieldRoot.js +37 -16
- package/esm/number-field/scrub-area/NumberFieldScrubArea.js +5 -3
- package/esm/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.js +8 -4
- package/esm/popover/arrow/PopoverArrow.js +2 -4
- package/esm/popover/backdrop/PopoverBackdrop.js +2 -4
- package/esm/popover/close/PopoverClose.js +2 -4
- package/esm/popover/description/PopoverDescription.js +2 -4
- package/esm/popover/popup/PopoverPopup.js +21 -8
- package/esm/popover/portal/PopoverPortal.js +20 -10
- package/esm/popover/positioner/PopoverPositioner.js +28 -13
- package/esm/popover/root/PopoverRoot.js +19 -13
- package/esm/popover/title/PopoverTitle.js +2 -4
- package/esm/popover/trigger/PopoverTrigger.js +2 -4
- package/esm/preview-card/arrow/PreviewCardArrow.js +2 -4
- package/esm/preview-card/backdrop/PreviewCardBackdrop.js +2 -4
- package/esm/preview-card/popup/PreviewCardPopup.js +2 -4
- package/esm/preview-card/portal/PreviewCardPortal.js +20 -10
- package/esm/preview-card/positioner/PreviewCardPositioner.js +5 -3
- package/esm/preview-card/root/PreviewCardRoot.js +5 -3
- package/esm/preview-card/trigger/PreviewCardTrigger.js +2 -4
- package/esm/progress/indicator/ProgressIndicator.js +2 -4
- package/esm/progress/label/ProgressLabel.js +2 -4
- package/esm/progress/root/ProgressRoot.js +5 -3
- package/esm/progress/track/ProgressTrack.js +2 -4
- package/esm/progress/value/ProgressValue.js +2 -4
- package/esm/radio/indicator/RadioIndicator.js +8 -4
- package/esm/radio/root/RadioRoot.js +22 -11
- package/esm/radio-group/RadioGroup.js +18 -10
- package/esm/scroll-area/content/ScrollAreaContent.js +2 -4
- package/esm/scroll-area/corner/ScrollAreaCorner.js +8 -4
- package/esm/scroll-area/root/ScrollAreaRoot.js +5 -3
- package/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js +13 -7
- package/esm/scroll-area/thumb/ScrollAreaThumb.js +2 -4
- package/esm/scroll-area/viewport/ScrollAreaViewport.js +5 -3
- package/esm/select/arrow/SelectArrow.js +8 -4
- package/esm/select/backdrop/SelectBackdrop.js +2 -4
- package/esm/select/group/SelectGroup.js +5 -3
- package/esm/select/group-label/SelectGroupLabel.js +2 -4
- package/esm/select/icon/SelectIcon.js +3 -7
- package/esm/select/item/SelectItem.js +5 -3
- package/esm/select/item-indicator/SelectItemIndicator.js +8 -4
- package/esm/select/item-text/SelectItemText.js +2 -4
- package/esm/select/popup/SelectPopup.js +13 -10
- package/esm/select/portal/SelectPortal.js +20 -10
- package/esm/select/positioner/SelectPositioner.js +24 -13
- package/esm/select/root/SelectRoot.js +58 -47
- package/esm/select/scroll-arrow/SelectScrollArrow.js +10 -7
- package/esm/select/scroll-down-arrow/SelectScrollDownArrow.js +8 -5
- package/esm/select/scroll-up-arrow/SelectScrollUpArrow.js +8 -5
- package/esm/select/trigger/SelectTrigger.js +2 -4
- package/esm/select/value/SelectValue.js +3 -7
- package/esm/separator/Separator.js +2 -4
- package/esm/slider/control/SliderControl.js +2 -4
- package/esm/slider/indicator/SliderIndicator.js +2 -4
- package/esm/slider/root/SliderRoot.js +71 -47
- package/esm/slider/thumb/SliderThumb.js +10 -11
- package/esm/slider/track/SliderTrack.js +2 -4
- package/esm/slider/value/SliderValue.js +3 -7
- package/esm/switch/root/SwitchRoot.js +20 -9
- package/esm/switch/thumb/SwitchThumb.js +2 -4
- package/esm/tabs/indicator/TabsIndicator.js +15 -11
- package/esm/tabs/list/TabsList.js +20 -12
- package/esm/tabs/panel/TabsPanel.js +3 -7
- package/esm/tabs/root/TabsRoot.js +13 -9
- package/esm/tabs/tab/TabsTab.js +2 -4
- package/esm/toast/action/ToastAction.js +3 -7
- package/esm/toast/close/ToastClose.js +2 -4
- package/esm/toast/description/ToastDescription.js +3 -7
- package/esm/toast/portal/ToastPortal.js +8 -4
- package/esm/toast/provider/ToastProvider.js +5 -3
- package/esm/toast/root/ToastRoot.js +37 -22
- package/esm/toast/title/ToastTitle.js +3 -7
- package/esm/toast/utils/test-utils.js +28 -21
- package/esm/toast/viewport/ToastViewport.js +13 -13
- package/esm/toggle/Toggle.js +10 -6
- package/esm/toggle-group/ToggleGroup.js +19 -11
- package/esm/toolbar/button/ToolbarButton.js +2 -2
- package/esm/toolbar/group/ToolbarGroup.js +5 -3
- package/esm/toolbar/input/ToolbarInput.js +2 -2
- package/esm/toolbar/link/ToolbarLink.js +2 -2
- package/esm/toolbar/root/ToolbarRoot.js +20 -10
- package/esm/toolbar/separator/ToolbarSeparator.js +12 -6
- package/esm/tooltip/arrow/TooltipArrow.js +2 -4
- package/esm/tooltip/popup/TooltipPopup.js +2 -4
- package/esm/tooltip/portal/TooltipPortal.js +20 -10
- package/esm/tooltip/positioner/TooltipPositioner.js +5 -3
- package/esm/tooltip/provider/TooltipProvider.js +15 -7
- package/esm/tooltip/root/TooltipRoot.js +5 -3
- package/esm/tooltip/trigger/TooltipTrigger.js +2 -4
- package/esm/unstable-no-ssr/NoSsr.js +12 -5
- package/esm/utils/FloatingPortalLite.js +8 -4
- package/esm/utils/FocusGuard.js +23 -10
- package/esm/utils/InternalBackdrop.js +22 -18
- package/esm/utils/styles.js +3 -5
- package/esm/utils/useRenderElement.js +36 -30
- package/package.json +4 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { createSignal, onCleanup, onMount } from 'solid-js';
|
|
2
3
|
import { createStore } from 'solid-js/store';
|
|
3
4
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
@@ -10,7 +11,6 @@ import { ScrollAreaScrollbarDataAttributes } from "../scrollbar/ScrollAreaScroll
|
|
|
10
11
|
import { getOffset } from "../utils/getOffset.js";
|
|
11
12
|
import { ScrollAreaRootContext } from "./ScrollAreaRootContext.js";
|
|
12
13
|
import { ScrollAreaRootCssVars } from "./ScrollAreaRootCssVars.js";
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
/**
|
|
15
15
|
* Groups all parts of the scroll area.
|
|
16
16
|
* Renders a `<div>` element.
|
|
@@ -198,8 +198,10 @@ export function ScrollAreaRoot(componentProps) {
|
|
|
198
198
|
}
|
|
199
199
|
}, elementProps]
|
|
200
200
|
});
|
|
201
|
-
return
|
|
201
|
+
return _$createComponent(ScrollAreaRootContext.Provider, {
|
|
202
202
|
value: contextValue,
|
|
203
|
-
children
|
|
203
|
+
get children() {
|
|
204
|
+
return element();
|
|
205
|
+
}
|
|
204
206
|
});
|
|
205
207
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { createEffect, onCleanup, Show } from 'solid-js';
|
|
2
3
|
import { useDirection } from "../../direction-provider/DirectionContext.js";
|
|
3
4
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
@@ -13,7 +14,6 @@ import { ScrollAreaScrollbarCssVars } from "./ScrollAreaScrollbarCssVars.js";
|
|
|
13
14
|
*
|
|
14
15
|
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
15
16
|
*/
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
export function ScrollAreaScrollbar(componentProps) {
|
|
18
18
|
const [, local, elementProps] = splitComponentProps(componentProps, ['orientation', 'keepMounted']);
|
|
19
19
|
const orientation = () => local.orientation ?? 'vertical';
|
|
@@ -165,11 +165,17 @@ export function ScrollAreaScrollbar(componentProps) {
|
|
|
165
165
|
}
|
|
166
166
|
}, elementProps]
|
|
167
167
|
});
|
|
168
|
-
return
|
|
169
|
-
when
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
return _$createComponent(Show, {
|
|
169
|
+
get when() {
|
|
170
|
+
return shouldRender();
|
|
171
|
+
},
|
|
172
|
+
get children() {
|
|
173
|
+
return _$createComponent(ScrollAreaScrollbarContext.Provider, {
|
|
174
|
+
value: contextValue,
|
|
175
|
+
get children() {
|
|
176
|
+
return element();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
174
180
|
});
|
|
175
181
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
2
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
2
3
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
3
4
|
import { useScrollAreaRootContext } from "../root/ScrollAreaRootContext.js";
|
|
@@ -10,7 +11,6 @@ import { ScrollAreaScrollbarCssVars } from "../scrollbar/ScrollAreaScrollbarCssV
|
|
|
10
11
|
*
|
|
11
12
|
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
12
13
|
*/
|
|
13
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export function ScrollAreaThumb(componentProps) {
|
|
15
15
|
const [,, elementProps] = splitComponentProps(componentProps, []);
|
|
16
16
|
const rootContext = useScrollAreaRootContext();
|
|
@@ -53,7 +53,5 @@ export function ScrollAreaThumb(componentProps) {
|
|
|
53
53
|
}
|
|
54
54
|
}, elementProps]
|
|
55
55
|
});
|
|
56
|
-
return
|
|
57
|
-
children: element()
|
|
58
|
-
});
|
|
56
|
+
return _$memo(element);
|
|
59
57
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { createEffect, on, onCleanup, onMount } from 'solid-js';
|
|
2
3
|
import { produce } from 'solid-js/store';
|
|
3
4
|
import { useDirection } from "../../direction-provider/DirectionContext.js";
|
|
@@ -18,7 +19,6 @@ import { ScrollAreaViewportContext } from "./ScrollAreaViewportContext.js";
|
|
|
18
19
|
*
|
|
19
20
|
* Documentation: [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area)
|
|
20
21
|
*/
|
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
export function ScrollAreaViewport(componentProps) {
|
|
23
23
|
const [,, elementProps] = splitComponentProps(componentProps, []);
|
|
24
24
|
let viewportEl;
|
|
@@ -189,8 +189,10 @@ export function ScrollAreaViewport(componentProps) {
|
|
|
189
189
|
onKeyDown: handleUserInteraction
|
|
190
190
|
}, elementProps]
|
|
191
191
|
});
|
|
192
|
-
return
|
|
192
|
+
return _$createComponent(ScrollAreaViewportContext.Provider, {
|
|
193
193
|
value: contextValue,
|
|
194
|
-
children
|
|
194
|
+
get children() {
|
|
195
|
+
return element();
|
|
196
|
+
}
|
|
195
197
|
});
|
|
196
198
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { Show } from 'solid-js';
|
|
2
3
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
4
|
import { popupStateMapping as baseMapping } from "../../utils/popupStateMapping.js";
|
|
@@ -5,7 +6,6 @@ import { transitionStatusMapping } from "../../utils/styleHookMapping.js";
|
|
|
5
6
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
6
7
|
import { useSelectPositionerContext } from "../positioner/SelectPositionerContext.js";
|
|
7
8
|
import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
const customStyleHookMapping = {
|
|
10
10
|
...baseMapping,
|
|
11
11
|
...transitionStatusMapping
|
|
@@ -55,8 +55,12 @@ export function SelectArrow(componentProps) {
|
|
|
55
55
|
}, elementProps],
|
|
56
56
|
customStyleHookMapping
|
|
57
57
|
});
|
|
58
|
-
return
|
|
59
|
-
when
|
|
60
|
-
|
|
58
|
+
return _$createComponent(Show, {
|
|
59
|
+
get when() {
|
|
60
|
+
return alignItemWithTriggerActive() === false;
|
|
61
|
+
},
|
|
62
|
+
get children() {
|
|
63
|
+
return element();
|
|
64
|
+
}
|
|
61
65
|
});
|
|
62
66
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
2
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
2
3
|
import { popupStateMapping } from "../../utils/popupStateMapping.js";
|
|
3
4
|
import { transitionStatusMapping } from "../../utils/styleHookMapping.js";
|
|
4
5
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
5
6
|
import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
6
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const customStyleHookMapping = {
|
|
8
8
|
...popupStateMapping,
|
|
9
9
|
...transitionStatusMapping
|
|
@@ -42,7 +42,5 @@ export function SelectBackdrop(componentProps) {
|
|
|
42
42
|
}
|
|
43
43
|
}, elementProps]
|
|
44
44
|
});
|
|
45
|
-
return
|
|
46
|
-
children: element()
|
|
47
|
-
});
|
|
45
|
+
return _$memo(element);
|
|
48
46
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { createSignal } from 'solid-js';
|
|
2
3
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
4
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
@@ -9,7 +10,6 @@ import { SelectGroupContext } from "./SelectGroupContext.js";
|
|
|
9
10
|
*
|
|
10
11
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
11
12
|
*/
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export function SelectGroup(componentProps) {
|
|
14
14
|
const [,, elementProps] = splitComponentProps(componentProps, []);
|
|
15
15
|
const [labelId, setLabelId] = createSignal();
|
|
@@ -25,8 +25,10 @@ export function SelectGroup(componentProps) {
|
|
|
25
25
|
}
|
|
26
26
|
}, elementProps]
|
|
27
27
|
});
|
|
28
|
-
return
|
|
28
|
+
return _$createComponent(SelectGroupContext.Provider, {
|
|
29
29
|
value: contextValue,
|
|
30
|
-
children
|
|
30
|
+
get children() {
|
|
31
|
+
return element();
|
|
32
|
+
}
|
|
31
33
|
});
|
|
32
34
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
2
|
import { createRenderEffect } from 'solid-js';
|
|
2
3
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
4
|
import { useBaseUiId } from "../../utils/useBaseUiId.js";
|
|
@@ -10,7 +11,6 @@ import { useSelectGroupContext } from "../group/SelectGroupContext.js";
|
|
|
10
11
|
*
|
|
11
12
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
12
13
|
*/
|
|
13
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export function SelectGroupLabel(componentProps) {
|
|
15
15
|
const [, local, elementProps] = splitComponentProps(componentProps, ['id']);
|
|
16
16
|
const {
|
|
@@ -27,7 +27,5 @@ export function SelectGroupLabel(componentProps) {
|
|
|
27
27
|
}
|
|
28
28
|
}, elementProps]
|
|
29
29
|
});
|
|
30
|
-
return
|
|
31
|
-
children: element()
|
|
32
|
-
});
|
|
30
|
+
return _$memo(element);
|
|
33
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
2
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
2
3
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
3
4
|
|
|
@@ -7,7 +8,6 @@ import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
|
7
8
|
*
|
|
8
9
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
9
10
|
*/
|
|
10
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export function SelectIcon(componentProps) {
|
|
12
12
|
const [,, elementProps] = splitComponentProps(componentProps, []);
|
|
13
13
|
const element = useRenderElement('span', componentProps, {
|
|
@@ -15,12 +15,8 @@ export function SelectIcon(componentProps) {
|
|
|
15
15
|
'aria-hidden': true
|
|
16
16
|
}, elementProps],
|
|
17
17
|
get children() {
|
|
18
|
-
return
|
|
19
|
-
children: componentProps.children ?? '▼'
|
|
20
|
-
});
|
|
18
|
+
return _$memo(() => componentProps.children ?? '▼');
|
|
21
19
|
}
|
|
22
20
|
});
|
|
23
|
-
return
|
|
24
|
-
children: element()
|
|
25
|
-
});
|
|
21
|
+
return _$memo(element);
|
|
26
22
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { batch, createEffect, createMemo, onCleanup } from 'solid-js';
|
|
2
3
|
import { IndexGuessBehavior, useCompositeListItem } from "../../composite/list/useCompositeListItem.js";
|
|
3
4
|
import { mergeProps } from "../../merge-props/mergeProps.js";
|
|
@@ -14,7 +15,6 @@ import { SelectItemContext } from "./SelectItemContext.js";
|
|
|
14
15
|
*
|
|
15
16
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
16
17
|
*/
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
export function SelectItem(componentProps) {
|
|
19
19
|
const [, local, elementProps] = splitComponentProps(componentProps, ['value', 'label', 'disabled', 'nativeButton']);
|
|
20
20
|
const value = () => local.value ?? null;
|
|
@@ -195,8 +195,10 @@ export function SelectItem(componentProps) {
|
|
|
195
195
|
},
|
|
196
196
|
props: [props => mergeProps(props, rootProps()), defaultProps, elementProps, getButtonProps]
|
|
197
197
|
});
|
|
198
|
-
return
|
|
198
|
+
return _$createComponent(SelectItemContext.Provider, {
|
|
199
199
|
value: contextValue,
|
|
200
|
-
children
|
|
200
|
+
get children() {
|
|
201
|
+
return element();
|
|
202
|
+
}
|
|
201
203
|
});
|
|
202
204
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { Show } from 'solid-js';
|
|
2
3
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
4
|
import { transitionStatusMapping } from "../../utils/styleHookMapping.js";
|
|
@@ -12,7 +13,6 @@ import { useSelectItemContext } from "../item/SelectItemContext.js";
|
|
|
12
13
|
*
|
|
13
14
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
14
15
|
*/
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
export function SelectItemIndicator(componentProps) {
|
|
17
17
|
const [, local, elementProps] = splitComponentProps(componentProps, ['keepMounted']);
|
|
18
18
|
const keepMounted = () => local.keepMounted ?? false;
|
|
@@ -57,8 +57,12 @@ export function SelectItemIndicator(componentProps) {
|
|
|
57
57
|
}, elementProps],
|
|
58
58
|
children: () => componentProps.children ?? '✔️'
|
|
59
59
|
});
|
|
60
|
-
return
|
|
61
|
-
when
|
|
62
|
-
|
|
60
|
+
return _$createComponent(Show, {
|
|
61
|
+
get when() {
|
|
62
|
+
return shouldRender();
|
|
63
|
+
},
|
|
64
|
+
get children() {
|
|
65
|
+
return element();
|
|
66
|
+
}
|
|
63
67
|
});
|
|
64
68
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
2
|
import { createEffect, on } from 'solid-js';
|
|
2
3
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
4
|
import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
@@ -10,7 +11,6 @@ import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
|
10
11
|
*
|
|
11
12
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
12
13
|
*/
|
|
13
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export function SelectItemText(componentProps) {
|
|
15
15
|
const [,, elementProps] = splitComponentProps(componentProps, []);
|
|
16
16
|
let ref = null;
|
|
@@ -34,7 +34,5 @@ export function SelectItemText(componentProps) {
|
|
|
34
34
|
},
|
|
35
35
|
props: elementProps
|
|
36
36
|
});
|
|
37
|
-
return
|
|
38
|
-
children: element()
|
|
39
|
-
});
|
|
37
|
+
return _$memo(element);
|
|
40
38
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
3
|
import { createEffect, onCleanup } from 'solid-js';
|
|
2
4
|
import { FloatingFocusManager } from "../../floating-ui-solid/index.js";
|
|
3
5
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
@@ -13,7 +15,6 @@ import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
|
13
15
|
import { useSelectPositionerContext } from "../positioner/SelectPositionerContext.js";
|
|
14
16
|
import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
15
17
|
import { clearPositionerStyles } from "./utils.js";
|
|
16
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const customStyleHookMapping = {
|
|
18
19
|
...popupStateMapping,
|
|
19
20
|
...transitionStatusMapping
|
|
@@ -309,13 +310,15 @@ export function SelectPopup(componentProps) {
|
|
|
309
310
|
}
|
|
310
311
|
}, elementProps]
|
|
311
312
|
});
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
return [_$memo(() => styleDisableScrollbar.element), _$createComponent(FloatingFocusManager, {
|
|
314
|
+
context: context,
|
|
315
|
+
modal: false,
|
|
316
|
+
get disabled() {
|
|
317
|
+
return !store.mounted;
|
|
318
|
+
},
|
|
319
|
+
restoreFocus: true,
|
|
320
|
+
get children() {
|
|
321
|
+
return element();
|
|
322
|
+
}
|
|
323
|
+
})];
|
|
321
324
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
1
2
|
import { Show } from 'solid-js';
|
|
2
3
|
import { FloatingPortal } from "../../floating-ui-solid/index.js";
|
|
3
4
|
import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
@@ -9,20 +10,29 @@ import { SelectPortalContext } from "./SelectPortalContext.js";
|
|
|
9
10
|
*
|
|
10
11
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
11
12
|
*/
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export function SelectPortal(props) {
|
|
14
14
|
const {
|
|
15
15
|
store
|
|
16
16
|
} = useSelectRootContext();
|
|
17
17
|
const shouldRender = () => store.mounted || store.forceMount;
|
|
18
|
-
return
|
|
19
|
-
when
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
return _$createComponent(Show, {
|
|
19
|
+
get when() {
|
|
20
|
+
return shouldRender();
|
|
21
|
+
},
|
|
22
|
+
get children() {
|
|
23
|
+
return _$createComponent(SelectPortalContext.Provider, {
|
|
24
|
+
value: true,
|
|
25
|
+
get children() {
|
|
26
|
+
return _$createComponent(FloatingPortal, {
|
|
27
|
+
get root() {
|
|
28
|
+
return props.container;
|
|
29
|
+
},
|
|
30
|
+
get children() {
|
|
31
|
+
return props.children;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
27
37
|
});
|
|
28
38
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
3
|
import { createEffect, createSignal, mergeProps as solidMergeProps } from 'solid-js';
|
|
2
4
|
import { produce } from 'solid-js/store';
|
|
3
5
|
import { CompositeList } from "../../composite/list/CompositeList.js";
|
|
@@ -12,7 +14,6 @@ import { useRenderElement } from "../../utils/useRenderElement.js";
|
|
|
12
14
|
import { clearPositionerStyles } from "../popup/utils.js";
|
|
13
15
|
import { useSelectFloatingContext, useSelectRootContext } from "../root/SelectRootContext.js";
|
|
14
16
|
import { SelectPositionerContext } from "./SelectPositionerContext.js";
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const FIXED = {
|
|
17
18
|
position: 'fixed'
|
|
18
19
|
};
|
|
@@ -154,19 +155,29 @@ export function SelectPositioner(componentProps) {
|
|
|
154
155
|
customStyleHookMapping: popupStateMapping,
|
|
155
156
|
props: [defaultProps, elementProps]
|
|
156
157
|
});
|
|
157
|
-
return
|
|
158
|
-
refs
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
return _$createComponent(CompositeList, {
|
|
159
|
+
get refs() {
|
|
160
|
+
return {
|
|
161
|
+
elements: refs.listRef,
|
|
162
|
+
labels: refs.labelsRef
|
|
163
|
+
};
|
|
161
164
|
},
|
|
162
165
|
onMapChange: onMapChange,
|
|
163
|
-
children
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
get children() {
|
|
167
|
+
return _$createComponent(SelectPositionerContext.Provider, {
|
|
168
|
+
value: contextValue,
|
|
169
|
+
get children() {
|
|
170
|
+
return [_$memo(() => _$memo(() => !!(store.mounted && store.modal))() && _$createComponent(InternalBackdrop, {
|
|
171
|
+
managed: true,
|
|
172
|
+
get inert() {
|
|
173
|
+
return inertValue(!store.open);
|
|
174
|
+
},
|
|
175
|
+
get cutout() {
|
|
176
|
+
return store.triggerElement;
|
|
177
|
+
}
|
|
178
|
+
})), _$memo(() => element())];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
171
182
|
});
|
|
172
183
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { template as _$template } from "solid-js/web";
|
|
2
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
3
|
+
import { spread as _$spread } from "solid-js/web";
|
|
4
|
+
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
5
|
+
import { memo as _$memo } from "solid-js/web";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/_$template(`<input>`);
|
|
1
7
|
import { createMemo } from 'solid-js';
|
|
2
8
|
import { useFieldRootContext } from "../../field/root/FieldRootContext.js";
|
|
3
9
|
import { visuallyHidden } from "../../utils/visuallyHidden.js";
|
|
@@ -11,7 +17,6 @@ import { useSelectRoot } from "./useSelectRoot.js";
|
|
|
11
17
|
*
|
|
12
18
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
13
19
|
*/
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
20
|
export function SelectRoot(props) {
|
|
16
21
|
const defaultValue = () => props.defaultValue ?? null;
|
|
17
22
|
const defaultOpen = () => props.defaultOpen ?? false;
|
|
@@ -50,53 +55,59 @@ export function SelectRoot(props) {
|
|
|
50
55
|
controlId
|
|
51
56
|
} = useFieldRootContext();
|
|
52
57
|
const serializedValue = createMemo(() => serializeValue(value()));
|
|
53
|
-
return
|
|
58
|
+
return _$createComponent(SelectRootContext.Provider, {
|
|
54
59
|
value: rootContext,
|
|
55
|
-
children
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
rootContext.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const resolvedValue = value();
|
|
72
|
-
queueMicrotask(() => {
|
|
73
|
-
const exactValue = rootContext.refs.valuesRef.find(v => v === nextValue || typeof resolvedValue === 'string' && nextValue.toLowerCase() === v.toLowerCase());
|
|
74
|
-
if (exactValue != null) {
|
|
75
|
-
setDirty(exactValue !== validityData.initialValue);
|
|
76
|
-
rootContext.setValue?.(exactValue, event);
|
|
77
|
-
if (validationMode() === 'onChange') {
|
|
78
|
-
rootContext.fieldControlValidation.commitValidation(exactValue);
|
|
60
|
+
get children() {
|
|
61
|
+
return _$createComponent(SelectFloatingContext.Provider, {
|
|
62
|
+
value: floatingContext,
|
|
63
|
+
get children() {
|
|
64
|
+
return [_$memo(() => props.children), (() => {
|
|
65
|
+
var _el$ = _tmpl$();
|
|
66
|
+
_$spread(_el$, _$mergeProps(() => rootContext.fieldControlValidation.getInputValidationProps({
|
|
67
|
+
onFocus() {
|
|
68
|
+
// Move focus to the trigger element when the hidden input is focused.
|
|
69
|
+
rootContext.store.triggerElement?.focus();
|
|
70
|
+
},
|
|
71
|
+
// Handle browser autofill.
|
|
72
|
+
onInput(event) {
|
|
73
|
+
// Workaround for https://github.com/facebook/react/issues/9023
|
|
74
|
+
if (event.defaultPrevented) {
|
|
75
|
+
return;
|
|
79
76
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
77
|
+
const nextValue = event.target.value;
|
|
78
|
+
rootContext.setStore('forceMount', true);
|
|
79
|
+
const resolvedValue = value();
|
|
80
|
+
queueMicrotask(() => {
|
|
81
|
+
const exactValue = rootContext.refs.valuesRef.find(v => v === nextValue || typeof resolvedValue === 'string' && nextValue.toLowerCase() === v.toLowerCase());
|
|
82
|
+
if (exactValue != null) {
|
|
83
|
+
setDirty(exactValue !== validityData.initialValue);
|
|
84
|
+
rootContext.setValue?.(exactValue, event);
|
|
85
|
+
if (validationMode() === 'onChange') {
|
|
86
|
+
rootContext.fieldControlValidation.commitValidation(exactValue);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
ref: el => {
|
|
92
|
+
if (props.refs) {
|
|
93
|
+
props.refs.inputRef = el;
|
|
94
|
+
}
|
|
95
|
+
rootContext.fieldControlValidation.refs.inputRef = el;
|
|
96
|
+
},
|
|
97
|
+
id: props.id || controlId() || undefined,
|
|
98
|
+
name: rootContext.name(),
|
|
99
|
+
disabled: rootContext.disabled(),
|
|
100
|
+
required: rootContext.required(),
|
|
101
|
+
readOnly: rootContext.readOnly(),
|
|
102
|
+
value: serializedValue(),
|
|
103
|
+
style: visuallyHidden,
|
|
104
|
+
tabIndex: -1,
|
|
105
|
+
'aria-hidden': true
|
|
106
|
+
})), false, false);
|
|
107
|
+
return _el$;
|
|
108
|
+
})()];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
101
112
|
});
|
|
102
113
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2
|
+
import { memo as _$memo } from "solid-js/web";
|
|
1
3
|
import { Show } from 'solid-js';
|
|
2
4
|
import { splitComponentProps } from "../../solid-helpers.js";
|
|
3
5
|
import { useOpenChangeComplete } from "../../utils/useOpenChangeComplete.js";
|
|
@@ -10,7 +12,6 @@ import { useSelectRootContext } from "../root/SelectRootContext.js";
|
|
|
10
12
|
/**
|
|
11
13
|
* @internal
|
|
12
14
|
*/
|
|
13
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
export function SelectScrollArrow(componentProps) {
|
|
15
16
|
const [, local, elementProps] = splitComponentProps(componentProps, ['direction', 'keepMounted']);
|
|
16
17
|
const keepMounted = () => componentProps.keepMounted ?? false;
|
|
@@ -60,9 +61,7 @@ export function SelectScrollArrow(componentProps) {
|
|
|
60
61
|
},
|
|
61
62
|
'aria-hidden': true,
|
|
62
63
|
get children() {
|
|
63
|
-
return
|
|
64
|
-
children: local.direction === 'up' ? '▲' : '▼'
|
|
65
|
-
});
|
|
64
|
+
return _$memo(() => local.direction === 'up' ? '▲' : '▼');
|
|
66
65
|
},
|
|
67
66
|
style: {
|
|
68
67
|
position: 'absolute'
|
|
@@ -149,8 +148,12 @@ export function SelectScrollArrow(componentProps) {
|
|
|
149
148
|
},
|
|
150
149
|
props: [defaultProps, elementProps]
|
|
151
150
|
});
|
|
152
|
-
return
|
|
153
|
-
when
|
|
154
|
-
|
|
151
|
+
return _$createComponent(Show, {
|
|
152
|
+
get when() {
|
|
153
|
+
return shouldRender();
|
|
154
|
+
},
|
|
155
|
+
get children() {
|
|
156
|
+
return element();
|
|
157
|
+
}
|
|
155
158
|
});
|
|
156
159
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
2
|
+
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
1
3
|
import { SelectScrollArrow } from "../scroll-arrow/SelectScrollArrow.js";
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -6,11 +8,12 @@ import { SelectScrollArrow } from "../scroll-arrow/SelectScrollArrow.js";
|
|
|
6
8
|
*
|
|
7
9
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
8
10
|
*/
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
export function SelectScrollDownArrow(props) {
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
return _$createComponent(SelectScrollArrow, _$mergeProps(props, {
|
|
13
|
+
ref(r$) {
|
|
14
|
+
var _ref$ = props.ref;
|
|
15
|
+
typeof _ref$ === "function" ? _ref$(r$) : props.ref = r$;
|
|
16
|
+
},
|
|
14
17
|
direction: "down"
|
|
15
|
-
});
|
|
18
|
+
}));
|
|
16
19
|
}
|