solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.1
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/CHANGELOG.md +30 -0
- package/README.md +95 -8
- package/dist/lib/client/DialogHandle-BGyIbcvg.js +521 -0
- package/dist/lib/client/DialogPopup-Df7MC358.js +138 -0
- package/dist/lib/client/FieldControl-C0PATyKV.js +142 -0
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-NP1uPXTi.js} +5 -5
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-yfncqM-D.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-CQI6Om1Z.js} +1 -1
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-Du0O57fL.js} +118 -98
- package/dist/lib/client/{PopupViewport-DgrIqQea.js → PopupViewport-IS4XU03s.js} +2 -2
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Cs8LVBj5.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-BFeZFpJZ.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-BxGUF8_Q.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-C9QA98XD.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-BQoEzzav.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-akYS6FyY.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-DOXtzBhA.js +425 -0
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-CwMDoSTK.js +135 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-t8YReaIp.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-6DhOdzit.js +399 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-cOVxAoxB.js} +5 -1
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-CplDpqmi.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-D96gu-Dz.js} +148 -145
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction--s9_qBf3.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-Dn-stj-8.js} +1 -1
- package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-B9tR9X48.js} +2 -2
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-dyr3_sKQ.js +1539 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-CjUAjp1m.js +483 -0
- package/dist/lib/client/fieldset/index.js +1 -1
- package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-6Ne_bWQX.js +109 -0
- package/dist/lib/client/index.js +44 -42
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-gb0ejxkm.js → input-_QHvSSqM.js} +1 -1
- package/dist/lib/client/internals/form-context/index.js +1 -1
- package/dist/lib/client/internals/labelable-provider/index.js +1 -1
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-DLqUBmMK.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-DhPRUQZ6.js +163 -0
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → mergeStyleValue-DhTA9Nwe.js} +7 -3
- package/dist/lib/client/meter/index.js +1 -1
- package/dist/lib/client/meter-BvWdppcx.js +178 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/navigation-menu-mVHV41Ky.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-DusLw_0X.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-D-B9tZzF.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cv7xn0nW.js +938 -0
- package/dist/lib/client/popupStateMapping-C6jQ_LKo.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-FTN_aafM.js +632 -0
- package/dist/lib/client/progress/index.js +1 -1
- package/dist/lib/client/progress-AVKxvgpc.js +195 -0
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/radio-DA_oZhQT.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-CWtQxWDl.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DJG0VIVo.js} +4 -0
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-NCr49LkD.js +717 -0
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-DSPJt7Rk.js +1933 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CWq9hxFf.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-CPl7QHKI.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-Bn4rZDyZ.js +692 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-7LdqZWOs.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CsC37e3e.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-DSWb9HxN.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-DcCi3HNp.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-D-PkGco9.js +849 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-B7z2CGMV.js +2270 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-nJSSy_jM.js} +24 -33
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-Da1aIxVA.js} +10 -13
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-BDeNR3ug.js} +56 -20
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-1LfoCsya.js} +1 -3
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-rR8ZN7YR.js} +133 -166
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-Ct6wywmP.js} +1 -1
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-kHjFPiQ5.js} +38 -14
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-DftN5VUp.js} +2 -2
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-CvoGfft9.js +61 -0
- package/dist/lib/server/accordion/index.js +32 -70
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +14 -5
- package/dist/lib/server/avatar/index.js +90 -51
- package/dist/lib/server/button/index.js +8 -9
- package/dist/lib/server/checkbox/index.js +30 -57
- package/dist/lib/server/checkbox-group/index.js +20 -10
- package/dist/lib/server/collapsible/index.js +36 -43
- package/dist/lib/server/combobox/index.js +64 -35
- package/dist/lib/server/{constants-9H__9xbS.js → constants-D7ciIzsV.js} +8 -3
- package/dist/lib/server/context-menu/index.js +7 -9
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-B5Y0WEev.js} +11 -6
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DMyKsniI.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-ImBjwdj_.js} +1 -1
- package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
- package/dist/lib/server/dialog/index.js +2 -2
- package/dist/lib/server/drawer/index.js +63 -71
- package/dist/lib/server/field/index.js +105 -93
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +16 -12
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/form-context/index.js +1 -1
- package/dist/lib/server/internals/labelable-provider/index.js +1 -1
- package/dist/lib/server/menu/index.js +21 -20
- package/dist/lib/server/menubar/index.js +6 -31
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → mergeStyleValue-BwJ10_X2.js} +6 -1
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +53 -124
- package/dist/lib/server/number-field/index.js +44 -42
- package/dist/lib/server/otp-field/index.js +11 -14
- package/dist/lib/server/popover/index.js +42 -59
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-B2KsiiLb.js} +18 -16
- package/dist/lib/server/preview-card/index.js +30 -41
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +18 -39
- package/dist/lib/server/radio-group/index.js +7 -8
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-C1GNJbKR.js} +5 -0
- package/dist/lib/server/scroll-area/index.js +23 -32
- package/dist/lib/server/select/index.js +95 -181
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +25 -38
- package/dist/lib/server/switch/index.js +13 -23
- package/dist/lib/server/tabs/index.js +185 -129
- package/dist/lib/server/toast/index.js +49 -66
- package/dist/lib/server/toggle/index.js +4 -6
- package/dist/lib/server/toggle-group/index.js +9 -7
- package/dist/lib/server/toolbar/index.js +62 -79
- package/dist/lib/server/tooltip/index.js +28 -37
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-DCxq20Is.js} +164 -189
- package/dist/lib/server/useRender-CryVdCjs.js +16 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
- package/dist/lib/types/button/Button.d.ts +1 -1
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/dist/lib/types/combobox/index.d.ts +2 -0
- package/dist/lib/types/combobox/index.parts.d.ts +1 -0
- package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +12 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
- package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
- package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
- package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
- package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
- package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
- package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
- package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/dist/lib/types/separator/Separator.d.ts +1 -1
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
- package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
- package/dist/lib/types/toast/createToastManager.d.ts +2 -2
- package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
- package/dist/lib/types/toast/useToastManager.d.ts +1 -1
- package/dist/lib/types/toggle/Toggle.d.ts +1 -1
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +1 -1
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +1 -1
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/dist/lib/types/types/index.d.ts +7 -3
- package/dist/lib/types/use-render/index.d.ts +2 -0
- package/dist/lib/types/use-render/useRender.d.ts +10 -0
- package/package.json +24 -11
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
- package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
- package/dist/lib/client/Separator-9DboD_Si.js +0 -25
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
- package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
- package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
- package/dist/lib/client/button-DpUi-2g8.js +0 -82
- package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
- package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
- package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
- package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
- package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
- package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
- package/dist/lib/client/field-C-o7jzKW.js +0 -469
- package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
- package/dist/lib/client/form-BINBiW5L.js +0 -106
- package/dist/lib/client/menu-DeMT08oD.js +0 -326
- package/dist/lib/client/menubar-C4aomSYv.js +0 -185
- package/dist/lib/client/meter-xSU37Q0m.js +0 -171
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
- package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
- package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
- package/dist/lib/client/popover-CQwyp-fs.js +0 -929
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
- package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
- package/dist/lib/client/progress-D7r0xAC9.js +0 -188
- package/dist/lib/client/radio-CzGQ81z1.js +0 -299
- package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
- package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
- package/dist/lib/client/select-IFhiEg73.js +0 -1940
- package/dist/lib/client/slider-BCagYmGp.js +0 -921
- package/dist/lib/client/switch-RIJeDnvS.js +0 -308
- package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
- package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
- package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
- package/dist/lib/client/toggle-momVEIBL.js +0 -138
- package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
- package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
- package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { merge as e, untrack as t } from "solid-js";
|
|
2
|
+
//#region src/use-render/useRender.ts
|
|
3
|
+
function n(n, r, i) {
|
|
4
|
+
return (a) => {
|
|
5
|
+
let o = t(() => n.render);
|
|
6
|
+
if (!o) return t(() => i(a));
|
|
7
|
+
let s = e(r);
|
|
8
|
+
return t(() => o(a, s));
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { N as triggerPress, d as imperativeAction, i as closePress } from "./internals/reasons.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
@@ -7,12 +8,12 @@ import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
|
7
8
|
import { a as isElement, n as contains, r as getEventTarget } from "./dom-Crg_2R-j.js";
|
|
8
9
|
import { n as createScrollLock, t as InternalBackdrop } from "./InternalBackdrop-C_iDPVR-.js";
|
|
9
10
|
import { c as useFloatingTree, i as createFloatingNode, n as FloatingTreeContext, r as FloatingTreeStore, s as useFloatingParentNodeId, t as FloatingParentNodeContext } from "./FloatingTree-z1JPD1dR.js";
|
|
10
|
-
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-
|
|
11
|
-
import { a as triggerOpenStateMapping, o as PopupPortal } from "./popupStateMapping-
|
|
12
|
-
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "./PopupHandle-
|
|
13
|
-
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
|
|
11
|
+
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-kHjFPiQ5.js";
|
|
12
|
+
import { a as triggerOpenStateMapping, o as PopupPortal } from "./popupStateMapping-B2KsiiLb.js";
|
|
13
|
+
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "./PopupHandle-Ct6wywmP.js";
|
|
14
14
|
import { t as setRef } from "./setRef-Bt70sW7c.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
|
|
16
|
+
import { escape, memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
16
17
|
import { $REFRESH, Show, createContext, createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
17
18
|
//#region src/dialog/store/DialogStore.ts
|
|
18
19
|
var DialogStore = class extends PopupStore {
|
|
@@ -309,10 +310,11 @@ function DialogClose(props) {
|
|
|
309
310
|
const disabled = createMemo(() => internalProps.disabled ?? false);
|
|
310
311
|
const nativeButton = createMemo(() => internalProps.nativeButton ?? true);
|
|
311
312
|
const state = createMemo(() => ({ disabled: disabled() }));
|
|
313
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
312
314
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
313
315
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
314
316
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
315
|
-
const others = omit(allProps, "
|
|
317
|
+
const others = omit(allProps, "render", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
316
318
|
function handleClick(event) {
|
|
317
319
|
if (context.store.open()) context.store.setOpen(false, createChangeEventDetails(closePress, event));
|
|
318
320
|
}
|
|
@@ -321,10 +323,7 @@ function DialogClose(props) {
|
|
|
321
323
|
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
322
324
|
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
323
325
|
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
324
|
-
return
|
|
325
|
-
get component() {
|
|
326
|
-
return props.as ?? "button";
|
|
327
|
-
},
|
|
326
|
+
return Render(mergeProps({
|
|
328
327
|
ref: [internalProps.ref],
|
|
329
328
|
get type() {
|
|
330
329
|
return nativeButton() ? "button" : void 0;
|
|
@@ -366,17 +365,15 @@ function DialogDescription(props) {
|
|
|
366
365
|
const generatedId = `base-ui-${createUniqueId()}`;
|
|
367
366
|
const id = createMemo(() => internalProps.id || generatedId);
|
|
368
367
|
const state = {};
|
|
368
|
+
const Render = useRender(props, () => state, (props) => ssrElement("p", props, void 0, true));
|
|
369
369
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
370
370
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
371
|
-
const others = omit(allProps, "
|
|
371
|
+
const others = omit(allProps, "render", "class", "id", "ref", "style");
|
|
372
372
|
createEffect(() => id(), (current) => {
|
|
373
373
|
context.setDescriptionId(current);
|
|
374
374
|
return () => context.setDescriptionId((existing) => existing === current ? void 0 : existing);
|
|
375
375
|
});
|
|
376
|
-
return
|
|
377
|
-
get component() {
|
|
378
|
-
return props.as ?? "p";
|
|
379
|
-
},
|
|
376
|
+
return Render(mergeProps({
|
|
380
377
|
ref: [internalProps.ref],
|
|
381
378
|
get id() {
|
|
382
379
|
return id();
|
|
@@ -410,7 +407,7 @@ function DialogPortal(props) {
|
|
|
410
407
|
const state = {};
|
|
411
408
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
412
409
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
413
|
-
const others = omit(allProps, "
|
|
410
|
+
const others = omit(allProps, "render", "class", "container", "keepMounted", "ref", "style");
|
|
414
411
|
const portalContext = { keepMounted };
|
|
415
412
|
function DialogInternalBackdrop() {
|
|
416
413
|
let element = null;
|
|
@@ -436,8 +433,8 @@ function DialogPortal(props) {
|
|
|
436
433
|
value: portalContext,
|
|
437
434
|
get children() {
|
|
438
435
|
return PopupPortal(mergeProps({
|
|
439
|
-
get
|
|
440
|
-
return props.
|
|
436
|
+
get render() {
|
|
437
|
+
return props.render;
|
|
441
438
|
},
|
|
442
439
|
get container() {
|
|
443
440
|
return internalProps.container;
|
|
@@ -480,17 +477,15 @@ function DialogTitle(props) {
|
|
|
480
477
|
const generatedId = `base-ui-${createUniqueId()}`;
|
|
481
478
|
const id = createMemo(() => internalProps.id || generatedId);
|
|
482
479
|
const state = {};
|
|
480
|
+
const Render = useRender(props, () => state, (props) => ssrElement("h2", props, void 0, true));
|
|
483
481
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
484
482
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
485
|
-
const others = omit(allProps, "
|
|
483
|
+
const others = omit(allProps, "render", "class", "id", "ref", "style");
|
|
486
484
|
createEffect(() => id(), (current) => {
|
|
487
485
|
context.setTitleId(current);
|
|
488
486
|
return () => context.setTitleId((existing) => existing === current ? void 0 : existing);
|
|
489
487
|
});
|
|
490
|
-
return
|
|
491
|
-
get component() {
|
|
492
|
-
return props.as ?? "h2";
|
|
493
|
-
},
|
|
488
|
+
return Render(mergeProps({
|
|
494
489
|
ref: [internalProps.ref],
|
|
495
490
|
get id() {
|
|
496
491
|
return id();
|
|
@@ -526,10 +521,11 @@ function DialogTrigger(props) {
|
|
|
526
521
|
disabled: disabled(),
|
|
527
522
|
open: open()
|
|
528
523
|
}));
|
|
524
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
529
525
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
530
526
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
531
527
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), triggerOpenStateMapping));
|
|
532
|
-
const others = omit(allProps, "
|
|
528
|
+
const others = omit(allProps, "render", "class", "disabled", "handle", "id", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "payload", "ref", "style");
|
|
533
529
|
let pointerType = "";
|
|
534
530
|
let clickPointerType = "";
|
|
535
531
|
createTriggerRegistration(store, id, element, () => ({ payload: internalProps.payload }));
|
|
@@ -560,10 +556,7 @@ function DialogTrigger(props) {
|
|
|
560
556
|
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
561
557
|
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => handleKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
562
558
|
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
563
|
-
return
|
|
564
|
-
get component() {
|
|
565
|
-
return props.as ?? "button";
|
|
566
|
-
},
|
|
559
|
+
return Render(mergeProps({
|
|
567
560
|
ref: [((value) => setElement(value)), internalProps.ref],
|
|
568
561
|
get id() {
|
|
569
562
|
return id();
|
|
@@ -618,13 +611,14 @@ function DialogViewport(props) {
|
|
|
618
611
|
const portal = useDialogPortalContext();
|
|
619
612
|
const context = useDialogRootContext();
|
|
620
613
|
const internalProps = props;
|
|
621
|
-
const others = omit(props, "
|
|
614
|
+
const others = omit(props, "render", "class", "ref", "style");
|
|
622
615
|
const state = createMemo(() => ({
|
|
623
616
|
open: context.store.open(),
|
|
624
617
|
transitionStatus: context.store.track().transitionStatus,
|
|
625
618
|
nested: context.nested,
|
|
626
619
|
nestedDialogOpen: context.nestedOpenDialogCount() > 0
|
|
627
620
|
}));
|
|
621
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
628
622
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
629
623
|
const styleValue = createMemo(() => mergeDialogStyles({ "pointer-events": context.store.open() ? void 0 : "none" }, resolveStyle(props.style, state())));
|
|
630
624
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), dialogStateAttributesMapping));
|
|
@@ -638,10 +632,7 @@ function DialogViewport(props) {
|
|
|
638
632
|
return shouldRender();
|
|
639
633
|
},
|
|
640
634
|
get children() {
|
|
641
|
-
return
|
|
642
|
-
get component() {
|
|
643
|
-
return props.as ?? "div";
|
|
644
|
-
},
|
|
635
|
+
return Render(mergeProps({
|
|
645
636
|
ref: [((element) => {
|
|
646
637
|
viewportElement = element;
|
|
647
638
|
context.setViewportElement(element);
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
3
4
|
import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
4
|
-
import { t as FocusManager } from "./FocusManager-
|
|
5
|
-
import { d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, s as useDialogPortalContext, u as dialogStateAttributesMapping } from "./DialogHandle-
|
|
6
|
-
import {
|
|
5
|
+
import { t as FocusManager } from "./FocusManager-1LfoCsya.js";
|
|
6
|
+
import { d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, s as useDialogPortalContext, u as dialogStateAttributesMapping } from "./DialogHandle-nJSSy_jM.js";
|
|
7
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
7
8
|
import { Show, createEffect, createMemo, omit, onCleanup } from "solid-js";
|
|
8
9
|
//#region src/dialog/backdrop/DialogBackdrop.tsx
|
|
9
10
|
/** An overlay displayed beneath the dialog popup. */
|
|
10
11
|
function DialogBackdrop(props) {
|
|
11
12
|
const context = useDialogRootContext();
|
|
12
13
|
const internalProps = props;
|
|
13
|
-
const others = omit(props, "
|
|
14
|
+
const others = omit(props, "render", "class", "forceRender", "ref", "style");
|
|
14
15
|
const state = createMemo(() => ({
|
|
15
16
|
open: context.store.open(),
|
|
16
17
|
transitionStatus: context.store.track().transitionStatus
|
|
17
18
|
}));
|
|
19
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
18
20
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
19
21
|
const styleValue = createMemo(() => mergeDialogStyles({
|
|
20
22
|
"user-select": "none",
|
|
@@ -27,10 +29,7 @@ function DialogBackdrop(props) {
|
|
|
27
29
|
onCleanup(() => {
|
|
28
30
|
if (context.backdropElement() === backdropElement) context.setBackdropElement(null);
|
|
29
31
|
});
|
|
30
|
-
return
|
|
31
|
-
get component() {
|
|
32
|
-
return props.as ?? "div";
|
|
33
|
-
},
|
|
32
|
+
return Render(mergeProps({
|
|
34
33
|
ref: [((element) => {
|
|
35
34
|
backdropElement = element;
|
|
36
35
|
context.setBackdropElement(element);
|
|
@@ -71,13 +70,14 @@ function DialogPopup(props) {
|
|
|
71
70
|
useDialogPortalContext();
|
|
72
71
|
const context = useDialogRootContext();
|
|
73
72
|
const internalProps = props;
|
|
74
|
-
const others = omit(props, "
|
|
73
|
+
const others = omit(props, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style");
|
|
75
74
|
const state = createMemo(() => ({
|
|
76
75
|
open: context.store.open(),
|
|
77
76
|
transitionStatus: context.store.track().transitionStatus,
|
|
78
77
|
nested: context.nested,
|
|
79
78
|
nestedDialogOpen: context.nestedOpenDialogCount() > 0
|
|
80
79
|
}));
|
|
80
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
81
81
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
82
82
|
const styleValue = createMemo(() => mergeDialogStyles({ "--nested-dialogs": context.nestedOpenDialogCount() }, resolveStyle(props.style, state())));
|
|
83
83
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), dialogStateAttributesMapping));
|
|
@@ -93,10 +93,7 @@ function DialogPopup(props) {
|
|
|
93
93
|
onCleanup(() => {
|
|
94
94
|
if (context.store.state.popupElement === popupElement) context.store.setPopupElement(null);
|
|
95
95
|
});
|
|
96
|
-
const popup =
|
|
97
|
-
get component() {
|
|
98
|
-
return props.as ?? "div";
|
|
99
|
-
},
|
|
96
|
+
const popup = Render(mergeProps({
|
|
100
97
|
ref: [((element) => {
|
|
101
98
|
popupElement = element;
|
|
102
99
|
context.store.setPopupElement(element);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { w as none } from "./internals/reasons.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
@@ -5,9 +6,10 @@ import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.j
|
|
|
5
6
|
import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
6
7
|
import { fieldStateAttributesMapping } from "./internals/field-constants.js";
|
|
7
8
|
import { n as useFieldRootContext } from "./FieldRootContext-IC-LWzVp.js";
|
|
8
|
-
import { n as useFormContext } from "./FormContext-
|
|
9
|
-
import { r as useLabelableContext } from "./LabelableContext-
|
|
10
|
-
import {
|
|
9
|
+
import { n as useFormContext } from "./FormContext-CYwo_ZnB.js";
|
|
10
|
+
import { r as useLabelableContext } from "./LabelableContext-BTeF0IWb.js";
|
|
11
|
+
import { t as createLabelableId } from "./createLabelableId-WMUKtY6s.js";
|
|
12
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
11
13
|
import { createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
12
14
|
//#region src/field/control/FieldControl.tsx
|
|
13
15
|
/** The native field control. Renders an `<input>` by default. */
|
|
@@ -19,11 +21,16 @@ function FieldControl(props) {
|
|
|
19
21
|
const allProps = props;
|
|
20
22
|
const source = Symbol("FieldControl");
|
|
21
23
|
let initialized = false;
|
|
22
|
-
const
|
|
24
|
+
const controlled = untrack(() => internalProps.value !== void 0);
|
|
25
|
+
const serializedValue = () => internalProps.value == null ? void 0 : String(internalProps.value);
|
|
26
|
+
let previousValue = untrack(serializedValue);
|
|
27
|
+
let enterTimeout;
|
|
28
|
+
let disposed = false;
|
|
29
|
+
const controlId = labelable.defaultControlId;
|
|
23
30
|
const fallbackId = typeof controlId === "string" ? controlId : `base-ui-${createUniqueId()}`;
|
|
24
31
|
const [element, setElement] = createSignal();
|
|
25
|
-
const others = omit(allProps, "aria-describedby", "aria-labelledby", "
|
|
26
|
-
const id =
|
|
32
|
+
const others = omit(allProps, "aria-describedby", "aria-labelledby", "render", "autofocus", "class", "defaultValue", "disabled", "id", "name", "onBlur", "onFocus", "onInput", "onKeyDown", "onValueChange", "ref", "style", "value");
|
|
33
|
+
const id = createLabelableId(() => internalProps.id, fallbackId);
|
|
27
34
|
const disabled = createMemo(() => field.disabled() || (internalProps.disabled ?? false));
|
|
28
35
|
const name = createMemo(() => field.name() ?? internalProps.name);
|
|
29
36
|
const state = createMemo(() => ({
|
|
@@ -31,10 +38,11 @@ function FieldControl(props) {
|
|
|
31
38
|
disabled: disabled()
|
|
32
39
|
}));
|
|
33
40
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
41
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("input", props, void 0, true));
|
|
34
42
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
35
43
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), fieldStateAttributesMapping));
|
|
36
44
|
const currentValue = () => {
|
|
37
|
-
if (internalProps.value !== void 0) return
|
|
45
|
+
if (internalProps.value !== void 0) return serializedValue();
|
|
38
46
|
const currentElement = element();
|
|
39
47
|
return isNativeFieldControl(currentElement) ? currentElement.value : internalProps.defaultValue;
|
|
40
48
|
};
|
|
@@ -68,10 +76,18 @@ function FieldControl(props) {
|
|
|
68
76
|
callExternalInput.call(event.currentTarget, event);
|
|
69
77
|
if (event.baseUIHandlerPrevented) return;
|
|
70
78
|
const value = readElementValue(event.currentTarget);
|
|
71
|
-
|
|
79
|
+
const details = createChangeEventDetails(none, event);
|
|
80
|
+
internalProps.onValueChange?.(value, details);
|
|
81
|
+
if (controlled) {
|
|
82
|
+
const input = event.currentTarget;
|
|
83
|
+
queueMicrotask(() => {
|
|
84
|
+
if (!disposed && isNativeFieldControl(input)) input.value = serializedValue() ?? "";
|
|
85
|
+
});
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
72
88
|
field.setDirty(value !== (field.validityData().initialValue ?? ""));
|
|
73
89
|
field.setFilled(value !== "");
|
|
74
|
-
if (!event.defaultPrevented) {
|
|
90
|
+
if (!event.defaultPrevented && !details.isCanceled) {
|
|
75
91
|
form.clearError(name());
|
|
76
92
|
field.validation.change(value);
|
|
77
93
|
}
|
|
@@ -86,14 +102,29 @@ function FieldControl(props) {
|
|
|
86
102
|
if (event.baseUIHandlerPrevented) return;
|
|
87
103
|
field.setTouched(true);
|
|
88
104
|
field.setFocused(false);
|
|
89
|
-
if (field.validationMode() === "onBlur")
|
|
105
|
+
if (field.validationMode() === "onBlur") {
|
|
106
|
+
const value = readElementValue(event.currentTarget);
|
|
107
|
+
field.validation.commit(value);
|
|
108
|
+
if (controlled) queueMicrotask(() => {
|
|
109
|
+
if (disposed) return;
|
|
110
|
+
const next = serializedValue();
|
|
111
|
+
if (next !== void 0 && next !== value && next !== (field.validityData().initialValue ?? "")) field.validation.commit(next);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
90
114
|
}
|
|
91
115
|
function handleKeyDown(event) {
|
|
92
116
|
callExternalKeyDown.call(event.currentTarget, event);
|
|
93
117
|
if (event.baseUIHandlerPrevented) return;
|
|
94
118
|
if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
|
|
95
119
|
field.setTouched(true);
|
|
96
|
-
|
|
120
|
+
const input = event.currentTarget;
|
|
121
|
+
if (input.form && input.form === form.formElement() && !event.defaultPrevented) {
|
|
122
|
+
const count = form.submitCount();
|
|
123
|
+
clearTimeout(enterTimeout);
|
|
124
|
+
enterTimeout = setTimeout(() => {
|
|
125
|
+
if (form.submitCount() === count) field.validation.commit(input.value);
|
|
126
|
+
}, 0);
|
|
127
|
+
} else field.validation.commit(input.value);
|
|
97
128
|
}
|
|
98
129
|
}
|
|
99
130
|
createEffect(() => ({
|
|
@@ -105,28 +136,33 @@ function FieldControl(props) {
|
|
|
105
136
|
registration.id = current.id;
|
|
106
137
|
registration.name = current.name;
|
|
107
138
|
field.registerFieldControl(source, current.disabled || !current.element ? void 0 : registration);
|
|
108
|
-
labelable.registerControlId(source, current.element ? current.id : void 0);
|
|
109
139
|
});
|
|
110
140
|
createEffect(() => element(), (currentElement) => {
|
|
111
141
|
if (!isNativeFieldControl(currentElement)) return;
|
|
112
142
|
return field.validation.registerInput(source, currentElement, () => untrack(() => element() ?? null));
|
|
113
143
|
});
|
|
114
|
-
createEffect(() =>
|
|
115
|
-
if (value !== void 0)
|
|
116
|
-
|
|
144
|
+
createEffect(serializedValue, (value) => untrack(() => {
|
|
145
|
+
if (value !== void 0) {
|
|
146
|
+
field.setFilled(value !== "");
|
|
147
|
+
if (value !== previousValue) {
|
|
148
|
+
previousValue = value;
|
|
149
|
+
form.clearError(name());
|
|
150
|
+
field.setDirty(value !== (field.validityData().initialValue ?? ""));
|
|
151
|
+
field.validation.change(value);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
117
155
|
onSettled(() => {
|
|
118
156
|
const currentElement = element();
|
|
119
157
|
if (isNativeFieldControl(currentElement)) field.setFilled(currentElement.value !== "");
|
|
120
158
|
if (internalProps.autofocus && currentElement?.ownerDocument.activeElement === currentElement) field.setFocused(true);
|
|
121
159
|
});
|
|
122
160
|
onCleanup(() => {
|
|
161
|
+
disposed = true;
|
|
162
|
+
clearTimeout(enterTimeout);
|
|
123
163
|
field.registerFieldControl(source, void 0);
|
|
124
|
-
labelable.registerControlId(source, void 0);
|
|
125
164
|
});
|
|
126
|
-
return
|
|
127
|
-
get component() {
|
|
128
|
-
return props.as ?? "input";
|
|
129
|
-
},
|
|
165
|
+
return Render(mergeProps({
|
|
130
166
|
ref: [setControlElement, internalProps.ref],
|
|
131
167
|
get id() {
|
|
132
168
|
return id();
|
|
@@ -2,7 +2,7 @@ import { u as focusOut } from "./internals/reasons.js";
|
|
|
2
2
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
3
3
|
import { c as isHTMLElement, d as isTypeableCombobox, f as isTypeableElement, i as getFloatingFocusElement, n as contains, o as isElementVisible, p as ownerDocument, r as getEventTarget, t as activeElement, u as isShadowRoot } from "./dom-Crg_2R-j.js";
|
|
4
4
|
import { a as getNodeAncestors, o as getNodeChildren } from "./FloatingTree-z1JPD1dR.js";
|
|
5
|
-
import { c as focusable, g as FocusGuard, h as tabbable, l as getNextTabbable, m as isTabbable, p as isOutsideFocusEvent, s as usePopupPortalContext, u as getPreviousTabbable } from "./popupStateMapping-
|
|
5
|
+
import { c as focusable, g as FocusGuard, h as tabbable, l as getNextTabbable, m as isTabbable, p as isOutsideFocusEvent, s as usePopupPortalContext, u as getPreviousTabbable } from "./popupStateMapping-B2KsiiLb.js";
|
|
6
6
|
import { applyRef, escape, memo } from "@solidjs/web";
|
|
7
7
|
import { Show, createEffect, createMemo, untrack } from "solid-js";
|
|
8
8
|
//#region src/internals/overlay/markOthers.ts
|
|
@@ -497,7 +497,6 @@ function FocusManager(props) {
|
|
|
497
497
|
preventReturnFocus = false;
|
|
498
498
|
if (isOutsideFocusEvent(event, portal.portalNode())) getNextTabbable(domReference())?.focus();
|
|
499
499
|
else (resolveElement(props.previousFocusableElement) ?? portal.beforeOutside())?.focus();
|
|
500
|
-
if (closeOnFocusOut()) props.context.setOpen(false, createChangeEventDetails(focusOut, event));
|
|
501
500
|
}
|
|
502
501
|
}
|
|
503
502
|
});
|
|
@@ -523,7 +522,6 @@ function FocusManager(props) {
|
|
|
523
522
|
if (closeOnFocusOut()) preventReturnFocus = true;
|
|
524
523
|
if (isOutsideFocusEvent(event, portal.portalNode())) getPreviousTabbable(domReference())?.focus();
|
|
525
524
|
else (resolveElement(props.nextFocusableElement) ?? portal.afterOutside())?.focus();
|
|
526
|
-
if (closeOnFocusOut()) props.context.setOpen(false, createChangeEventDetails(focusOut, event));
|
|
527
525
|
}
|
|
528
526
|
}
|
|
529
527
|
});
|
|
@@ -21,14 +21,11 @@ function createLabelableContext(options = {}) {
|
|
|
21
21
|
const controlRegistrations = /* @__PURE__ */ new Map();
|
|
22
22
|
const messageRegistrations = /* @__PURE__ */ new Map();
|
|
23
23
|
function registerControlId(source, id) {
|
|
24
|
-
if (id === void 0)
|
|
25
|
-
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
controlRegistrations.set(source, id);
|
|
24
|
+
if (id === void 0) controlRegistrations.delete(source);
|
|
25
|
+
else controlRegistrations.set(source, id);
|
|
29
26
|
setControlId((current) => {
|
|
30
27
|
for (const registeredId of controlRegistrations.values()) if (registeredId === current) return current;
|
|
31
|
-
return controlRegistrations.values().next().value
|
|
28
|
+
return controlRegistrations.size ? controlRegistrations.values().next().value : generatedControlId;
|
|
32
29
|
});
|
|
33
30
|
}
|
|
34
31
|
function registerLabelId(id) {
|
|
@@ -46,6 +43,7 @@ function createLabelableContext(options = {}) {
|
|
|
46
43
|
return Array.from(new Set(ids)).join(" ") || void 0;
|
|
47
44
|
}
|
|
48
45
|
return {
|
|
46
|
+
defaultControlId: generatedControlId,
|
|
49
47
|
controlId,
|
|
50
48
|
labelId,
|
|
51
49
|
messageIds,
|