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,8 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
3
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
4
|
+
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
5
|
+
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
6
|
+
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
7
|
+
import { isServer, mergeProps, ssrElement } from "@solidjs/web";
|
|
6
8
|
import { Show, createContext, createEffect, createMemo, createSignal, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
7
9
|
//#region src/avatar/root/AvatarRootContext.ts
|
|
8
10
|
var MISSING_CONTEXT = Symbol("AvatarRootContext");
|
|
@@ -17,20 +19,19 @@ function useAvatarRootContext() {
|
|
|
17
19
|
/** Displays a profile image, initials, or fallback content. */
|
|
18
20
|
function AvatarRoot(props) {
|
|
19
21
|
const [imageLoadingStatus, setImageLoadingStatus] = createSignal("idle");
|
|
20
|
-
const others = omit(props, "
|
|
22
|
+
const others = omit(props, "render", "class", "style");
|
|
21
23
|
const state = createMemo(() => ({ imageLoadingStatus: imageLoadingStatus() }));
|
|
22
24
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
23
25
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
26
|
+
const context = {
|
|
27
|
+
imageLoadingStatus,
|
|
28
|
+
setImageLoadingStatus
|
|
29
|
+
};
|
|
30
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("span", props, void 0, true));
|
|
24
31
|
return AvatarRootContext({
|
|
25
|
-
value:
|
|
26
|
-
imageLoadingStatus,
|
|
27
|
-
setImageLoadingStatus
|
|
28
|
-
},
|
|
32
|
+
value: context,
|
|
29
33
|
get children() {
|
|
30
|
-
return
|
|
31
|
-
get component() {
|
|
32
|
-
return props.as ?? "span";
|
|
33
|
-
},
|
|
34
|
+
return Render(mergeProps({
|
|
34
35
|
get ["class"]() {
|
|
35
36
|
return classValue();
|
|
36
37
|
},
|
|
@@ -43,10 +44,21 @@ function AvatarRoot(props) {
|
|
|
43
44
|
}
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region src/avatar/image/createImageLoadingStatus.ts
|
|
46
|
-
function createImageLoadingStatus(options) {
|
|
47
|
+
function createImageLoadingStatus(options, element, onInitiallyLoaded) {
|
|
47
48
|
const [status, setStatus] = createSignal("idle");
|
|
49
|
+
let initialCommit = true;
|
|
48
50
|
createEffect(options, (current) => {
|
|
49
51
|
if (isServer) return;
|
|
52
|
+
if (current.keepMounted) {
|
|
53
|
+
const image = element();
|
|
54
|
+
const isInitialCommit = initialCommit;
|
|
55
|
+
initialCommit = false;
|
|
56
|
+
if (!image) return;
|
|
57
|
+
const nextStatus = !image.complete ? "loading" : image.naturalWidth > 0 ? "loaded" : "error";
|
|
58
|
+
setStatus(nextStatus);
|
|
59
|
+
if (isInitialCommit && nextStatus === "loaded") onInitiallyLoaded();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
50
62
|
if (!current.src && !current.srcset) {
|
|
51
63
|
setStatus("error");
|
|
52
64
|
return;
|
|
@@ -71,7 +83,7 @@ function createImageLoadingStatus(options) {
|
|
|
71
83
|
image.onerror = null;
|
|
72
84
|
};
|
|
73
85
|
});
|
|
74
|
-
return status;
|
|
86
|
+
return [status, setStatus];
|
|
75
87
|
}
|
|
76
88
|
//#endregion
|
|
77
89
|
//#region src/avatar/image/AvatarImage.tsx
|
|
@@ -81,22 +93,29 @@ function AvatarImage(props) {
|
|
|
81
93
|
let imageElement;
|
|
82
94
|
let latestVisible = false;
|
|
83
95
|
let previousStatus = "idle";
|
|
84
|
-
const others = omit(props, "class", "style", "onLoadingStatusChange", "ref");
|
|
85
|
-
const imageLoadingStatus = createImageLoadingStatus(() => ({
|
|
96
|
+
const others = omit(props, "render", "class", "style", "onLoadingStatusChange", "ref", "keepMounted", "onLoad", "onError", "sizes", "srcset", "src");
|
|
97
|
+
const [imageLoadingStatus, setImageLoadingStatus] = createImageLoadingStatus(() => ({
|
|
86
98
|
src: typeof props.src === "string" ? props.src : void 0,
|
|
87
99
|
srcset: typeof props.srcset === "string" ? props.srcset : void 0,
|
|
88
100
|
sizes: typeof props.sizes === "string" ? props.sizes : void 0,
|
|
89
101
|
crossorigin: typeof props.crossorigin === "string" ? props.crossorigin : void 0,
|
|
90
|
-
referrerpolicy: typeof props.referrerpolicy === "string" ? props.referrerpolicy : void 0
|
|
91
|
-
|
|
102
|
+
referrerpolicy: typeof props.referrerpolicy === "string" ? props.referrerpolicy : void 0,
|
|
103
|
+
keepMounted: props.keepMounted ?? false
|
|
104
|
+
}), () => imageElement, () => transition.setMounted(true));
|
|
92
105
|
const visible = createMemo(() => imageLoadingStatus() === "loaded");
|
|
93
106
|
const transition = createTransitionStatus(() => visible());
|
|
94
107
|
const state = createMemo(() => ({
|
|
95
108
|
imageLoadingStatus: imageLoadingStatus(),
|
|
96
|
-
transitionStatus: transition.transitionStatus()
|
|
109
|
+
transitionStatus: props.keepMounted && transition.transitionStatus() === "ending" ? void 0 : transition.transitionStatus()
|
|
97
110
|
}));
|
|
98
|
-
const classValue = createMemo(() => transition.mounted() ? resolveClass(props.class, state()) : void 0);
|
|
99
|
-
const styleValue = createMemo(() => transition.mounted() ? resolveStyle(props.style, state()) : void 0);
|
|
111
|
+
const classValue = createMemo(() => props.keepMounted || transition.mounted() ? resolveClass(props.class, state()) : void 0);
|
|
112
|
+
const styleValue = createMemo(() => props.keepMounted || transition.mounted() ? resolveStyle(props.style, state()) : void 0);
|
|
113
|
+
const onLoad = composeEventHandlers(() => props.onLoad, () => () => {
|
|
114
|
+
if (props.keepMounted) setImageLoadingStatus("loaded");
|
|
115
|
+
});
|
|
116
|
+
const onError = composeEventHandlers(() => props.onError, () => () => {
|
|
117
|
+
if (props.keepMounted) setImageLoadingStatus("error");
|
|
118
|
+
});
|
|
100
119
|
createEffect(() => ({
|
|
101
120
|
status: imageLoadingStatus(),
|
|
102
121
|
onLoadingStatusChange: props.onLoadingStatusChange
|
|
@@ -118,35 +137,56 @@ function AvatarImage(props) {
|
|
|
118
137
|
const abortController = new AbortController();
|
|
119
138
|
runOnceAnimationsFinish(current.element, () => {
|
|
120
139
|
if (!latestVisible) {
|
|
121
|
-
imageElement = void 0;
|
|
140
|
+
if (!untrack(() => props.keepMounted)) imageElement = void 0;
|
|
122
141
|
transition.setMounted(false);
|
|
123
142
|
}
|
|
124
143
|
}, abortController.signal);
|
|
125
144
|
return () => abortController.abort();
|
|
126
145
|
});
|
|
127
146
|
onCleanup(() => context.setImageLoadingStatus("idle"));
|
|
147
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("img", props, void 0, true));
|
|
128
148
|
return Show({
|
|
129
149
|
get when() {
|
|
130
|
-
return transition.mounted();
|
|
150
|
+
return props.keepMounted || transition.mounted();
|
|
131
151
|
},
|
|
132
152
|
get children() {
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
153
|
+
return Render(mergeProps({
|
|
154
|
+
ref: [props.ref, (element) => imageElement = element],
|
|
155
|
+
alt: "",
|
|
156
|
+
get ["class"]() {
|
|
157
|
+
return classValue();
|
|
158
|
+
},
|
|
159
|
+
get style() {
|
|
160
|
+
return styleValue();
|
|
161
|
+
},
|
|
162
|
+
get ["data-starting-style"]() {
|
|
163
|
+
return state().transitionStatus === "starting" ? "" : void 0;
|
|
164
|
+
},
|
|
165
|
+
get ["data-ending-style"]() {
|
|
166
|
+
return state().transitionStatus === "ending" ? "" : void 0;
|
|
167
|
+
},
|
|
168
|
+
get ["data-loading"]() {
|
|
169
|
+
return props.keepMounted && imageLoadingStatus() === "loading" ? "" : void 0;
|
|
170
|
+
},
|
|
171
|
+
get ["data-error"]() {
|
|
172
|
+
return props.keepMounted && imageLoadingStatus() === "error" ? "" : void 0;
|
|
173
|
+
},
|
|
174
|
+
get ["aria-hidden"]() {
|
|
175
|
+
return props.keepMounted && imageLoadingStatus() !== "loaded" ? "true" : void 0;
|
|
176
|
+
},
|
|
177
|
+
onLoad,
|
|
178
|
+
onError
|
|
179
|
+
}, others, {
|
|
180
|
+
get sizes() {
|
|
181
|
+
return props.sizes;
|
|
182
|
+
},
|
|
183
|
+
get srcset() {
|
|
184
|
+
return props.srcset;
|
|
185
|
+
},
|
|
186
|
+
get src() {
|
|
187
|
+
return props.src;
|
|
188
|
+
}
|
|
189
|
+
}));
|
|
150
190
|
}
|
|
151
191
|
});
|
|
152
192
|
}
|
|
@@ -157,7 +197,7 @@ function AvatarFallback(props) {
|
|
|
157
197
|
const context = useAvatarRootContext();
|
|
158
198
|
const delay = createMemo(() => props.delay ?? 0);
|
|
159
199
|
const [delayPassed, setDelayPassed] = createSignal(untrack(delay) === 0);
|
|
160
|
-
const others = omit(props, "class", "style", "delay");
|
|
200
|
+
const others = omit(props, "render", "class", "style", "delay");
|
|
161
201
|
const state = createMemo(() => ({ imageLoadingStatus: context.imageLoadingStatus() }));
|
|
162
202
|
const visible = createMemo(() => context.imageLoadingStatus() !== "loaded" && (delay() === 0 || delayPassed()));
|
|
163
203
|
const classValue = createMemo(() => visible() ? resolveClass(props.class, state()) : void 0);
|
|
@@ -170,21 +210,20 @@ function AvatarFallback(props) {
|
|
|
170
210
|
const timeout = setTimeout(() => setDelayPassed(true), currentDelay);
|
|
171
211
|
return () => clearTimeout(timeout);
|
|
172
212
|
});
|
|
213
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("span", props, void 0, true));
|
|
173
214
|
return Show({
|
|
174
215
|
get when() {
|
|
175
216
|
return visible();
|
|
176
217
|
},
|
|
177
218
|
get children() {
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}, others);
|
|
187
|
-
}, void 0, true);
|
|
219
|
+
return Render(mergeProps({
|
|
220
|
+
get ["class"]() {
|
|
221
|
+
return classValue();
|
|
222
|
+
},
|
|
223
|
+
get style() {
|
|
224
|
+
return styleValue();
|
|
225
|
+
}
|
|
226
|
+
}, others));
|
|
188
227
|
}
|
|
189
228
|
});
|
|
190
229
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
2
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
3
3
|
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
4
|
-
import {
|
|
4
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
5
5
|
import { createMemo, omit, onSettled, untrack } from "solid-js";
|
|
6
6
|
//#region src/button/Button.tsx
|
|
7
7
|
/**
|
|
@@ -10,14 +10,13 @@ import { createMemo, omit, onSettled, untrack } from "solid-js";
|
|
|
10
10
|
*/
|
|
11
11
|
function Button(props) {
|
|
12
12
|
const eventProps = props;
|
|
13
|
-
const others = omit(props, "
|
|
13
|
+
const others = omit(props, "render", "class", "disabled", "focusableWhenDisabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
14
14
|
const disabled = createMemo(() => props.disabled ?? false);
|
|
15
15
|
const focusableWhenDisabled = createMemo(() => props.focusableWhenDisabled ?? false);
|
|
16
16
|
const nativeButton = createMemo(() => props.nativeButton ?? true);
|
|
17
17
|
const state = createMemo(() => ({ disabled: disabled() }));
|
|
18
18
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
19
19
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
20
|
-
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
21
20
|
const disabledAttribute = createMemo(() => nativeButton() && disabled() && !focusableWhenDisabled());
|
|
22
21
|
const ariaDisabled = createMemo(() => {
|
|
23
22
|
if (nativeButton()) return focusableWhenDisabled() ? disabled() ? "true" : "false" : void 0;
|
|
@@ -30,10 +29,7 @@ function Button(props) {
|
|
|
30
29
|
const onKeyDown = composeEventHandlers(() => untrack(() => props.disabled ?? false ? props.focusableWhenDisabled ?? false ? preventFocusableDisabledKeyDown : stopInteraction : void 0), () => eventProps.onKeyDown, () => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyDown));
|
|
31
30
|
const onKeyUp = composeEventHandlers(() => untrack(() => props.disabled ?? false ? stopInteraction : void 0), () => eventProps.onKeyUp, () => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyUp));
|
|
32
31
|
onSettled(() => {});
|
|
33
|
-
return
|
|
34
|
-
get component() {
|
|
35
|
-
return props.as ?? "button";
|
|
36
|
-
},
|
|
32
|
+
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
37
33
|
ref: [((value) => value), eventProps.ref],
|
|
38
34
|
get ["class"]() {
|
|
39
35
|
return classValue();
|
|
@@ -56,12 +52,15 @@ function Button(props) {
|
|
|
56
52
|
get ["aria-disabled"]() {
|
|
57
53
|
return ariaDisabled();
|
|
58
54
|
},
|
|
55
|
+
get ["data-disabled"]() {
|
|
56
|
+
return disabled() ? "" : void 0;
|
|
57
|
+
},
|
|
59
58
|
onClick,
|
|
60
59
|
onMouseDown,
|
|
61
60
|
onPointerDown,
|
|
62
61
|
onKeyDown,
|
|
63
62
|
onKeyUp
|
|
64
|
-
},
|
|
63
|
+
}, others));
|
|
65
64
|
}
|
|
66
65
|
function isValidLinkElement(element) {
|
|
67
66
|
return element.tagName === "A" && Boolean(element.href);
|
|
@@ -1,17 +1,19 @@
|
|
|
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 createTransitionStatus } from "../createTransitionStatus-
|
|
7
|
+
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
8
|
+
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
8
9
|
import { fieldStateAttributesMapping } from "../internals/field-constants.js";
|
|
9
10
|
import { n as useFieldRootContext } from "../FieldRootContext-IC-LWzVp.js";
|
|
10
|
-
import { n as useFormContext } from "../FormContext-
|
|
11
|
-
import { r as useLabelableContext } from "../LabelableContext-
|
|
11
|
+
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
12
|
+
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
13
|
+
import { t as createLabelableId } from "../createLabelableId-WMUKtY6s.js";
|
|
12
14
|
import { n as useFieldItemContext } from "../FieldItemContext-x-C7ZlmX.js";
|
|
13
15
|
import { n as useCheckboxGroupContext } from "../CheckboxGroupContext-DTP679kK.js";
|
|
14
|
-
import {
|
|
16
|
+
import { escape, memo, mergeProps, ssr, ssrAttribute, ssrElement, ssrGroup, ssrHydrationKey } from "@solidjs/web";
|
|
15
17
|
import { Show, createContext, createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack, useContext } from "solid-js";
|
|
16
18
|
//#region src/checkbox/utils/getCheckboxStateAttributesMapping.ts
|
|
17
19
|
function getCheckboxStateAttributesMapping(state) {
|
|
@@ -57,7 +59,9 @@ var HIDDEN_INPUT_STYLE = {
|
|
|
57
59
|
};
|
|
58
60
|
var HIDDEN_NAMED_INPUT_STYLE = {
|
|
59
61
|
...HIDDEN_INPUT_STYLE,
|
|
60
|
-
position: "absolute"
|
|
62
|
+
position: "absolute",
|
|
63
|
+
top: "auto",
|
|
64
|
+
left: "auto"
|
|
61
65
|
};
|
|
62
66
|
/** Represents a visible checkbox and renders a hidden native checkbox beside it. */
|
|
63
67
|
function CheckboxRoot(props) {
|
|
@@ -70,13 +74,11 @@ function CheckboxRoot(props) {
|
|
|
70
74
|
const internalProps = props;
|
|
71
75
|
const allProps = props;
|
|
72
76
|
const fieldControlSource = Symbol("Checkbox");
|
|
73
|
-
const labelSource = Symbol("CheckboxLabelSource");
|
|
74
77
|
const token = Symbol("CheckboxGroupItem");
|
|
75
78
|
const ownInputId = `base-ui-${createUniqueId()}`;
|
|
76
79
|
const ownRootId = `base-ui-${createUniqueId()}`;
|
|
77
80
|
const ownLabelId = `base-ui-${createUniqueId()}`;
|
|
78
|
-
const
|
|
79
|
-
const inheritedControlId = untrack(labelable.controlId);
|
|
81
|
+
const inheritedControlId = labelable.defaultControlId;
|
|
80
82
|
const fallbackInputId = typeof inheritedControlId === "string" ? inheritedControlId : ownInputId;
|
|
81
83
|
const controlled = untrack(() => internalProps.checked !== void 0);
|
|
82
84
|
const [uncontrolledChecked, setUncontrolledChecked] = createSignal(untrack(() => internalProps.defaultChecked ?? false));
|
|
@@ -87,7 +89,7 @@ function CheckboxRoot(props) {
|
|
|
87
89
|
let suppressEnterClick = false;
|
|
88
90
|
let generatedLabel;
|
|
89
91
|
let stopEnterSuppression = () => void 0;
|
|
90
|
-
const others = omit(allProps, "aria-describedby", "aria-labelledby", "
|
|
92
|
+
const others = omit(allProps, "aria-describedby", "aria-labelledby", "render", "checked", "class", "defaultChecked", "disabled", "form", "id", "indeterminate", "inputRef", "name", "nativeButton", "onBlur", "onChange", "onCheckedChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "parent", "readOnly", "ref", "required", "style", "uncheckedValue", "value");
|
|
91
93
|
const nativeButton = createMemo(() => internalProps.nativeButton ?? false);
|
|
92
94
|
const parent = createMemo(() => internalProps.parent ?? false);
|
|
93
95
|
const parentEnabled = createMemo(() => group?.allValues() !== void 0);
|
|
@@ -102,16 +104,9 @@ function CheckboxRoot(props) {
|
|
|
102
104
|
return group.value().includes(value());
|
|
103
105
|
});
|
|
104
106
|
const indeterminate = createMemo(() => parentEnabled() && parent() ? (group?.parent.indeterminate() ?? false) || (internalProps.indeterminate ?? false) : internalProps.indeterminate ?? false);
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const checkboxValue = value();
|
|
109
|
-
return checkboxValue === void 0 ? internalProps.id || fallbackInputId || ownInputId : `${group?.parent.id}-${checkboxValue}`;
|
|
110
|
-
});
|
|
111
|
-
const rootId = createMemo(() => {
|
|
112
|
-
if (parentEnabled() && parent()) return group?.parent.id;
|
|
113
|
-
return nativeButton() ? inputId() : ownRootId;
|
|
114
|
-
});
|
|
107
|
+
const ownsControlId = () => group?.registerControlId !== labelable.registerControlId;
|
|
108
|
+
const inputId = createLabelableId(() => internalProps.id || void 0, ownsControlId() ? fallbackInputId : ownInputId, ownsControlId);
|
|
109
|
+
const rootId = createMemo(() => nativeButton() ? inputId() : ownRootId);
|
|
115
110
|
const state = createMemo(() => ({
|
|
116
111
|
...field.state(),
|
|
117
112
|
checked: checked(),
|
|
@@ -121,12 +116,14 @@ function CheckboxRoot(props) {
|
|
|
121
116
|
indeterminate: indeterminate()
|
|
122
117
|
}));
|
|
123
118
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
119
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("span", props, void 0, true));
|
|
124
120
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
125
121
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), getCheckboxStateAttributesMapping(state())));
|
|
126
122
|
const ariaLabelledBy = createMemo(() => internalProps["aria-labelledby"] ?? labelable.labelId() ?? fallbackAriaLabelledBy());
|
|
127
123
|
const ariaDescribedBy = createMemo(() => labelable.getAriaDescribedBy(internalProps["aria-describedby"]));
|
|
128
124
|
const checkbox = {
|
|
129
125
|
token,
|
|
126
|
+
id: rootId,
|
|
130
127
|
disabled,
|
|
131
128
|
element: rootElement,
|
|
132
129
|
input: inputElement,
|
|
@@ -209,7 +206,6 @@ function CheckboxRoot(props) {
|
|
|
209
206
|
if (generatedLabel && generatedLabel !== except && generatedLabel.id === ownLabelId) generatedLabel.removeAttribute("id");
|
|
210
207
|
if (generatedLabel !== except) generatedLabel = void 0;
|
|
211
208
|
}
|
|
212
|
-
createEffect(inputId, (id) => labelable.registerControlId(labelSource, id));
|
|
213
209
|
createEffect(() => ({
|
|
214
210
|
explicit: internalProps["aria-labelledby"],
|
|
215
211
|
fieldLabel: labelable.labelId(),
|
|
@@ -279,11 +275,11 @@ function CheckboxRoot(props) {
|
|
|
279
275
|
name: name()
|
|
280
276
|
}), (current) => {
|
|
281
277
|
if (current.input) current.input.indeterminate = current.indeterminate;
|
|
278
|
+
if (!current.group) field.setFilled(current.checked);
|
|
282
279
|
if (current.group || current.checked === previousChecked) return;
|
|
283
280
|
previousChecked = current.checked;
|
|
284
281
|
untrack(() => {
|
|
285
282
|
form.clearError(current.name);
|
|
286
|
-
field.setFilled(current.checked);
|
|
287
283
|
field.setDirty(current.checked !== field.validityData().initialValue);
|
|
288
284
|
field.validation.change(current.checked);
|
|
289
285
|
});
|
|
@@ -298,23 +294,19 @@ function CheckboxRoot(props) {
|
|
|
298
294
|
field.registerFieldControl(fieldControlSource, !current.group && !current.disabled && current.root ? registration : void 0);
|
|
299
295
|
});
|
|
300
296
|
onSettled(() => {
|
|
301
|
-
if (
|
|
297
|
+
if (!group) field.setFilled(checked());
|
|
302
298
|
rootElement();
|
|
303
299
|
});
|
|
304
300
|
onCleanup(() => {
|
|
305
301
|
stopEnterSuppression();
|
|
306
302
|
clearGeneratedLabel();
|
|
307
|
-
labelable.registerControlId(labelSource, void 0);
|
|
308
303
|
field.registerFieldControl(fieldControlSource, void 0);
|
|
309
304
|
});
|
|
310
305
|
return CheckboxRootContext({
|
|
311
306
|
value: state,
|
|
312
307
|
get children() {
|
|
313
308
|
return [
|
|
314
|
-
|
|
315
|
-
get component() {
|
|
316
|
-
return props.as ?? "span";
|
|
317
|
-
},
|
|
309
|
+
Render(mergeProps({
|
|
318
310
|
ref: [((element) => setRootElement(element)), internalProps.ref],
|
|
319
311
|
get id() {
|
|
320
312
|
return rootId();
|
|
@@ -463,7 +455,7 @@ function CheckboxIndicator(props) {
|
|
|
463
455
|
let latestRendered = false;
|
|
464
456
|
const rootState = useCheckboxRootContext();
|
|
465
457
|
const internalProps = props;
|
|
466
|
-
const others = omit(props, "
|
|
458
|
+
const others = omit(props, "render", "class", "keepMounted", "ref", "style");
|
|
467
459
|
const rendered = createMemo(() => rootState().checked || rootState().indeterminate);
|
|
468
460
|
const transition = createTransitionStatus(() => rendered());
|
|
469
461
|
const shouldRender = createMemo(() => (internalProps.keepMounted ?? false) || transition.mounted());
|
|
@@ -471,6 +463,7 @@ function CheckboxIndicator(props) {
|
|
|
471
463
|
...rootState(),
|
|
472
464
|
transitionStatus: transition.transitionStatus()
|
|
473
465
|
}));
|
|
466
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("span", props, void 0, true));
|
|
474
467
|
const classValue = createMemo(() => shouldRender() ? resolveClass(props.class, state()) : void 0);
|
|
475
468
|
const styleValue = createMemo(() => shouldRender() ? resolveStyle(props.style, state()) : void 0);
|
|
476
469
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), {
|
|
@@ -495,35 +488,15 @@ function CheckboxIndicator(props) {
|
|
|
495
488
|
return shouldRender();
|
|
496
489
|
},
|
|
497
490
|
get children() {
|
|
498
|
-
return
|
|
499
|
-
|
|
500
|
-
|
|
491
|
+
return Render(mergeProps({
|
|
492
|
+
ref: [internalProps.ref, ((element) => indicatorElement = element)],
|
|
493
|
+
get ["class"]() {
|
|
494
|
+
return classValue();
|
|
501
495
|
},
|
|
502
|
-
get
|
|
503
|
-
return
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
return classValue();
|
|
507
|
-
},
|
|
508
|
-
get style() {
|
|
509
|
-
return styleValue();
|
|
510
|
-
}
|
|
511
|
-
}, stateAttributes, others);
|
|
512
|
-
}, void 0, true);
|
|
513
|
-
},
|
|
514
|
-
children: (component) => Dynamic(mergeProps({
|
|
515
|
-
get component() {
|
|
516
|
-
return component();
|
|
517
|
-
},
|
|
518
|
-
ref: [internalProps.ref, ((element) => indicatorElement = element)],
|
|
519
|
-
get ["class"]() {
|
|
520
|
-
return classValue();
|
|
521
|
-
},
|
|
522
|
-
get style() {
|
|
523
|
-
return styleValue();
|
|
524
|
-
}
|
|
525
|
-
}, stateAttributes, others))
|
|
526
|
-
});
|
|
496
|
+
get style() {
|
|
497
|
+
return styleValue();
|
|
498
|
+
}
|
|
499
|
+
}, stateAttributes, others));
|
|
527
500
|
}
|
|
528
501
|
});
|
|
529
502
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
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 { fieldStateAttributesMapping } from "../internals/field-constants.js";
|
|
4
5
|
import { n as useFieldRootContext } from "../FieldRootContext-IC-LWzVp.js";
|
|
5
|
-
import { n as useFormContext } from "../FormContext-
|
|
6
|
-
import { r as useLabelableContext } from "../LabelableContext-
|
|
6
|
+
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
7
|
+
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
8
|
+
import { t as createLabelableId } from "../createLabelableId-WMUKtY6s.js";
|
|
7
9
|
import { t as CheckboxGroupContext } from "../CheckboxGroupContext-DTP679kK.js";
|
|
8
|
-
import {
|
|
10
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
9
11
|
import { createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
10
12
|
//#region src/checkbox-group/CheckboxGroup.tsx
|
|
11
13
|
var EMPTY_VALUE = [];
|
|
@@ -14,6 +16,8 @@ function CheckboxGroup(props) {
|
|
|
14
16
|
const field = useFieldRootContext(true);
|
|
15
17
|
const form = useFormContext();
|
|
16
18
|
const labelable = useLabelableContext();
|
|
19
|
+
const [checkboxVersion, setCheckboxVersion] = createSignal(0);
|
|
20
|
+
createLabelableId(() => null, "");
|
|
17
21
|
const internalProps = props;
|
|
18
22
|
const allProps = props;
|
|
19
23
|
const fieldControlSource = Symbol("CheckboxGroup");
|
|
@@ -27,7 +31,7 @@ function CheckboxGroup(props) {
|
|
|
27
31
|
let childSnapshot = untrack(() => controlled ? internalProps.value ?? EMPTY_VALUE : uncontrolledValue());
|
|
28
32
|
let valueSnapshot = childSnapshot;
|
|
29
33
|
let previousValue = childSnapshot;
|
|
30
|
-
const others = omit(allProps, "aria-describedby", "aria-labelledby", "allValues", "
|
|
34
|
+
const others = omit(allProps, "aria-describedby", "aria-labelledby", "allValues", "render", "class", "defaultValue", "disabled", "onValueChange", "ref", "style", "value");
|
|
31
35
|
const value = createMemo(() => controlled ? internalProps.value ?? EMPTY_VALUE : uncontrolledValue());
|
|
32
36
|
const disabled = createMemo(() => field.disabled() || (internalProps.disabled ?? false));
|
|
33
37
|
const state = createMemo(() => ({
|
|
@@ -35,16 +39,24 @@ function CheckboxGroup(props) {
|
|
|
35
39
|
disabled: disabled()
|
|
36
40
|
}));
|
|
37
41
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
42
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
38
43
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
39
44
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), fieldStateAttributesMapping));
|
|
40
45
|
const ariaLabelledBy = createMemo(() => internalProps["aria-labelledby"] ?? labelable.labelId());
|
|
41
46
|
const ariaDescribedBy = createMemo(() => labelable.getAriaDescribedBy(internalProps["aria-describedby"]));
|
|
42
47
|
const parentChecked = createMemo(() => value().length === (internalProps.allValues ?? EMPTY_VALUE).length);
|
|
43
48
|
const parentIndeterminate = createMemo(() => value().length > 0 && value().length !== (internalProps.allValues ?? EMPTY_VALUE).length);
|
|
44
|
-
const parentAriaControls = createMemo(() =>
|
|
49
|
+
const parentAriaControls = createMemo(() => {
|
|
50
|
+
checkboxVersion();
|
|
51
|
+
return (internalProps.allValues ?? EMPTY_VALUE).map((itemValue) => Array.from(checkboxes.values()).find((checkbox) => !checkbox.parent() && checkbox.value() === itemValue)?.id()).filter(Boolean).join(" ") || void 0;
|
|
52
|
+
});
|
|
45
53
|
function registerCheckbox(checkbox) {
|
|
46
54
|
checkboxes.set(checkbox.token, checkbox);
|
|
47
|
-
|
|
55
|
+
setCheckboxVersion((version) => version + 1);
|
|
56
|
+
return () => {
|
|
57
|
+
checkboxes.delete(checkbox.token);
|
|
58
|
+
setCheckboxVersion((version) => version + 1);
|
|
59
|
+
};
|
|
48
60
|
}
|
|
49
61
|
function setValue(nextValue, details) {
|
|
50
62
|
internalProps.onValueChange?.(nextValue, details);
|
|
@@ -115,6 +127,7 @@ function CheckboxGroup(props) {
|
|
|
115
127
|
allValues: () => internalProps.allValues,
|
|
116
128
|
disabled,
|
|
117
129
|
fieldControlSource,
|
|
130
|
+
registerControlId: labelable.registerControlId,
|
|
118
131
|
getValue: getCurrentValue,
|
|
119
132
|
parent: {
|
|
120
133
|
id: parentId,
|
|
@@ -160,10 +173,7 @@ function CheckboxGroup(props) {
|
|
|
160
173
|
return CheckboxGroupContext({
|
|
161
174
|
value: context,
|
|
162
175
|
get children() {
|
|
163
|
-
return
|
|
164
|
-
get component() {
|
|
165
|
-
return props.as ?? "div";
|
|
166
|
-
},
|
|
176
|
+
return Render(mergeProps({
|
|
167
177
|
ref: [((element) => setRootElement(element)), internalProps.ref],
|
|
168
178
|
get ["class"]() {
|
|
169
179
|
return classValue();
|