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
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
3
|
import { getStateAttributesProps } from "../internals/getStateAttributesProps.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
4
5
|
import { transitionStatusMapping } from "../internals/stateAttributesMapping.js";
|
|
5
6
|
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
6
|
-
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-
|
|
7
|
+
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
7
8
|
import { a as isElement, m as ownerWindow, n as contains, p as ownerDocument, r as getEventTarget, t as activeElement } from "../dom-Crg_2R-j.js";
|
|
8
|
-
import { t as createAnchorPositioning } from "../createAnchorPositioning-
|
|
9
|
-
import { _ as ReactiveStore, g as FocusGuard, n as popupStateMapping, o as PopupPortal } from "../popupStateMapping-
|
|
10
|
-
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
9
|
+
import { t as createAnchorPositioning } from "../createAnchorPositioning-B5Y0WEev.js";
|
|
10
|
+
import { _ as ReactiveStore, g as FocusGuard, n as popupStateMapping, o as PopupPortal } from "../popupStateMapping-B2KsiiLb.js";
|
|
11
11
|
import { t as setRef } from "../setRef-Bt70sW7c.js";
|
|
12
|
+
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
12
13
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
13
|
-
import { a as getElementTransform, i as getDisplacement, n as LEGACY_SWIPE_IGNORE_SELECTOR, t as BASE_UI_SWIPE_IGNORE_SELECTOR } from "../constants-
|
|
14
|
-
import {
|
|
14
|
+
import { a as getElementTransform, i as getDisplacement, n as LEGACY_SWIPE_IGNORE_SELECTOR, t as BASE_UI_SWIPE_IGNORE_SELECTOR } from "../constants-D7ciIzsV.js";
|
|
15
|
+
import { escape, memo, mergeProps, ssr, ssrElement, ssrHydrationKey, ssrStyle } from "@solidjs/web";
|
|
15
16
|
import { For, Show, children, createContext, createEffect, createMemo, createSignal, createUniqueId, flush, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
16
17
|
//#region src/toast/utils/focusVisible.ts
|
|
17
18
|
/**
|
|
@@ -165,7 +166,9 @@ var ToastStore = class extends ReactiveStore {
|
|
|
165
166
|
return id;
|
|
166
167
|
};
|
|
167
168
|
updateToast = (id, updates) => {
|
|
168
|
-
this.
|
|
169
|
+
const prevToast = selectors.toast(this.state, id);
|
|
170
|
+
if (!prevToast || prevToast.transitionStatus === "ending") return;
|
|
171
|
+
this.updateToastInternal(id, typeof updates === "function" ? updates(prevToast) : updates, false, true);
|
|
169
172
|
};
|
|
170
173
|
updateToastInternal = (id, updates, resetTimer = false, markUpdated = false) => {
|
|
171
174
|
const { timeout, toasts } = this.state;
|
|
@@ -389,7 +392,7 @@ function ToastProvider(props) {
|
|
|
389
392
|
return toastManager[" subscribe"](({ action, options }) => {
|
|
390
393
|
const id = options.id;
|
|
391
394
|
if (action === "promise" && options.promise) store.promiseToast(options.promise, options);
|
|
392
|
-
else if (action === "update" && id) store.updateToast(id, options);
|
|
395
|
+
else if (action === "update" && id) store.updateToast(id, options.updates);
|
|
393
396
|
else if (action === "close") store.closeToast(id);
|
|
394
397
|
else store.addToast(options);
|
|
395
398
|
});
|
|
@@ -563,7 +566,7 @@ function ToastViewport(props) {
|
|
|
563
566
|
const styleValue = createMemo(() => mergeToastStyles({ "--toast-frontmost-height": frontmostHeight() ? `${frontmostHeight()}px` : void 0 }, resolveStyle(props.style, state())));
|
|
564
567
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
565
568
|
const showFocusGuard = createMemo(() => !isEmpty() && Boolean(prevFocusElement()));
|
|
566
|
-
const others = omit(allProps, "
|
|
569
|
+
const others = omit(allProps, "render", "children", "class", "onBlur", "onClick", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onPointerCancel", "onPointerDown", "onPointerUp", "ref", "style");
|
|
567
570
|
const onBlur = composeEventHandlers(() => internalProps.onBlur, () => handleBlur);
|
|
568
571
|
const onClick = composeEventHandlers(() => internalProps.onClick, () => handleFocus);
|
|
569
572
|
const onFocus = composeEventHandlers(() => internalProps.onFocus, () => handleFocus);
|
|
@@ -574,6 +577,7 @@ function ToastViewport(props) {
|
|
|
574
577
|
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, () => handlePointerDown);
|
|
575
578
|
const onPointerUp = composeEventHandlers(() => internalProps.onPointerUp, () => handlePointerEnd);
|
|
576
579
|
const onPointerCancel = composeEventHandlers(() => internalProps.onPointerCancel, () => handlePointerEnd);
|
|
580
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
577
581
|
return [
|
|
578
582
|
Show({
|
|
579
583
|
get when() {
|
|
@@ -583,10 +587,7 @@ function ToastViewport(props) {
|
|
|
583
587
|
return FocusGuard({ onFocus: handleFocusGuard });
|
|
584
588
|
}
|
|
585
589
|
}),
|
|
586
|
-
|
|
587
|
-
get component() {
|
|
588
|
-
return props.as ?? "div";
|
|
589
|
-
},
|
|
590
|
+
Render(mergeProps({
|
|
590
591
|
ref: [store.setViewport, internalProps.ref],
|
|
591
592
|
tabIndex: -1,
|
|
592
593
|
role: "region",
|
|
@@ -998,26 +999,25 @@ function ToastRoot(props) {
|
|
|
998
999
|
"--toast-height": toast().height ? `${toast().height}px` : void 0
|
|
999
1000
|
}, resolveStyle(props.style, state())));
|
|
1000
1001
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), toastRootStateAttributesMapping));
|
|
1001
|
-
const others = omit(allProps, "
|
|
1002
|
+
const others = omit(allProps, "render", "class", "onKeyDown", "onPointerCancel", "onPointerDown", "onPointerMove", "onPointerUp", "ref", "style", "swipeDirection", "toast");
|
|
1002
1003
|
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => handleKeyDown);
|
|
1003
1004
|
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, () => untrack(() => swipeEnabled() ? handlePointerDown : void 0));
|
|
1004
1005
|
const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, () => untrack(() => swipeEnabled() ? handlePointerMove : void 0));
|
|
1005
1006
|
const onPointerUp = composeEventHandlers(() => internalProps.onPointerUp, () => untrack(() => swipeEnabled() ? handleSwipeEnd : void 0));
|
|
1006
1007
|
const onPointerCancel = composeEventHandlers(() => internalProps.onPointerCancel, () => untrack(() => swipeEnabled() ? handleSwipeEnd : void 0));
|
|
1008
|
+
const context = {
|
|
1009
|
+
toast,
|
|
1010
|
+
setTitleId,
|
|
1011
|
+
setDescriptionId,
|
|
1012
|
+
visibleIndex,
|
|
1013
|
+
expanded,
|
|
1014
|
+
recalculateHeight
|
|
1015
|
+
};
|
|
1016
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
1007
1017
|
return ToastRootContext({
|
|
1008
|
-
value:
|
|
1009
|
-
toast,
|
|
1010
|
-
setTitleId,
|
|
1011
|
-
setDescriptionId,
|
|
1012
|
-
visibleIndex,
|
|
1013
|
-
expanded,
|
|
1014
|
-
recalculateHeight
|
|
1015
|
-
},
|
|
1018
|
+
value: context,
|
|
1016
1019
|
get children() {
|
|
1017
|
-
return
|
|
1018
|
-
get component() {
|
|
1019
|
-
return props.as ?? "div";
|
|
1020
|
-
},
|
|
1020
|
+
return Render(mergeProps({
|
|
1021
1021
|
ref: [((element) => setRootElement(element)), internalProps.ref],
|
|
1022
1022
|
get role() {
|
|
1023
1023
|
return isHighPriority() ? "alertdialog" : "dialog";
|
|
@@ -1082,11 +1082,8 @@ function ToastContent(props) {
|
|
|
1082
1082
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1083
1083
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
1084
1084
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1085
|
-
const others = omit(allProps, "
|
|
1086
|
-
return
|
|
1087
|
-
get component() {
|
|
1088
|
-
return props.as ?? "div";
|
|
1089
|
-
},
|
|
1085
|
+
const others = omit(allProps, "render", "class", "ref", "style");
|
|
1086
|
+
return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
|
|
1090
1087
|
ref: [((element) => setContentElement(element)), internalProps.ref],
|
|
1091
1088
|
get ["class"]() {
|
|
1092
1089
|
return classValue();
|
|
@@ -1148,16 +1145,14 @@ function ToastDescription(props) {
|
|
|
1148
1145
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1149
1146
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
1150
1147
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1151
|
-
const others = omit(allProps, "
|
|
1148
|
+
const others = omit(allProps, "render", "children", "class", "id", "ref", "style");
|
|
1149
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("p", props, void 0, true));
|
|
1152
1150
|
return Show({
|
|
1153
1151
|
get when() {
|
|
1154
1152
|
return part.shouldRender();
|
|
1155
1153
|
},
|
|
1156
1154
|
get children() {
|
|
1157
|
-
return
|
|
1158
|
-
get component() {
|
|
1159
|
-
return props.as ?? "p";
|
|
1160
|
-
},
|
|
1155
|
+
return Render(mergeProps({
|
|
1161
1156
|
ref: [internalProps.ref],
|
|
1162
1157
|
get id() {
|
|
1163
1158
|
return part.id();
|
|
@@ -1185,16 +1180,14 @@ function ToastTitle(props) {
|
|
|
1185
1180
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1186
1181
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
1187
1182
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1188
|
-
const others = omit(allProps, "
|
|
1183
|
+
const others = omit(allProps, "render", "children", "class", "id", "ref", "style");
|
|
1184
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("h2", props, void 0, true));
|
|
1189
1185
|
return Show({
|
|
1190
1186
|
get when() {
|
|
1191
1187
|
return part.shouldRender();
|
|
1192
1188
|
},
|
|
1193
1189
|
get children() {
|
|
1194
|
-
return
|
|
1195
|
-
get component() {
|
|
1196
|
-
return props.as ?? "h2";
|
|
1197
|
-
},
|
|
1190
|
+
return Render(mergeProps({
|
|
1198
1191
|
ref: [internalProps.ref],
|
|
1199
1192
|
get id() {
|
|
1200
1193
|
return part.id();
|
|
@@ -1226,7 +1219,7 @@ function ToastClose(props) {
|
|
|
1226
1219
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1227
1220
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
1228
1221
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1229
|
-
const others = omit(allProps, "
|
|
1222
|
+
const others = omit(allProps, "render", "class", "disabled", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
1230
1223
|
function handleClick() {
|
|
1231
1224
|
store.closeToast(context.toast().id);
|
|
1232
1225
|
}
|
|
@@ -1237,10 +1230,7 @@ function ToastClose(props) {
|
|
|
1237
1230
|
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
1238
1231
|
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
1239
1232
|
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
1240
|
-
return
|
|
1241
|
-
get component() {
|
|
1242
|
-
return props.as ?? "button";
|
|
1243
|
-
},
|
|
1233
|
+
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
1244
1234
|
ref: [internalProps.ref],
|
|
1245
1235
|
get type() {
|
|
1246
1236
|
return nativeButton() ? "button" : void 0;
|
|
@@ -1296,7 +1286,7 @@ function ToastAction(props) {
|
|
|
1296
1286
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1297
1287
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
1298
1288
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1299
|
-
const others = omit(allProps, "
|
|
1289
|
+
const others = omit(allProps, "render", "children", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
1300
1290
|
const managerProps = createMemo(() => {
|
|
1301
1291
|
const value = actionProps();
|
|
1302
1292
|
if (!value) return;
|
|
@@ -1307,15 +1297,13 @@ function ToastAction(props) {
|
|
|
1307
1297
|
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown, () => actionProps()?.onMouseDown);
|
|
1308
1298
|
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => actionProps()?.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
1309
1299
|
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => actionProps()?.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
1300
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
1310
1301
|
return Show({
|
|
1311
1302
|
get when() {
|
|
1312
1303
|
return shouldRender();
|
|
1313
1304
|
},
|
|
1314
1305
|
get children() {
|
|
1315
|
-
return
|
|
1316
|
-
get component() {
|
|
1317
|
-
return props.as ?? "button";
|
|
1318
|
-
},
|
|
1306
|
+
return Render(mergeProps({
|
|
1319
1307
|
ref: [internalProps.ref],
|
|
1320
1308
|
get type() {
|
|
1321
1309
|
return nativeButton() ? "button" : void 0;
|
|
@@ -1363,10 +1351,10 @@ function ToastPortal(props) {
|
|
|
1363
1351
|
const state = {};
|
|
1364
1352
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
1365
1353
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
1366
|
-
const others = omit(allProps, "
|
|
1354
|
+
const others = omit(allProps, "render", "class", "container", "ref", "style");
|
|
1367
1355
|
return PopupPortal(mergeProps({
|
|
1368
|
-
get
|
|
1369
|
-
return props.
|
|
1356
|
+
get render() {
|
|
1357
|
+
return props.render;
|
|
1370
1358
|
},
|
|
1371
1359
|
lite: true,
|
|
1372
1360
|
get container() {
|
|
@@ -1441,14 +1429,12 @@ function ToastPositioner(props) {
|
|
|
1441
1429
|
...toast().transitionStatus === "starting" ? { transition: "none" } : void 0
|
|
1442
1430
|
}, resolveStyle(props.style, state())));
|
|
1443
1431
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), popupStateMapping));
|
|
1444
|
-
const others = omit(allProps, "align", "alignOffset", "anchor", "arrowPadding", "
|
|
1432
|
+
const others = omit(allProps, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style", "toast");
|
|
1433
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
1445
1434
|
return ToastPositionerContext({
|
|
1446
1435
|
value: positioning,
|
|
1447
1436
|
get children() {
|
|
1448
|
-
return
|
|
1449
|
-
get component() {
|
|
1450
|
-
return props.as ?? "div";
|
|
1451
|
-
},
|
|
1437
|
+
return Render(mergeProps({
|
|
1452
1438
|
ref: [((value) => setElement(value)), internalProps.ref],
|
|
1453
1439
|
role: "presentation",
|
|
1454
1440
|
get ["class"]() {
|
|
@@ -1476,15 +1462,12 @@ function ToastArrow(props) {
|
|
|
1476
1462
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
1477
1463
|
const styleValue = createMemo(() => mergeToastStyles(positioner.arrowStyles(), resolveStyle(props.style, state())));
|
|
1478
1464
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
1479
|
-
const others = omit(allProps, "
|
|
1465
|
+
const others = omit(allProps, "render", "class", "ref", "style");
|
|
1480
1466
|
let arrowElement = null;
|
|
1481
1467
|
onCleanup(() => {
|
|
1482
1468
|
if (arrowElement) positioner.setArrowElement(null);
|
|
1483
1469
|
});
|
|
1484
|
-
return
|
|
1485
|
-
get component() {
|
|
1486
|
-
return props.as ?? "div";
|
|
1487
|
-
},
|
|
1470
|
+
return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
|
|
1488
1471
|
ref: [((element) => {
|
|
1489
1472
|
arrowElement = element;
|
|
1490
1473
|
positioner.setArrowElement(element);
|
|
@@ -1563,8 +1546,8 @@ function createToastManager() {
|
|
|
1563
1546
|
emit({
|
|
1564
1547
|
action: "update",
|
|
1565
1548
|
options: {
|
|
1566
|
-
|
|
1567
|
-
|
|
1549
|
+
id,
|
|
1550
|
+
updates
|
|
1568
1551
|
}
|
|
1569
1552
|
});
|
|
1570
1553
|
},
|
|
@@ -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,7 +6,7 @@ import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.
|
|
|
5
6
|
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
6
7
|
import { n as useToolbarItemOwnerContext } from "../ToolbarItemOwnerContext-L5dsZ_vS.js";
|
|
7
8
|
import { n as useToggleGroupContext } from "../ToggleGroupContext-COor8gYc.js";
|
|
8
|
-
import {
|
|
9
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
9
10
|
import { createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
10
11
|
//#region src/toggle/Toggle.tsx
|
|
11
12
|
/** A two-state button that can be on or off. */
|
|
@@ -20,7 +21,7 @@ function Toggle(props) {
|
|
|
20
21
|
const [uncontrolledPressed, setUncontrolledPressed] = createSignal(() => Boolean(untrack(() => internalProps.defaultPressed)));
|
|
21
22
|
let uncontrolledPressedSnapshot = untrack(uncontrolledPressed);
|
|
22
23
|
const [element, setElement] = createSignal();
|
|
23
|
-
const others = omit(allProps, "
|
|
24
|
+
const others = omit(allProps, "render", "class", "defaultPressed", "disabled", "form", "nativeButton", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "onPressedChange", "pressed", "ref", "style", "type", "value");
|
|
24
25
|
const value = createMemo(() => internalProps.value || generatedValue);
|
|
25
26
|
const disabled = createMemo(() => (group?.disabled() ?? false) || (internalProps.disabled ?? false));
|
|
26
27
|
const pressed = createMemo(() => group ? group.value().indexOf(value()) > -1 : controlled ? Boolean(internalProps.pressed) : uncontrolledPressed());
|
|
@@ -99,10 +100,7 @@ function Toggle(props) {
|
|
|
99
100
|
toolbarItemOwner?.setChildDisabled(false);
|
|
100
101
|
unregister?.();
|
|
101
102
|
});
|
|
102
|
-
return
|
|
103
|
-
get component() {
|
|
104
|
-
return props.as ?? "button";
|
|
105
|
-
},
|
|
103
|
+
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
106
104
|
ref: [((current) => setElement(current)), internalProps.ref],
|
|
107
105
|
get ["class"]() {
|
|
108
106
|
return classValue();
|
|
@@ -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 resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
3
4
|
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
@@ -5,8 +6,8 @@ import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
|
5
6
|
import { n as useToolbarRootContext } from "../ToolbarRootContext-DD-qe7s8.js";
|
|
6
7
|
import { n as useToolbarGroupContext } from "../ToolbarGroupContext-CzdHxijX.js";
|
|
7
8
|
import { t as ToggleGroupContext } from "../ToggleGroupContext-COor8gYc.js";
|
|
8
|
-
import {
|
|
9
|
-
import { createEffect, createMemo, createSignal, omit, untrack } from "solid-js";
|
|
9
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
10
|
+
import { createEffect, createMemo, createSignal, omit, onSettled, untrack } from "solid-js";
|
|
10
11
|
//#region src/toggle-group/ToggleGroup.tsx
|
|
11
12
|
var EMPTY_VALUE = [];
|
|
12
13
|
/** Provides shared state and roving focus to a series of toggle buttons. */
|
|
@@ -24,7 +25,7 @@ function ToggleGroup(props) {
|
|
|
24
25
|
const [itemVersion, setItemVersion] = createSignal(0);
|
|
25
26
|
const items = /* @__PURE__ */ new Map();
|
|
26
27
|
let activeTokenSnapshot;
|
|
27
|
-
const others = omit(allProps, "
|
|
28
|
+
const others = omit(allProps, "render", "class", "defaultValue", "disabled", "loopFocus", "multiple", "onKeyDown", "onValueChange", "orientation", "ref", "style", "value");
|
|
28
29
|
const value = createMemo(() => controlled ? internalProps.value ?? EMPTY_VALUE : uncontrolledValue());
|
|
29
30
|
const disabled = createMemo(() => (toolbar?.disabled() ?? false) || (toolbarGroup?.disabled() ?? false) || (internalProps.disabled ?? false));
|
|
30
31
|
const multiple = createMemo(() => internalProps.multiple ?? false);
|
|
@@ -168,13 +169,14 @@ function ToggleGroup(props) {
|
|
|
168
169
|
});
|
|
169
170
|
return () => observer.disconnect();
|
|
170
171
|
});
|
|
172
|
+
onSettled(() => {
|
|
173
|
+
setItemVersion((version) => version + 1);
|
|
174
|
+
});
|
|
175
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
171
176
|
return ToggleGroupContext({
|
|
172
177
|
value: context,
|
|
173
178
|
get children() {
|
|
174
|
-
return
|
|
175
|
-
get component() {
|
|
176
|
-
return props.as ?? "div";
|
|
177
|
-
},
|
|
179
|
+
return Render(mergeProps({
|
|
178
180
|
ref: [((element) => setRootElement(element)), internalProps.ref],
|
|
179
181
|
get ["class"]() {
|
|
180
182
|
return classValue();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
3
|
import { getStateAttributesProps } from "../internals/getStateAttributesProps.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
4
5
|
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
5
6
|
import { t as setRef } from "../setRef-Bt70sW7c.js";
|
|
6
7
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
7
8
|
import { n as useToolbarRootContext, t as ToolbarRootContext } from "../ToolbarRootContext-DD-qe7s8.js";
|
|
8
|
-
import { t as withoutComponentBinding } from "../withoutComponentBinding-BHaWr5kU.js";
|
|
9
9
|
import { n as useToolbarGroupContext, t as ToolbarGroupContext } from "../ToolbarGroupContext-CzdHxijX.js";
|
|
10
10
|
import { t as ToolbarItemOwnerContext } from "../ToolbarItemOwnerContext-L5dsZ_vS.js";
|
|
11
|
-
import {
|
|
11
|
+
import { delegateEvents, mergeProps, ssrElement } from "@solidjs/web";
|
|
12
12
|
import { createEffect, createMemo, createSignal, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
13
13
|
//#region src/toolbar/root/ToolbarRoot.tsx
|
|
14
14
|
/** A container for grouping a set of controls into one keyboard navigation scope. */
|
|
@@ -22,7 +22,7 @@ function ToolbarRoot(props) {
|
|
|
22
22
|
const items = /* @__PURE__ */ new Map();
|
|
23
23
|
let nextOrder = 0;
|
|
24
24
|
let itemChangeQueued = false;
|
|
25
|
-
const others = omit(allProps, "
|
|
25
|
+
const others = omit(allProps, "render", "class", "disabled", "loopFocus", "onFocus", "onFocusIn", "onKeyDown", "orientation", "ref", "style");
|
|
26
26
|
const disabled = createMemo(() => internalProps.disabled ?? false);
|
|
27
27
|
const orientation = createMemo(() => internalProps.orientation ?? "horizontal");
|
|
28
28
|
const state = createMemo(() => ({
|
|
@@ -149,13 +149,11 @@ function ToolbarRoot(props) {
|
|
|
149
149
|
});
|
|
150
150
|
return () => observer.disconnect();
|
|
151
151
|
});
|
|
152
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
152
153
|
return ToolbarRootContext({
|
|
153
154
|
value: context,
|
|
154
155
|
get children() {
|
|
155
|
-
return
|
|
156
|
-
get component() {
|
|
157
|
-
return withoutComponentBinding(props.as ?? "div");
|
|
158
|
-
},
|
|
156
|
+
return Render(mergeProps({
|
|
159
157
|
ref: [((element) => setRootElement(element)), internalProps.ref],
|
|
160
158
|
get ["class"]() {
|
|
161
159
|
return classValue();
|
|
@@ -256,7 +254,7 @@ function getScrollStyles(element) {
|
|
|
256
254
|
function ToolbarGroup(props) {
|
|
257
255
|
const root = useToolbarRootContext();
|
|
258
256
|
const internalProps = props;
|
|
259
|
-
const others = omit(props, "
|
|
257
|
+
const others = omit(props, "render", "class", "disabled", "ref", "style");
|
|
260
258
|
const disabled = createMemo(() => root.disabled() || (internalProps.disabled ?? false));
|
|
261
259
|
const state = createMemo(() => ({
|
|
262
260
|
disabled: disabled(),
|
|
@@ -265,13 +263,12 @@ function ToolbarGroup(props) {
|
|
|
265
263
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
266
264
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
267
265
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
266
|
+
const context = { disabled };
|
|
267
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
268
268
|
return ToolbarGroupContext({
|
|
269
|
-
value:
|
|
269
|
+
value: context,
|
|
270
270
|
get children() {
|
|
271
|
-
return
|
|
272
|
-
get component() {
|
|
273
|
-
return withoutComponentBinding(props.as ?? "div");
|
|
274
|
-
},
|
|
271
|
+
return Render(mergeProps({
|
|
275
272
|
ref: [internalProps.ref],
|
|
276
273
|
get ["class"]() {
|
|
277
274
|
return classValue();
|
|
@@ -291,7 +288,6 @@ function installOwnedEventHandlers(element, handlers) {
|
|
|
291
288
|
const blockedEvents = /* @__PURE__ */ new WeakSet();
|
|
292
289
|
const nativeHandlers = [];
|
|
293
290
|
const restoreDelegatedHandlers = [];
|
|
294
|
-
let active = true;
|
|
295
291
|
for (const [name, handler] of handlers) {
|
|
296
292
|
const nativeHandler = (event) => {
|
|
297
293
|
handledEvents.add(event);
|
|
@@ -301,51 +297,47 @@ function installOwnedEventHandlers(element, handlers) {
|
|
|
301
297
|
element.addEventListener(name, nativeHandler);
|
|
302
298
|
nativeHandlers.push([name, nativeHandler]);
|
|
303
299
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
delegateEvents(handlers.map(([name]) => name));
|
|
346
|
-
});
|
|
300
|
+
for (const [name, handler] of handlers) {
|
|
301
|
+
const handlerKey = `$$${name}`;
|
|
302
|
+
const dataKey = `${handlerKey}Data`;
|
|
303
|
+
const delegatedElement = element;
|
|
304
|
+
let childHandler = delegatedElement[handlerKey];
|
|
305
|
+
let childData = delegatedElement[dataKey];
|
|
306
|
+
const bridgedHandler = (event) => {
|
|
307
|
+
if (!handledEvents.has(event)) {
|
|
308
|
+
handledEvents.add(event);
|
|
309
|
+
Reflect.apply(handler, element, [event]);
|
|
310
|
+
if (event.baseUIHandlerPrevented) blockedEvents.add(event);
|
|
311
|
+
}
|
|
312
|
+
if (blockedEvents.has(event) || typeof childHandler !== "function") return;
|
|
313
|
+
if (childData === void 0) Reflect.apply(childHandler, element, [event]);
|
|
314
|
+
else Reflect.apply(childHandler, element, [childData, event]);
|
|
315
|
+
};
|
|
316
|
+
Object.defineProperty(delegatedElement, handlerKey, {
|
|
317
|
+
configurable: true,
|
|
318
|
+
enumerable: true,
|
|
319
|
+
get: () => bridgedHandler,
|
|
320
|
+
set: (value) => {
|
|
321
|
+
childHandler = value;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
Object.defineProperty(delegatedElement, dataKey, {
|
|
325
|
+
configurable: true,
|
|
326
|
+
enumerable: true,
|
|
327
|
+
get: () => void 0,
|
|
328
|
+
set: (value) => {
|
|
329
|
+
childData = value;
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
restoreDelegatedHandlers.push(() => {
|
|
333
|
+
Reflect.deleteProperty(delegatedElement, handlerKey);
|
|
334
|
+
Reflect.deleteProperty(delegatedElement, dataKey);
|
|
335
|
+
delegatedElement[handlerKey] = childHandler;
|
|
336
|
+
delegatedElement[dataKey] = childData;
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
delegateEvents(handlers.map(([name]) => name));
|
|
347
340
|
return () => {
|
|
348
|
-
active = false;
|
|
349
341
|
for (const [name, handler] of nativeHandlers) element.removeEventListener(name, handler);
|
|
350
342
|
for (const restore of restoreDelegatedHandlers) restore();
|
|
351
343
|
};
|
|
@@ -383,7 +375,6 @@ function createToolbarItem(metadata) {
|
|
|
383
375
|
function ToolbarButton(props) {
|
|
384
376
|
const root = useToolbarRootContext();
|
|
385
377
|
const group = useToolbarGroupContext();
|
|
386
|
-
const Component = dynamic(() => withoutComponentBinding(props.as ?? "button"));
|
|
387
378
|
const internalProps = props;
|
|
388
379
|
const allProps = props;
|
|
389
380
|
const [childDisabled, setChildDisabled] = createSignal(false);
|
|
@@ -395,7 +386,7 @@ function ToolbarButton(props) {
|
|
|
395
386
|
disabled,
|
|
396
387
|
focusableWhenDisabled
|
|
397
388
|
});
|
|
398
|
-
const others = omit(allProps, "
|
|
389
|
+
const others = omit(allProps, "render", "class", "disabled", "focusableWhenDisabled", "nativeButton", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
399
390
|
const state = createMemo(() => ({
|
|
400
391
|
disabled: disabled(),
|
|
401
392
|
focusable: focusableWhenDisabled(),
|
|
@@ -424,7 +415,7 @@ function ToolbarButton(props) {
|
|
|
424
415
|
if (isSpace) {
|
|
425
416
|
if (event.defaultPrevented && textNavigationRole) return;
|
|
426
417
|
event.preventDefault();
|
|
427
|
-
if (!nativeButton() || isButton
|
|
418
|
+
if (!nativeButton() || isButton) {
|
|
428
419
|
event.preventBaseUIHandler();
|
|
429
420
|
dispatchClickWithModifiers(event.currentTarget, event);
|
|
430
421
|
}
|
|
@@ -437,7 +428,7 @@ function ToolbarButton(props) {
|
|
|
437
428
|
}
|
|
438
429
|
}
|
|
439
430
|
function handleKeyUp(event) {
|
|
440
|
-
if (event.target === event.currentTarget && event.key === " " && (!nativeButton() || event.currentTarget.tagName === "BUTTON"
|
|
431
|
+
if (event.target === event.currentTarget && event.key === " " && (!nativeButton() || event.currentTarget.tagName === "BUTTON")) {
|
|
441
432
|
event.preventDefault();
|
|
442
433
|
event.preventBaseUIHandler();
|
|
443
434
|
}
|
|
@@ -472,6 +463,7 @@ function ToolbarButton(props) {
|
|
|
472
463
|
if (current.disabled && current.focusableWhenDisabled && current.element) current.element.removeAttribute("disabled");
|
|
473
464
|
});
|
|
474
465
|
onCleanup(() => removeOwnedListeners?.());
|
|
466
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
475
467
|
return ToolbarItemOwnerContext({
|
|
476
468
|
value: {
|
|
477
469
|
disabled,
|
|
@@ -479,7 +471,7 @@ function ToolbarButton(props) {
|
|
|
479
471
|
setChildDisabled
|
|
480
472
|
},
|
|
481
473
|
get children() {
|
|
482
|
-
return
|
|
474
|
+
return Render(mergeProps({
|
|
483
475
|
ref: (element) => {
|
|
484
476
|
setElement(element);
|
|
485
477
|
},
|
|
@@ -499,9 +491,7 @@ function ToolbarButton(props) {
|
|
|
499
491
|
return item.tabIndex();
|
|
500
492
|
},
|
|
501
493
|
get disabled() {
|
|
502
|
-
return
|
|
503
|
-
return typeof props.as === "function";
|
|
504
|
-
})() ? disabled() : disabledAttribute();
|
|
494
|
+
return disabledAttribute();
|
|
505
495
|
},
|
|
506
496
|
get ["aria-disabled"]() {
|
|
507
497
|
return ariaDisabled();
|
|
@@ -550,16 +540,13 @@ function ToolbarLink(props) {
|
|
|
550
540
|
disabled: FALSE,
|
|
551
541
|
focusableWhenDisabled: TRUE
|
|
552
542
|
});
|
|
553
|
-
const others = omit(allProps, "
|
|
543
|
+
const others = omit(allProps, "render", "class", "onFocus", "ref", "style");
|
|
554
544
|
const state = createMemo(() => ({ orientation: root.orientation() }));
|
|
555
545
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
556
546
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
557
547
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
558
548
|
const onFocus = composeEventHandlers(() => internalProps.onFocus, () => () => item.root.setActiveItem(item.registration));
|
|
559
|
-
return
|
|
560
|
-
get component() {
|
|
561
|
-
return withoutComponentBinding(props.as ?? "a");
|
|
562
|
-
},
|
|
549
|
+
return useRender(props, () => state(), (props) => ssrElement("a", props, void 0, true))(mergeProps({
|
|
563
550
|
ref: (element) => {
|
|
564
551
|
item.setElement(element);
|
|
565
552
|
setRef(internalProps.ref, element);
|
|
@@ -582,7 +569,6 @@ function ToolbarLink(props) {
|
|
|
582
569
|
function ToolbarInput(props) {
|
|
583
570
|
const root = useToolbarRootContext();
|
|
584
571
|
const group = useToolbarGroupContext();
|
|
585
|
-
const Component = dynamic(() => withoutComponentBinding(props.as ?? "input"));
|
|
586
572
|
const internalProps = props;
|
|
587
573
|
const allProps = props;
|
|
588
574
|
const disabled = createMemo(() => root.disabled() || (group?.disabled() ?? false) || (internalProps.disabled ?? false));
|
|
@@ -591,7 +577,7 @@ function ToolbarInput(props) {
|
|
|
591
577
|
disabled,
|
|
592
578
|
focusableWhenDisabled
|
|
593
579
|
});
|
|
594
|
-
const others = omit(allProps, "
|
|
580
|
+
const others = omit(allProps, "render", "class", "disabled", "focusableWhenDisabled", "onClick", "onFocus", "onKeyDown", "onPointerDown", "ref", "style");
|
|
595
581
|
const state = createMemo(() => ({
|
|
596
582
|
disabled: disabled(),
|
|
597
583
|
focusable: focusableWhenDisabled(),
|
|
@@ -620,7 +606,7 @@ function ToolbarInput(props) {
|
|
|
620
606
|
setRef(internalProps.ref, element);
|
|
621
607
|
}
|
|
622
608
|
onCleanup(() => removeOwnedListeners?.());
|
|
623
|
-
return
|
|
609
|
+
return useRender(props, () => state(), (props) => ssrElement("input", props, void 0, true))(mergeProps({
|
|
624
610
|
ref: (element) => {
|
|
625
611
|
setElement(element);
|
|
626
612
|
},
|
|
@@ -649,16 +635,13 @@ function preventNonTabDefault(event) {
|
|
|
649
635
|
/** A separator that defaults to the opposite orientation of its toolbar. */
|
|
650
636
|
function ToolbarSeparator(props) {
|
|
651
637
|
const root = useToolbarRootContext();
|
|
652
|
-
const others = omit(props, "
|
|
638
|
+
const others = omit(props, "render", "class", "orientation", "style");
|
|
653
639
|
const orientation = createMemo(() => props.orientation ?? (root.orientation() === "vertical" ? "horizontal" : "vertical"));
|
|
654
640
|
const state = createMemo(() => ({ orientation: orientation() }));
|
|
655
641
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
656
642
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
657
643
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
658
|
-
return
|
|
659
|
-
get component() {
|
|
660
|
-
return withoutComponentBinding(props.as ?? "div");
|
|
661
|
-
},
|
|
644
|
+
return useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true))(mergeProps({
|
|
662
645
|
get ["class"]() {
|
|
663
646
|
return classValue();
|
|
664
647
|
},
|