solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/README.md +133 -15
- package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
- package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
- package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
- package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
- package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-CA2DfX67.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-BJZYmCVv.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-DGyrciZJ.js +135 -0
- package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
- package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
- package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
- package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
- 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-C0EF0a5u.js} +2 -2
- package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-uKoNBwDU.js +1540 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-DIMrgpBW.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-Bqq8wSLY.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-YthuKwIE.js} +1 -1
- package/dist/lib/client/internals/composeEventHandlers.js +14 -8
- package/dist/lib/client/internals/field-root-context/index.js +2 -2
- 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/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-4rNLN6aX.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
- package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
- 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-BbRyun3a.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cmvmuf1L.js +940 -0
- package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-Dtu8AnBN.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-CeCU-Qqi.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -70
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
- package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-Dad51Xbn.js +1934 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CLSKFq_M.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-Bzuu5EIg.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
- package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
- package/dist/lib/server/accordion/index.js +39 -77
- 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 +14 -15
- package/dist/lib/server/checkbox/index.js +37 -64
- package/dist/lib/server/checkbox-group/index.js +21 -11
- package/dist/lib/server/collapsible/index.js +42 -49
- package/dist/lib/server/combobox/index.js +79 -50
- package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
- package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
- package/dist/lib/server/context-menu/index.js +14 -16
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
- package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
- package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
- 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/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
- package/dist/lib/server/drawer/index.js +96 -100
- package/dist/lib/server/field/index.js +110 -98
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +18 -14
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/composeEventHandlers.js +15 -9
- package/dist/lib/server/internals/field-root-context/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/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
- package/dist/lib/server/menu/index.js +30 -29
- package/dist/lib/server/menubar/index.js +10 -35
- package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +67 -138
- package/dist/lib/server/number-field/index.js +64 -62
- package/dist/lib/server/otp-field/index.js +19 -22
- package/dist/lib/server/popover/index.js +61 -77
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
- package/dist/lib/server/preview-card/index.js +39 -50
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +24 -45
- package/dist/lib/server/radio-group/index.js +12 -13
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
- package/dist/lib/server/scroll-area/index.js +40 -49
- package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
- package/dist/lib/server/select/index.js +128 -213
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +39 -52
- package/dist/lib/server/switch/index.js +22 -32
- package/dist/lib/server/tabs/index.js +197 -137
- package/dist/lib/server/toast/index.js +78 -95
- package/dist/lib/server/toggle/index.js +11 -13
- package/dist/lib/server/toggle-group/index.js +11 -9
- package/dist/lib/server/toolbar/index.js +76 -93
- package/dist/lib/server/tooltip/index.js +53 -57
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
- 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 +7 -7
- 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/chip/ComboboxChip.d.ts +2 -0
- 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 +17 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
- 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/control/FieldControl.d.ts +5 -5
- 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/composeEventHandlers.d.ts +9 -2
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
- 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/internals/overlay/dom.d.ts +2 -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/input/NumberFieldInput.d.ts +5 -5
- 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/slider/track/SliderTrack.d.ts +2 -2
- 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 +10 -3
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
- 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/PopupViewport-DgrIqQea.js +0 -152
- 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/compositeNavigation-sxniYTc7.js +0 -58
- 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,195 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./useRender-CxZ8PI-g.js";
|
|
3
|
+
import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
|
|
4
|
+
import { n as r, t as i } from "./resolveStyle-XcgAuaKR.js";
|
|
5
|
+
import { mergeStyles as a } from "./internals/mergeStyles.js";
|
|
6
|
+
import { createComponent as o, effect as s, getNextElement as c, memo as l, mergeProps as u, runHydrationEvents as d, spread as f, style as p, template as m } from "@solidjs/web";
|
|
7
|
+
import { createContext as h, createEffect as g, createMemo as _, createSignal as v, createUniqueId as y, omit as b, useContext as x } from "solid-js";
|
|
8
|
+
//#region src/progress/root/ProgressRootContext.ts
|
|
9
|
+
var S = Symbol("ProgressRootContext"), C = h(S);
|
|
10
|
+
function w() {
|
|
11
|
+
let e = x(C);
|
|
12
|
+
if (e === S) throw Error("Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.");
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/progress/root/stateAttributesMapping.ts
|
|
17
|
+
var T = { status(e) {
|
|
18
|
+
return { [`data-${e}`]: "" };
|
|
19
|
+
} }, E = /* @__PURE__ */ m("<div>"), D = /* @__PURE__ */ m("<span role=presentation>x"), O = {
|
|
20
|
+
"clip-path": "inset(50%)",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
"white-space": "nowrap",
|
|
23
|
+
border: 0,
|
|
24
|
+
padding: 0,
|
|
25
|
+
width: "1px",
|
|
26
|
+
height: "1px",
|
|
27
|
+
margin: "-1px",
|
|
28
|
+
position: "fixed",
|
|
29
|
+
top: 0,
|
|
30
|
+
left: 0
|
|
31
|
+
};
|
|
32
|
+
function k(e) {
|
|
33
|
+
let a = e, m = e, [h, g] = v(), y = b(m, "render", "children", "class", "format", "getAriaValueText", "locale", "max", "min", "style", "value"), x = _(() => a.min ?? 0), S = _(() => a.max ?? 100), w = _(() => {
|
|
34
|
+
if (a.value == null || !Number.isFinite(a.value)) return null;
|
|
35
|
+
let e = (a.value - x()) * 100 / (S() - x());
|
|
36
|
+
return A(Number.isNaN(e) ? 0 : e, 0, 100);
|
|
37
|
+
}), k = _(() => a.value == null || !Number.isFinite(a.value) ? null : A(a.value, x(), S())), j = _(() => {
|
|
38
|
+
let e = k();
|
|
39
|
+
return e == null ? "indeterminate" : e === S() ? "complete" : "progressing";
|
|
40
|
+
}), M = _(() => {
|
|
41
|
+
let e = k();
|
|
42
|
+
return e == null ? "" : a.format ? new Intl.NumberFormat(a.locale, a.format).format(e) : new Intl.NumberFormat(a.locale, { style: "percent" }).format((w() ?? 0) / 100);
|
|
43
|
+
}), N = _(() => a.getAriaValueText ? a.getAriaValueText(M(), a.value) : j() === "indeterminate" ? "indeterminate progress" : M()), P = _(() => ({ status: j() })), F = _(() => r(e.class, P())), I = _(() => i(e.style, P())), L = _(() => n(P(), T)), R = {
|
|
44
|
+
formattedValue: M,
|
|
45
|
+
percentageValue: w,
|
|
46
|
+
setLabelId: g,
|
|
47
|
+
state: P,
|
|
48
|
+
value: () => a.value
|
|
49
|
+
}, z = t(e, () => P(), (e) => (() => {
|
|
50
|
+
var t = c(E);
|
|
51
|
+
return f(t, e, !1), d(), t;
|
|
52
|
+
})());
|
|
53
|
+
return o(C, {
|
|
54
|
+
value: R,
|
|
55
|
+
get children() {
|
|
56
|
+
return o(z, u({
|
|
57
|
+
get class() {
|
|
58
|
+
return F();
|
|
59
|
+
},
|
|
60
|
+
get style() {
|
|
61
|
+
return I();
|
|
62
|
+
},
|
|
63
|
+
get "aria-labelledby"() {
|
|
64
|
+
return h();
|
|
65
|
+
},
|
|
66
|
+
get "aria-valuemax"() {
|
|
67
|
+
return S();
|
|
68
|
+
},
|
|
69
|
+
get "aria-valuemin"() {
|
|
70
|
+
return x();
|
|
71
|
+
},
|
|
72
|
+
get "aria-valuenow"() {
|
|
73
|
+
return k() ?? void 0;
|
|
74
|
+
},
|
|
75
|
+
get "aria-valuetext"() {
|
|
76
|
+
return N();
|
|
77
|
+
},
|
|
78
|
+
role: "progressbar"
|
|
79
|
+
}, L, y, { get children() {
|
|
80
|
+
return [l(() => m.children), (() => {
|
|
81
|
+
var e = c(D);
|
|
82
|
+
return s(() => O, (t, n) => {
|
|
83
|
+
p(e, t, n);
|
|
84
|
+
}), e;
|
|
85
|
+
})()];
|
|
86
|
+
} }));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function A(e, t, n) {
|
|
91
|
+
return Math.max(t, Math.min(e, n));
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/progress/track/ProgressTrack.tsx
|
|
95
|
+
var j = /* @__PURE__ */ m("<div>");
|
|
96
|
+
function M(e) {
|
|
97
|
+
let a = w(), s = b(e, "render", "class", "style"), l = _(() => a.state()), p = _(() => r(e.class, l())), m = _(() => i(e.style, l())), h = _(() => n(l(), T)), g = t(e, () => l(), (e) => (() => {
|
|
98
|
+
var t = c(j);
|
|
99
|
+
return f(t, e, !1), d(), t;
|
|
100
|
+
})());
|
|
101
|
+
return o(g, u({
|
|
102
|
+
get class() {
|
|
103
|
+
return p();
|
|
104
|
+
},
|
|
105
|
+
get style() {
|
|
106
|
+
return m();
|
|
107
|
+
}
|
|
108
|
+
}, h, s));
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/progress/indicator/ProgressIndicator.tsx
|
|
112
|
+
var N = /* @__PURE__ */ m("<div>");
|
|
113
|
+
function P(e) {
|
|
114
|
+
let s = w(), l = b(e, "render", "class", "style"), p = _(() => s.state()), m = _(() => r(e.class, p())), h = _(() => {
|
|
115
|
+
let e = s.percentageValue();
|
|
116
|
+
return e == null ? void 0 : {
|
|
117
|
+
"inset-inline-start": "0",
|
|
118
|
+
height: "inherit",
|
|
119
|
+
width: `${e}%`
|
|
120
|
+
};
|
|
121
|
+
}), g = _(() => {
|
|
122
|
+
let t = h(), n = i(e.style, p());
|
|
123
|
+
return t ? typeof n == "string" ? `inset-inline-start:0;height:inherit;width:${s.percentageValue()}%;${n}` : a(t, n === !1 ? void 0 : n) : n;
|
|
124
|
+
}), v = _(() => n(p(), T)), y = t(e, () => p(), (e) => (() => {
|
|
125
|
+
var t = c(N);
|
|
126
|
+
return f(t, e, !1), d(), t;
|
|
127
|
+
})());
|
|
128
|
+
return o(y, u({
|
|
129
|
+
get class() {
|
|
130
|
+
return m();
|
|
131
|
+
},
|
|
132
|
+
get style() {
|
|
133
|
+
return g();
|
|
134
|
+
}
|
|
135
|
+
}, v, l));
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/progress/value/ProgressValue.tsx
|
|
139
|
+
var F = /* @__PURE__ */ m("<span>");
|
|
140
|
+
function I(e) {
|
|
141
|
+
let a = e, s = w(), l = b(e, "render", "children", "class", "style"), p = _(() => s.state()), m = _(() => r(e.class, p())), h = _(() => i(e.style, p())), g = _(() => n(p(), T)), v = _(() => {
|
|
142
|
+
let e = p().status === "indeterminate";
|
|
143
|
+
return typeof a.children == "function" ? a.children(e ? "indeterminate" : s.formattedValue(), s.value()) : e ? null : s.formattedValue();
|
|
144
|
+
}), y = t(e, () => p(), (e) => (() => {
|
|
145
|
+
var t = c(F);
|
|
146
|
+
return f(t, e, !1), d(), t;
|
|
147
|
+
})());
|
|
148
|
+
return o(y, u({
|
|
149
|
+
get class() {
|
|
150
|
+
return m();
|
|
151
|
+
},
|
|
152
|
+
get style() {
|
|
153
|
+
return h();
|
|
154
|
+
},
|
|
155
|
+
"aria-hidden": "true"
|
|
156
|
+
}, g, l, { get children() {
|
|
157
|
+
return v();
|
|
158
|
+
} }));
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/progress/label/ProgressLabel.tsx
|
|
162
|
+
var L = /* @__PURE__ */ m("<span>");
|
|
163
|
+
function R(e) {
|
|
164
|
+
let a = w(), s = `base-ui-${y()}`, l = b(e, "render", "class", "id", "style"), p = _(() => e.id ?? s), m = _(() => a.state()), h = _(() => r(e.class, m())), v = _(() => i(e.style, m())), x = _(() => n(m(), T));
|
|
165
|
+
g(p, (e) => (a.setLabelId(e), () => {
|
|
166
|
+
a.setLabelId((t) => t === e ? void 0 : t);
|
|
167
|
+
}));
|
|
168
|
+
let S = t(e, () => m(), (e) => (() => {
|
|
169
|
+
var t = c(L);
|
|
170
|
+
return f(t, e, !1), d(), t;
|
|
171
|
+
})());
|
|
172
|
+
return o(S, u({
|
|
173
|
+
get id() {
|
|
174
|
+
return p();
|
|
175
|
+
},
|
|
176
|
+
get class() {
|
|
177
|
+
return h();
|
|
178
|
+
},
|
|
179
|
+
get style() {
|
|
180
|
+
return v();
|
|
181
|
+
},
|
|
182
|
+
role: "presentation"
|
|
183
|
+
}, x, l));
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/progress/index.parts.ts
|
|
187
|
+
var z = /* @__PURE__ */ e({
|
|
188
|
+
Indicator: () => P,
|
|
189
|
+
Label: () => R,
|
|
190
|
+
Root: () => k,
|
|
191
|
+
Track: () => M,
|
|
192
|
+
Value: () => I
|
|
193
|
+
});
|
|
194
|
+
//#endregion
|
|
195
|
+
export { z as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../radio-
|
|
1
|
+
import { t as e } from "../radio-CeCU-Qqi.js";
|
|
2
2
|
export { e as Radio };
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./useRender-CxZ8PI-g.js";
|
|
3
|
+
import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
|
|
4
|
+
import { w as r } from "./reasons-Co5CzjKq.js";
|
|
5
|
+
import { n as i, t as a } from "./resolveStyle-XcgAuaKR.js";
|
|
6
|
+
import { createChangeEventDetails as o } from "./internals/createBaseUIEventDetails.js";
|
|
7
|
+
import { transitionStatusMapping as s } from "./internals/stateAttributesMapping.js";
|
|
8
|
+
import { composeEventHandlers as c, liveEventHandler as l } from "./internals/composeEventHandlers.js";
|
|
9
|
+
import { t as u } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
10
|
+
import { t as d } from "./createTransitionStatus-BL_cPSEA.js";
|
|
11
|
+
import { fieldStateAttributesMapping as f } from "./internals/field-constants.js";
|
|
12
|
+
import { r as p } from "./FieldRootContext-D3fuVjs3.js";
|
|
13
|
+
import { r as m } from "./LabelableContext-CmQF-TX2.js";
|
|
14
|
+
import { n as h } from "./FieldItemContext-Bwzf-4tL.js";
|
|
15
|
+
import { n as g } from "./RadioGroupContext-CZexBsPa.js";
|
|
16
|
+
import { createComponent as _, delegateEvents as v, effect as y, getNextElement as b, memo as x, mergeProps as S, ref as ee, runHydrationEvents as C, setAttribute as w, setProperty as te, spread as T, style as ne, template as E } from "@solidjs/web";
|
|
17
|
+
import { Show as D, createContext as O, createEffect as k, createMemo as A, createSignal as j, createUniqueId as M, omit as N, onCleanup as re, onSettled as ie, untrack as ae, useContext as P } from "solid-js";
|
|
18
|
+
//#region src/radio/root/RadioRootContext.ts
|
|
19
|
+
var F = Symbol("RadioRootContext"), I = O(F);
|
|
20
|
+
function L() {
|
|
21
|
+
let e = P(I);
|
|
22
|
+
if (e === F) throw Error("Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.");
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/radio/root/RadioRoot.tsx
|
|
27
|
+
var oe = /* @__PURE__ */ E("<span>"), se = /* @__PURE__ */ E("<input type=radio tabindex=-1 aria-hidden=true>"), R = {
|
|
28
|
+
"clip-path": "inset(50%)",
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
"white-space": "nowrap",
|
|
31
|
+
border: "0",
|
|
32
|
+
padding: "0",
|
|
33
|
+
width: "1px",
|
|
34
|
+
height: "1px",
|
|
35
|
+
margin: "-1px",
|
|
36
|
+
position: "fixed",
|
|
37
|
+
top: "0",
|
|
38
|
+
left: "0"
|
|
39
|
+
}, ce = {
|
|
40
|
+
...R,
|
|
41
|
+
position: "absolute"
|
|
42
|
+
}, le = {
|
|
43
|
+
...f,
|
|
44
|
+
checked(e) {
|
|
45
|
+
return e ? { "data-checked": "" } : { "data-unchecked": "" };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function z(e) {
|
|
49
|
+
let s = g(), u = p(!0), d = h(), f = m(), v = e, E = e, D = Symbol("Radio"), O = Symbol("RadioLabelSource"), P = `base-ui-${M()}`, F = `base-ui-${M()}`, L = `base-ui-${M()}`, z = ae(f.controlId), V = typeof z == "string" ? z : P, [H, U] = j(), [W, de] = j(), [fe, G] = j(), pe = N(E, "aria-describedby", "aria-labelledby", "render", "class", "disabled", "id", "inputRef", "nativeButton", "onClick", "onFocus", "onKeyDown", "onKeyUp", "readOnly", "ref", "required", "style", "value"), K = A(() => v.nativeButton ?? !1), q = A(() => u.disabled() || d.disabled() || (s?.disabled() ?? !1) || (v.disabled ?? !1)), J = A(() => (s?.readOnly() ?? !1) || (v.readOnly ?? !1)), Y = A(() => (s?.required() ?? !1) || (v.required ?? !1)), X = A(() => s ? s.checkedValue() === v.value : v.value === ""), Z = A(() => v.id ?? V), me = A(() => K() ? Z() : F), Q = A(() => ({
|
|
50
|
+
...u.state(),
|
|
51
|
+
required: Y(),
|
|
52
|
+
disabled: q(),
|
|
53
|
+
readOnly: J(),
|
|
54
|
+
checked: X()
|
|
55
|
+
})), he = A(() => i(e.class, Q())), ge = t(e, () => Q(), (e) => (() => {
|
|
56
|
+
var t = b(oe);
|
|
57
|
+
return T(t, e, !1), C(), t;
|
|
58
|
+
})()), _e = A(() => a(e.style, Q())), ve = A(() => n(Q(), le)), ye = A(() => v["aria-labelledby"] ?? f.labelId() ?? fe()), be = A(() => f.getAriaDescribedBy(v["aria-describedby"])), $ = {
|
|
59
|
+
token: D,
|
|
60
|
+
checked: X,
|
|
61
|
+
disabled: q,
|
|
62
|
+
element: H,
|
|
63
|
+
input: W,
|
|
64
|
+
value: () => v.value
|
|
65
|
+
}, xe = c(l(() => v.onClick)), Se = c(l(() => v.onFocus)), Ce = c(l(() => v.onKeyDown)), we = c(l(() => v.onKeyUp));
|
|
66
|
+
function Te(e) {
|
|
67
|
+
if (xe.call(e.currentTarget, e), e.baseUIHandlerPrevented || e.defaultPrevented || q() || J()) return;
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
let t = W();
|
|
70
|
+
t && !X() && B(t, e);
|
|
71
|
+
}
|
|
72
|
+
function Ee(e) {
|
|
73
|
+
Se.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (s?.setActiveRadio($), !(!s || q() || J() || !s.touched()) && (W()?.click(), s.setTouched(!1)));
|
|
74
|
+
}
|
|
75
|
+
function De(e) {
|
|
76
|
+
if (Ce.call(e.currentTarget, e), !e.baseUIHandlerPrevented) {
|
|
77
|
+
if (e.key === "Enter") {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
!K() && e.key === " " && e.preventDefault();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function Oe(e) {
|
|
85
|
+
we.call(e.currentTarget, e), !(e.baseUIHandlerPrevented || K() || e.defaultPrevented || e.key !== " " || q() || J()) && B(e.currentTarget, e);
|
|
86
|
+
}
|
|
87
|
+
function ke(e) {
|
|
88
|
+
let t = e.currentTarget;
|
|
89
|
+
if (e.stopPropagation(), X()) return;
|
|
90
|
+
if (!s || q() || J() || v.value === void 0) {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
let n = X();
|
|
93
|
+
queueMicrotask(() => {
|
|
94
|
+
s ? s.syncInputs() : t.checked = n;
|
|
95
|
+
});
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
let n = o(r, e);
|
|
99
|
+
if (!s.selectValue(v.value, n)) {
|
|
100
|
+
e.preventDefault(), queueMicrotask(s.syncInputs);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
u.setTouched(!0), queueMicrotask(s.syncInputs);
|
|
104
|
+
}
|
|
105
|
+
function Ae() {
|
|
106
|
+
H()?.focus();
|
|
107
|
+
}
|
|
108
|
+
function je() {
|
|
109
|
+
return H() ?? null;
|
|
110
|
+
}
|
|
111
|
+
return k(Z, (e) => f.registerControlId(O, e)), k(() => s, (e) => e?.registerRadio($)), k(() => ({
|
|
112
|
+
explicit: v["aria-labelledby"],
|
|
113
|
+
fieldLabel: f.labelId(),
|
|
114
|
+
input: W(),
|
|
115
|
+
inputId: Z(),
|
|
116
|
+
nativeButton: K()
|
|
117
|
+
}), (e) => {
|
|
118
|
+
if (e.explicit || e.fieldLabel || e.nativeButton || !e.input) {
|
|
119
|
+
G(void 0);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
let t = e.input.closest("label") ?? e.input.labels?.[0];
|
|
123
|
+
if (!t) {
|
|
124
|
+
G(void 0);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
t.id ||= L, G(t.id || void 0);
|
|
128
|
+
}), k(() => ({
|
|
129
|
+
input: W(),
|
|
130
|
+
source: s?.fieldControlSource
|
|
131
|
+
}), (e) => {
|
|
132
|
+
if (!(!e.input || !e.source)) return u.validation.registerInput(e.source, e.input, je);
|
|
133
|
+
}), k(() => ({
|
|
134
|
+
checked: X(),
|
|
135
|
+
disabled: q(),
|
|
136
|
+
input: W()
|
|
137
|
+
}), (e) => {
|
|
138
|
+
e.checked && u.setFilled(!0), s?.notifyRadioChange();
|
|
139
|
+
}), ie(() => {
|
|
140
|
+
H();
|
|
141
|
+
}), re(() => {
|
|
142
|
+
f.registerControlId(O, void 0);
|
|
143
|
+
}), _(I, {
|
|
144
|
+
value: Q,
|
|
145
|
+
get children() {
|
|
146
|
+
return [_(ge, S({
|
|
147
|
+
ref: [((e) => U(e)), v.ref],
|
|
148
|
+
get id() {
|
|
149
|
+
return me();
|
|
150
|
+
},
|
|
151
|
+
get class() {
|
|
152
|
+
return he();
|
|
153
|
+
},
|
|
154
|
+
get style() {
|
|
155
|
+
return _e();
|
|
156
|
+
},
|
|
157
|
+
get type() {
|
|
158
|
+
return K() ? "button" : void 0;
|
|
159
|
+
},
|
|
160
|
+
role: "radio",
|
|
161
|
+
get tabIndex() {
|
|
162
|
+
return x(() => !!q())() ? -1 : s ? s.isTabStop($) ? 0 : -1 : 0;
|
|
163
|
+
},
|
|
164
|
+
get disabled() {
|
|
165
|
+
return K() && q() ? !0 : void 0;
|
|
166
|
+
},
|
|
167
|
+
get "aria-disabled"() {
|
|
168
|
+
return !K() && q() ? "true" : void 0;
|
|
169
|
+
},
|
|
170
|
+
get "aria-checked"() {
|
|
171
|
+
return X() ? "true" : "false";
|
|
172
|
+
},
|
|
173
|
+
get "aria-labelledby"() {
|
|
174
|
+
return ye();
|
|
175
|
+
},
|
|
176
|
+
get "aria-describedby"() {
|
|
177
|
+
return be();
|
|
178
|
+
},
|
|
179
|
+
get "aria-invalid"() {
|
|
180
|
+
return Q().valid === !1 && !q() ? "true" : void 0;
|
|
181
|
+
},
|
|
182
|
+
get "data-composite-item-active"() {
|
|
183
|
+
return X() ? "" : void 0;
|
|
184
|
+
},
|
|
185
|
+
onClick: Te,
|
|
186
|
+
onFocus: Ee,
|
|
187
|
+
onKeyDown: De,
|
|
188
|
+
onKeyUp: Oe
|
|
189
|
+
}, ve, pe)), (() => {
|
|
190
|
+
var e = b(se);
|
|
191
|
+
return e.addEventListener("focus", Ae), e.$$click = ke, ee(() => [((e) => de(e)), v.inputRef], e), y(() => ({
|
|
192
|
+
e: s?.form(),
|
|
193
|
+
t: K() ? void 0 : Z(),
|
|
194
|
+
a: s?.name(),
|
|
195
|
+
o: s?.name() ? ce : R,
|
|
196
|
+
i: v.value === void 0 ? void 0 : ue(v.value),
|
|
197
|
+
n: q(),
|
|
198
|
+
s: X(),
|
|
199
|
+
h: Y(),
|
|
200
|
+
r: J()
|
|
201
|
+
}), ({ e: t, t: n, a: r, o: i, i: a, n: o, s, h: c, r: l }, u) => {
|
|
202
|
+
t !== u?.e && w(e, "form", t), n !== u?.t && w(e, "id", n), r !== u?.a && w(e, "name", r), ne(e, i, u?.o), te(e, "value", a), o !== u?.n && w(e, "disabled", o), te(e, "checked", s), c !== u?.h && w(e, "required", c), l !== u?.r && w(e, "readonly", l);
|
|
203
|
+
}), C(), e;
|
|
204
|
+
})()];
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function ue(e) {
|
|
209
|
+
if (e == null) return "";
|
|
210
|
+
if (typeof e == "string") return e;
|
|
211
|
+
try {
|
|
212
|
+
return JSON.stringify(e);
|
|
213
|
+
} catch {
|
|
214
|
+
return String(e);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function B(e, t) {
|
|
218
|
+
let n = e.ownerDocument.defaultView;
|
|
219
|
+
if (!n) return;
|
|
220
|
+
let r = n.PointerEvent ?? n.MouseEvent;
|
|
221
|
+
e.dispatchEvent(new r("click", {
|
|
222
|
+
bubbles: !0,
|
|
223
|
+
cancelable: !0,
|
|
224
|
+
composed: !0,
|
|
225
|
+
detail: 0,
|
|
226
|
+
shiftKey: t.shiftKey,
|
|
227
|
+
ctrlKey: t.ctrlKey,
|
|
228
|
+
altKey: t.altKey,
|
|
229
|
+
metaKey: t.metaKey
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
v(["click"]);
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/radio/indicator/RadioIndicator.tsx
|
|
235
|
+
var V = /* @__PURE__ */ E("<span>"), H = {
|
|
236
|
+
...f,
|
|
237
|
+
...s,
|
|
238
|
+
checked(e) {
|
|
239
|
+
return e ? { "data-checked": "" } : { "data-unchecked": "" };
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
function U(e) {
|
|
243
|
+
let r, o = !1, s = L(), c = e, l = N(e, "render", "class", "keepMounted", "ref", "style"), f = A(() => s().checked), p = d(() => f()), m = A(() => (c.keepMounted ?? !1) || p.mounted()), h = A(() => ({
|
|
244
|
+
...s(),
|
|
245
|
+
transitionStatus: p.transitionStatus()
|
|
246
|
+
})), g = t(e, () => h(), (e) => (() => {
|
|
247
|
+
var t = b(V);
|
|
248
|
+
return T(t, e, !1), C(), t;
|
|
249
|
+
})()), v = A(() => m() ? i(e.class, h()) : void 0), y = A(() => m() ? a(e.style, h()) : void 0), x = A(() => n(h(), H));
|
|
250
|
+
return k(() => ({
|
|
251
|
+
checked: f(),
|
|
252
|
+
element: r,
|
|
253
|
+
status: p.transitionStatus()
|
|
254
|
+
}), (e) => {
|
|
255
|
+
if (o = e.checked, e.checked || e.status !== "ending" || !e.element) return;
|
|
256
|
+
let t = new AbortController();
|
|
257
|
+
return u(e.element, () => {
|
|
258
|
+
o || p.setMounted(!1);
|
|
259
|
+
}, t.signal), () => t.abort();
|
|
260
|
+
}), _(D, {
|
|
261
|
+
get when() {
|
|
262
|
+
return m();
|
|
263
|
+
},
|
|
264
|
+
get children() {
|
|
265
|
+
return _(g, S({
|
|
266
|
+
ref: [c.ref, ((e) => r = e)],
|
|
267
|
+
get class() {
|
|
268
|
+
return v();
|
|
269
|
+
},
|
|
270
|
+
get style() {
|
|
271
|
+
return y();
|
|
272
|
+
}
|
|
273
|
+
}, x, l));
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/radio/index.parts.ts
|
|
279
|
+
var W = /* @__PURE__ */ e({
|
|
280
|
+
Indicator: () => U,
|
|
281
|
+
Root: () => z
|
|
282
|
+
});
|
|
283
|
+
//#endregion
|
|
284
|
+
export { W as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../radio-group-
|
|
1
|
+
import { t as e } from "../radio-group-NbuJvjQe.js";
|
|
2
2
|
export { e as RadioGroup };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { t as e } from "./useRender-CxZ8PI-g.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { n, t as r } from "./resolveStyle-XcgAuaKR.js";
|
|
4
|
+
import { composeEventHandlers as i, liveEventHandler as a } from "./internals/composeEventHandlers.js";
|
|
5
|
+
import { n as o } from "./DirectionContext-BwMabICS.js";
|
|
6
|
+
import { fieldStateAttributesMapping as s } from "./internals/field-constants.js";
|
|
7
|
+
import { r as ee } from "./FieldRootContext-D3fuVjs3.js";
|
|
8
|
+
import { n as te } from "./FormContext-CwLBtm_d.js";
|
|
9
|
+
import { r as ne } from "./LabelableContext-CmQF-TX2.js";
|
|
10
|
+
import { n as re } from "./FieldsetRootContext-BgThSAcd.js";
|
|
11
|
+
import { t as ie } from "./RadioGroupContext-CZexBsPa.js";
|
|
12
|
+
import { createComponent as c, getNextElement as l, mergeProps as u, runHydrationEvents as d, spread as f, template as p } from "@solidjs/web";
|
|
13
|
+
import { createEffect as m, createMemo as h, createSignal as g, createUniqueId as ae, omit as oe, onCleanup as se, onSettled as ce, untrack as _ } from "solid-js";
|
|
14
|
+
//#region src/radio-group/RadioGroup.tsx
|
|
15
|
+
var le = /* @__PURE__ */ p("<div>");
|
|
16
|
+
function v(p) {
|
|
17
|
+
let v = ee(!0), de = re(!0), S = te(), C = ne(), w = o(), T = p, fe = p, E = Symbol("RadioGroup"), D = `base-ui-${ae()}`, O = _(() => T.value !== void 0), [k, A] = g(() => _(() => T.defaultValue)), [j, M] = g(), [N, P] = g(!1), [F, I] = g(), [L, R] = g(0), z = /* @__PURE__ */ new Map(), B, V = _(() => O ? T.value : k()), H, U, pe = oe(fe, "aria-describedby", "aria-labelledby", "render", "class", "defaultValue", "disabled", "form", "inputRef", "name", "onBlur", "onFocus", "onKeyDown", "onValueChange", "readOnly", "ref", "required", "style", "value"), W = h(() => O ? T.value : k()), G = h(() => v.disabled() || (T.disabled ?? !1)), K = h(() => T.readOnly ?? !1), q = h(() => T.required ?? !1), J = h(() => v.name() ?? T.name), me = h(() => W() ?? null), Y = h(() => ({
|
|
18
|
+
...v.state(),
|
|
19
|
+
disabled: G(),
|
|
20
|
+
readOnly: K(),
|
|
21
|
+
required: q()
|
|
22
|
+
})), he = h(() => n(p.class, Y())), ge = e(p, () => Y(), (e) => (() => {
|
|
23
|
+
var t = l(le);
|
|
24
|
+
return f(t, e, !1), d(), t;
|
|
25
|
+
})()), _e = h(() => r(p.style, Y())), ve = h(() => t(Y(), s)), ye = h(() => T["aria-labelledby"] ?? C.labelId() ?? de?.legendId()), be = h(() => C.getAriaDescribedBy(T["aria-describedby"])), xe = h(() => {
|
|
26
|
+
L();
|
|
27
|
+
let e = Array.from(z.values()), t = e.find((e) => e.checked() && !e.disabled());
|
|
28
|
+
return t ? t.token : e.find((e) => e.token === F() && !e.disabled())?.token ?? e.find((e) => !e.disabled())?.token;
|
|
29
|
+
});
|
|
30
|
+
function Se(e) {
|
|
31
|
+
return z.set(e.token, e), (_(e.checked) || !B && !_(e.disabled)) && (B = e.token, I(e.token)), X(), () => {
|
|
32
|
+
if (z.delete(e.token), B === e.token) {
|
|
33
|
+
let e = Array.from(z.values()).find((e) => _(e.checked) && !_(e.disabled)) ?? Array.from(z.values()).find((e) => !_(e.disabled));
|
|
34
|
+
B = e?.token, I(e?.token);
|
|
35
|
+
}
|
|
36
|
+
X();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function X() {
|
|
40
|
+
R((e) => e + 1);
|
|
41
|
+
}
|
|
42
|
+
function Z(e) {
|
|
43
|
+
e.disabled() || (B = e.token, I(e.token));
|
|
44
|
+
}
|
|
45
|
+
function Ce(e) {
|
|
46
|
+
return !e.disabled() && xe() === e.token;
|
|
47
|
+
}
|
|
48
|
+
function Q(e, t) {
|
|
49
|
+
return T.onValueChange?.(e, t), !t.isCanceled && (O || A(() => e), !0);
|
|
50
|
+
}
|
|
51
|
+
function we() {
|
|
52
|
+
for (let e of z.values()) {
|
|
53
|
+
let t = _(e.input);
|
|
54
|
+
t && (t.checked = _(e.checked));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function Te() {
|
|
58
|
+
let e = S.formElement();
|
|
59
|
+
if (!e) return W() ?? null;
|
|
60
|
+
L();
|
|
61
|
+
for (let t of z.values()) {
|
|
62
|
+
let n = t.input();
|
|
63
|
+
if (n?.checked && b(n, e)) return W() ?? null;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
let $ = {
|
|
68
|
+
id: D,
|
|
69
|
+
name: T.name,
|
|
70
|
+
value: me,
|
|
71
|
+
getValue: Te,
|
|
72
|
+
getControl: () => v.validation.getInputControl() ?? j() ?? null
|
|
73
|
+
}, Ee = i(a(() => T.onFocus)), De = i(a(() => T.onBlur)), Oe = i(a(() => T.onKeyDown));
|
|
74
|
+
function ke(e) {
|
|
75
|
+
Ee.call(e.currentTarget, e), !e.baseUIHandlerPrevented && v.setFocused(!0);
|
|
76
|
+
}
|
|
77
|
+
function Ae(e) {
|
|
78
|
+
if (De.call(e.currentTarget, e), e.baseUIHandlerPrevented) return;
|
|
79
|
+
let t = e.relatedTarget;
|
|
80
|
+
t instanceof Element && y(e.currentTarget, t) || (v.setTouched(!0), v.setFocused(!1), v.validationMode() === "onBlur" && v.validation.commit(W()));
|
|
81
|
+
}
|
|
82
|
+
function je(e) {
|
|
83
|
+
if (Oe.call(e.currentTarget, e), e.baseUIHandlerPrevented) return;
|
|
84
|
+
let t = ue(e, w());
|
|
85
|
+
if (t === 0 || e.ctrlKey || e.altKey || e.metaKey) return;
|
|
86
|
+
L();
|
|
87
|
+
let n = Array.from(z.values()).filter((e) => !e.disabled());
|
|
88
|
+
if (n.length < 2) return;
|
|
89
|
+
let r = e.composedPath()[0], i = n.findIndex((e) => r instanceof Node && e.element()?.contains(r));
|
|
90
|
+
if (i === -1) return;
|
|
91
|
+
let a = n[(i + t + n.length) % n.length];
|
|
92
|
+
!a || a === n[i] || (e.preventDefault(), e.stopPropagation(), P(!0), Z(a), queueMicrotask(() => a.element()?.focus()));
|
|
93
|
+
}
|
|
94
|
+
let Me = {
|
|
95
|
+
checkedValue: W,
|
|
96
|
+
disabled: G,
|
|
97
|
+
fieldControlSource: E,
|
|
98
|
+
form: () => T.form,
|
|
99
|
+
name: J,
|
|
100
|
+
readOnly: K,
|
|
101
|
+
required: q,
|
|
102
|
+
state: Y,
|
|
103
|
+
touched: N,
|
|
104
|
+
isTabStop: Ce,
|
|
105
|
+
notifyRadioChange: X,
|
|
106
|
+
registerRadio: Se,
|
|
107
|
+
selectValue: Q,
|
|
108
|
+
setActiveRadio: Z,
|
|
109
|
+
setTouched: P,
|
|
110
|
+
syncInputs: we
|
|
111
|
+
};
|
|
112
|
+
return m(() => ({
|
|
113
|
+
disabled: G(),
|
|
114
|
+
element: j(),
|
|
115
|
+
id: T.id ?? D,
|
|
116
|
+
name: T.name
|
|
117
|
+
}), (e) => {
|
|
118
|
+
$.id = e.id, $.name = e.name, v.registerFieldControl(E, e.disabled || !e.element ? void 0 : $);
|
|
119
|
+
}), m(() => ({
|
|
120
|
+
initialValue: v.validityData().initialValue,
|
|
121
|
+
name: J(),
|
|
122
|
+
value: W()
|
|
123
|
+
}), (e) => {
|
|
124
|
+
e.value !== V && (V = e.value, _(() => {
|
|
125
|
+
S.clearError(e.name), v.setDirty(e.value !== e.initialValue), v.setFilled(e.value != null), v.validation.change(e.value), X();
|
|
126
|
+
}));
|
|
127
|
+
}), m(() => {
|
|
128
|
+
L();
|
|
129
|
+
let e = Array.from(z.values()), t = e.find((e) => e.checked() && !e.disabled() && e.input())?.input();
|
|
130
|
+
return {
|
|
131
|
+
inputRef: T.inputRef,
|
|
132
|
+
representative: t ?? e.find((e) => !e.disabled() && e.input())?.input()
|
|
133
|
+
};
|
|
134
|
+
}, (e) => {
|
|
135
|
+
(e.representative !== H || e.inputRef !== U) && (H = e.representative, U = e.inputRef, e.representative && x(e.inputRef, e.representative));
|
|
136
|
+
}), ce(() => {
|
|
137
|
+
v.setFilled(W() != null);
|
|
138
|
+
}), se(() => v.registerFieldControl(E, void 0)), c(ie, {
|
|
139
|
+
value: Me,
|
|
140
|
+
get children() {
|
|
141
|
+
return c(ge, u({
|
|
142
|
+
ref: [((e) => M(e)), T.ref],
|
|
143
|
+
get class() {
|
|
144
|
+
return he();
|
|
145
|
+
},
|
|
146
|
+
get style() {
|
|
147
|
+
return _e();
|
|
148
|
+
},
|
|
149
|
+
role: "radiogroup",
|
|
150
|
+
get "aria-required"() {
|
|
151
|
+
return q() ? "true" : void 0;
|
|
152
|
+
},
|
|
153
|
+
get "aria-disabled"() {
|
|
154
|
+
return G() ? "true" : void 0;
|
|
155
|
+
},
|
|
156
|
+
get "aria-readonly"() {
|
|
157
|
+
return K() ? "true" : void 0;
|
|
158
|
+
},
|
|
159
|
+
get "aria-labelledby"() {
|
|
160
|
+
return ye();
|
|
161
|
+
},
|
|
162
|
+
get "aria-describedby"() {
|
|
163
|
+
return be();
|
|
164
|
+
},
|
|
165
|
+
get "aria-invalid"() {
|
|
166
|
+
return Y().valid === !1 && !G() ? "true" : void 0;
|
|
167
|
+
},
|
|
168
|
+
onFocus: ke,
|
|
169
|
+
onBlur: Ae,
|
|
170
|
+
onKeyDown: je
|
|
171
|
+
}, ve, pe));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function ue(e, t) {
|
|
176
|
+
return e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : e.key === "ArrowRight" ? t === "rtl" ? -1 : 1 : e.key === "ArrowLeft" ? t === "rtl" ? 1 : -1 : 0;
|
|
177
|
+
}
|
|
178
|
+
function y(e, t) {
|
|
179
|
+
if (e.contains(t)) return !0;
|
|
180
|
+
let n = t;
|
|
181
|
+
for (; n;) {
|
|
182
|
+
if (n === e) return !0;
|
|
183
|
+
n = n.parentNode ?? (n instanceof ShadowRoot ? n.host : null);
|
|
184
|
+
}
|
|
185
|
+
return !1;
|
|
186
|
+
}
|
|
187
|
+
function b(e, t) {
|
|
188
|
+
return e.matches(":disabled") ? !1 : e.form === t || e.form === null && !e.hasAttribute("form");
|
|
189
|
+
}
|
|
190
|
+
function x(e, t) {
|
|
191
|
+
if (Array.isArray(e)) for (let n of e) x(n, t);
|
|
192
|
+
else typeof e == "function" && e(t);
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { v as t };
|