solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +95 -8
- package/dist/lib/client/DialogHandle-BGyIbcvg.js +521 -0
- package/dist/lib/client/DialogPopup-Df7MC358.js +138 -0
- package/dist/lib/client/FieldControl-C0PATyKV.js +142 -0
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-NP1uPXTi.js} +5 -5
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-yfncqM-D.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-CQI6Om1Z.js} +1 -1
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-Du0O57fL.js} +118 -98
- package/dist/lib/client/{PopupViewport-DgrIqQea.js → PopupViewport-IS4XU03s.js} +2 -2
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Cs8LVBj5.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-BFeZFpJZ.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-BxGUF8_Q.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-C9QA98XD.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-BQoEzzav.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-akYS6FyY.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-DOXtzBhA.js +425 -0
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-CwMDoSTK.js +135 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-t8YReaIp.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-6DhOdzit.js +399 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-cOVxAoxB.js} +5 -1
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-CplDpqmi.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-D96gu-Dz.js} +148 -145
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction--s9_qBf3.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-Dn-stj-8.js} +1 -1
- package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-B9tR9X48.js} +2 -2
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-dyr3_sKQ.js +1539 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-CjUAjp1m.js +483 -0
- package/dist/lib/client/fieldset/index.js +1 -1
- package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-6Ne_bWQX.js +109 -0
- package/dist/lib/client/index.js +44 -42
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-gb0ejxkm.js → input-_QHvSSqM.js} +1 -1
- package/dist/lib/client/internals/form-context/index.js +1 -1
- package/dist/lib/client/internals/labelable-provider/index.js +1 -1
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-DLqUBmMK.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-DhPRUQZ6.js +163 -0
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → mergeStyleValue-DhTA9Nwe.js} +7 -3
- package/dist/lib/client/meter/index.js +1 -1
- package/dist/lib/client/meter-BvWdppcx.js +178 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/navigation-menu-mVHV41Ky.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-DusLw_0X.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-D-B9tZzF.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cv7xn0nW.js +938 -0
- package/dist/lib/client/popupStateMapping-C6jQ_LKo.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-FTN_aafM.js +632 -0
- package/dist/lib/client/progress/index.js +1 -1
- package/dist/lib/client/progress-AVKxvgpc.js +195 -0
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/radio-DA_oZhQT.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-CWtQxWDl.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DJG0VIVo.js} +4 -0
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-NCr49LkD.js +717 -0
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-DSPJt7Rk.js +1933 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CWq9hxFf.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-CPl7QHKI.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-Bn4rZDyZ.js +692 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-7LdqZWOs.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CsC37e3e.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-DSWb9HxN.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-DcCi3HNp.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-D-PkGco9.js +849 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-B7z2CGMV.js +2270 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-nJSSy_jM.js} +24 -33
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-Da1aIxVA.js} +10 -13
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-BDeNR3ug.js} +56 -20
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-1LfoCsya.js} +1 -3
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-rR8ZN7YR.js} +133 -166
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-Ct6wywmP.js} +1 -1
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-kHjFPiQ5.js} +38 -14
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-DftN5VUp.js} +2 -2
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-CvoGfft9.js +61 -0
- package/dist/lib/server/accordion/index.js +32 -70
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +14 -5
- package/dist/lib/server/avatar/index.js +90 -51
- package/dist/lib/server/button/index.js +8 -9
- package/dist/lib/server/checkbox/index.js +30 -57
- package/dist/lib/server/checkbox-group/index.js +20 -10
- package/dist/lib/server/collapsible/index.js +36 -43
- package/dist/lib/server/combobox/index.js +64 -35
- package/dist/lib/server/{constants-9H__9xbS.js → constants-D7ciIzsV.js} +8 -3
- package/dist/lib/server/context-menu/index.js +7 -9
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-B5Y0WEev.js} +11 -6
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DMyKsniI.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-ImBjwdj_.js} +1 -1
- package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
- package/dist/lib/server/dialog/index.js +2 -2
- package/dist/lib/server/drawer/index.js +63 -71
- package/dist/lib/server/field/index.js +105 -93
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +16 -12
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/form-context/index.js +1 -1
- package/dist/lib/server/internals/labelable-provider/index.js +1 -1
- package/dist/lib/server/menu/index.js +21 -20
- package/dist/lib/server/menubar/index.js +6 -31
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → mergeStyleValue-BwJ10_X2.js} +6 -1
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +53 -124
- package/dist/lib/server/number-field/index.js +44 -42
- package/dist/lib/server/otp-field/index.js +11 -14
- package/dist/lib/server/popover/index.js +42 -59
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-B2KsiiLb.js} +18 -16
- package/dist/lib/server/preview-card/index.js +30 -41
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +18 -39
- package/dist/lib/server/radio-group/index.js +7 -8
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-C1GNJbKR.js} +5 -0
- package/dist/lib/server/scroll-area/index.js +23 -32
- package/dist/lib/server/select/index.js +95 -181
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +25 -38
- package/dist/lib/server/switch/index.js +13 -23
- package/dist/lib/server/tabs/index.js +185 -129
- package/dist/lib/server/toast/index.js +49 -66
- package/dist/lib/server/toggle/index.js +4 -6
- package/dist/lib/server/toggle-group/index.js +9 -7
- package/dist/lib/server/toolbar/index.js +62 -79
- package/dist/lib/server/tooltip/index.js +28 -37
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-DCxq20Is.js} +164 -189
- package/dist/lib/server/useRender-CryVdCjs.js +16 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +1 -1
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
- package/dist/lib/types/button/Button.d.ts +1 -1
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/dist/lib/types/combobox/index.d.ts +2 -0
- package/dist/lib/types/combobox/index.parts.d.ts +1 -0
- package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +12 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
- package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
- package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
- package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
- package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
- package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
- package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
- package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/dist/lib/types/separator/Separator.d.ts +1 -1
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
- package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
- package/dist/lib/types/toast/createToastManager.d.ts +2 -2
- package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
- package/dist/lib/types/toast/useToastManager.d.ts +1 -1
- package/dist/lib/types/toggle/Toggle.d.ts +1 -1
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +1 -1
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +1 -1
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/dist/lib/types/types/index.d.ts +7 -3
- package/dist/lib/types/use-render/index.d.ts +2 -0
- package/dist/lib/types/use-render/useRender.d.ts +10 -0
- package/package.json +24 -11
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
- package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
- package/dist/lib/client/Separator-9DboD_Si.js +0 -25
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
- package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
- package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
- package/dist/lib/client/button-DpUi-2g8.js +0 -82
- package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
- package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
- package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
- package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
- package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
- package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
- package/dist/lib/client/field-C-o7jzKW.js +0 -469
- package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
- package/dist/lib/client/form-BINBiW5L.js +0 -106
- package/dist/lib/client/menu-DeMT08oD.js +0 -326
- package/dist/lib/client/menubar-C4aomSYv.js +0 -185
- package/dist/lib/client/meter-xSU37Q0m.js +0 -171
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
- package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
- package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
- package/dist/lib/client/popover-CQwyp-fs.js +0 -929
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
- package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
- package/dist/lib/client/progress-D7r0xAC9.js +0 -188
- package/dist/lib/client/radio-CzGQ81z1.js +0 -299
- package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
- package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
- package/dist/lib/client/select-IFhiEg73.js +0 -1940
- package/dist/lib/client/slider-BCagYmGp.js +0 -921
- package/dist/lib/client/switch-RIJeDnvS.js +0 -308
- package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
- package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
- package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
- package/dist/lib/client/toggle-momVEIBL.js +0 -138
- package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
- package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
- package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
|
@@ -0,0 +1,425 @@
|
|
|
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 } from "./internals/composeEventHandlers.js";
|
|
9
|
+
import { t as ee } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
10
|
+
import { t as te } from "./createTransitionStatus-BL_cPSEA.js";
|
|
11
|
+
import { fieldStateAttributesMapping as l } from "./internals/field-constants.js";
|
|
12
|
+
import { n as ne } from "./FieldRootContext-izCEh80D.js";
|
|
13
|
+
import { n as u } from "./FormContext-CwLBtm_d.js";
|
|
14
|
+
import { r as d } from "./LabelableContext-CmQF-TX2.js";
|
|
15
|
+
import { t as f } from "./createLabelableId-DxJRwMUJ.js";
|
|
16
|
+
import { n as p } from "./FieldItemContext-Bwzf-4tL.js";
|
|
17
|
+
import { n as re } from "./CheckboxGroupContext-1CRRHK0T.js";
|
|
18
|
+
import { createComponent as m, effect as ie, getNextElement as h, memo as g, mergeProps as _, ref as ae, runHydrationEvents as v, setAttribute as y, setProperty as oe, spread as b, template as x } from "@solidjs/web";
|
|
19
|
+
import { Show as se, createContext as S, createEffect as C, createMemo as w, createSignal as T, createUniqueId as E, omit as ce, onCleanup as le, onSettled as ue, untrack as D, useContext as de } from "solid-js";
|
|
20
|
+
//#region src/checkbox/utils/getCheckboxStateAttributesMapping.ts
|
|
21
|
+
function fe(e) {
|
|
22
|
+
return {
|
|
23
|
+
...l,
|
|
24
|
+
checked(t) {
|
|
25
|
+
return e.indeterminate ? null : t ? { "data-checked": "" } : { "data-unchecked": "" };
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/checkbox/root/CheckboxRootContext.ts
|
|
31
|
+
var O = Symbol("CheckboxRootContext"), pe = S(O);
|
|
32
|
+
function me() {
|
|
33
|
+
let e = de(pe);
|
|
34
|
+
if (e === O) throw Error("Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.");
|
|
35
|
+
return e;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/checkbox/root/CheckboxRoot.tsx
|
|
39
|
+
var he = /* @__PURE__ */ x("<span>"), ge = /* @__PURE__ */ x("<input type=hidden>"), _e = /* @__PURE__ */ x("<input>"), ve = {
|
|
40
|
+
"clip-path": "inset(50%)",
|
|
41
|
+
overflow: "hidden",
|
|
42
|
+
"white-space": "nowrap",
|
|
43
|
+
border: "0",
|
|
44
|
+
padding: "0",
|
|
45
|
+
width: "1px",
|
|
46
|
+
height: "1px",
|
|
47
|
+
margin: "-1px",
|
|
48
|
+
position: "fixed",
|
|
49
|
+
top: "0",
|
|
50
|
+
left: "0"
|
|
51
|
+
}, ye = {
|
|
52
|
+
...ve,
|
|
53
|
+
position: "absolute",
|
|
54
|
+
top: "auto",
|
|
55
|
+
left: "auto"
|
|
56
|
+
};
|
|
57
|
+
function k(e) {
|
|
58
|
+
let s = ne(!0), ee = u(), te = p(), l = d(), x = re(), S = e, de = e, O = Symbol("Checkbox"), me = Symbol("CheckboxGroupItem"), k = `base-ui-${E()}`, A = `base-ui-${E()}`, j = `base-ui-${E()}`, M = l.defaultControlId, Se = typeof M == "string" ? M : k, N = D(() => S.checked !== void 0), [Ce, we] = T(D(() => S.defaultChecked ?? !1)), [P, Te] = T(), [F, Ee] = T(), [De, I] = T(), Oe = D(() => N ? !!S.checked : Ce()), L = !1, R = !1, z, B = () => void 0, ke = ce(de, "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"), V = w(() => S.nativeButton ?? !1), H = w(() => S.parent ?? !1), U = w(() => x?.allValues() !== void 0), W = w(() => s.disabled() || te.disabled() || (x?.disabled() ?? !1) || (S.disabled ?? !1)), G = w(() => S.readOnly ?? !1), K = w(() => S.required ?? !1), q = w(() => s.name() ?? S.name), J = w(() => S.value ?? q()), Ae = w(() => N ? !!S.checked : Ce()), Y = w(() => !x || J() === void 0 || H() ? U() && H() ? x?.parent.checked() ?? !1 : Ae() : x.value().includes(J())), X = w(() => U() && H() && (x?.parent.indeterminate() ?? !1) || (S.indeterminate ?? !1)), je = () => x?.registerControlId !== l.registerControlId, Me = f(() => S.id || void 0, je() ? Se : k, je), Ne = w(() => V() ? Me() : A), Z = w(() => ({
|
|
59
|
+
...s.state(),
|
|
60
|
+
checked: Y(),
|
|
61
|
+
disabled: W(),
|
|
62
|
+
readOnly: G(),
|
|
63
|
+
required: K(),
|
|
64
|
+
indeterminate: X()
|
|
65
|
+
})), Pe = w(() => i(e.class, Z())), Fe = t(e, () => Z(), (e) => (() => {
|
|
66
|
+
var t = h(he);
|
|
67
|
+
return b(t, e, !1), v(), t;
|
|
68
|
+
})()), Ie = w(() => a(e.style, Z())), Le = w(() => n(Z(), fe(Z()))), Re = w(() => S["aria-labelledby"] ?? l.labelId() ?? De()), ze = w(() => l.getAriaDescribedBy(S["aria-describedby"])), Be = {
|
|
69
|
+
token: me,
|
|
70
|
+
id: Ne,
|
|
71
|
+
disabled: W,
|
|
72
|
+
element: P,
|
|
73
|
+
input: F,
|
|
74
|
+
parent: H,
|
|
75
|
+
value: J
|
|
76
|
+
}, Ve = {
|
|
77
|
+
id: A,
|
|
78
|
+
name: S.name,
|
|
79
|
+
value: Y,
|
|
80
|
+
getControl: () => P() ?? null
|
|
81
|
+
}, He = c(() => S.onBlur), Ue = c(() => S.onClick), We = c(() => S.onFocus), Ge = c(() => S.onKeyDown), Ke = c(() => S.onKeyUp);
|
|
82
|
+
function qe(e) {
|
|
83
|
+
if (R) {
|
|
84
|
+
e.preventDefault(), e.stopPropagation();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (Ue.call(e.currentTarget, e), e.baseUIHandlerPrevented || G() || W()) return;
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
let t = F();
|
|
90
|
+
t && be(t, e);
|
|
91
|
+
}
|
|
92
|
+
function Je(e) {
|
|
93
|
+
We.call(e.currentTarget, e), !e.baseUIHandlerPrevented && !W() && s.setFocused(!0);
|
|
94
|
+
}
|
|
95
|
+
function Ye(e) {
|
|
96
|
+
He.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (s.setTouched(!0), s.setFocused(!1), s.validationMode() === "onBlur" && s.validation.commit(x ? x.value() : Y()));
|
|
97
|
+
}
|
|
98
|
+
function Xe(e) {
|
|
99
|
+
Ge.call(e.currentTarget, e), !e.baseUIHandlerPrevented && (e.key === "Enter" ? (V() && nt(e.currentTarget), xe(e, F()?.form ?? null)) : !V() && e.key === " " && e.preventDefault());
|
|
100
|
+
}
|
|
101
|
+
function Ze(e) {
|
|
102
|
+
Ke.call(e.currentTarget, e), !(e.baseUIHandlerPrevented || V() || e.defaultPrevented || e.key !== " " || W() || G()) && be(e.currentTarget, e);
|
|
103
|
+
}
|
|
104
|
+
function Qe(e) {
|
|
105
|
+
if (e.stopPropagation(), e.defaultPrevented) {
|
|
106
|
+
queueMicrotask(Q);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
L = !0, et(e.currentTarget.checked, e), setTimeout(() => {
|
|
110
|
+
L = !1;
|
|
111
|
+
}, 0), queueMicrotask(Q);
|
|
112
|
+
}
|
|
113
|
+
function $e(e) {
|
|
114
|
+
if (L && e.isTrusted) {
|
|
115
|
+
L = !1;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (e.defaultPrevented) {
|
|
119
|
+
queueMicrotask(Q);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
et(e.currentTarget.checked, e), queueMicrotask(Q);
|
|
123
|
+
}
|
|
124
|
+
function et(e, t) {
|
|
125
|
+
if (G() || W()) {
|
|
126
|
+
t.preventDefault();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let n = o(r, t);
|
|
130
|
+
if (S.onCheckedChange?.(e, n), n.isCanceled) {
|
|
131
|
+
t.preventDefault();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let i = J();
|
|
135
|
+
if (U() && H()) {
|
|
136
|
+
x?.parent.changeParent(n) || t.preventDefault();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (U() && x && i !== void 0) {
|
|
140
|
+
x.parent.changeChild(i, e, n) || t.preventDefault();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (x && i !== void 0 && !H()) {
|
|
144
|
+
let r = e ? [...x.getValue(), i] : x.getValue().filter((e) => e !== i);
|
|
145
|
+
x.setValue(r, n) || t.preventDefault();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
N || we(e);
|
|
149
|
+
}
|
|
150
|
+
function Q() {
|
|
151
|
+
let e = F();
|
|
152
|
+
e && (e.checked = D(Y), e.indeterminate = D(X));
|
|
153
|
+
}
|
|
154
|
+
function tt() {
|
|
155
|
+
return P() ?? null;
|
|
156
|
+
}
|
|
157
|
+
function nt(e) {
|
|
158
|
+
B(), R = !0;
|
|
159
|
+
let t = e.ownerDocument, n = t.defaultView, r, i = n?.setTimeout(a, 1e3);
|
|
160
|
+
function a() {
|
|
161
|
+
R = !1, t.removeEventListener("keyup", o, !0), n?.removeEventListener("blur", a), r !== void 0 && clearTimeout(r), i !== void 0 && clearTimeout(i), B = () => void 0;
|
|
162
|
+
}
|
|
163
|
+
function o(e) {
|
|
164
|
+
e.key === "Enter" && (r = setTimeout(a, 0));
|
|
165
|
+
}
|
|
166
|
+
t.addEventListener("keyup", o, !0), n?.addEventListener("blur", a, { once: !0 }), B = a;
|
|
167
|
+
}
|
|
168
|
+
function $(e) {
|
|
169
|
+
z && z !== e && z.id === j && z.removeAttribute("id"), z !== e && (z = void 0);
|
|
170
|
+
}
|
|
171
|
+
return C(() => ({
|
|
172
|
+
explicit: S["aria-labelledby"],
|
|
173
|
+
fieldLabel: l.labelId(),
|
|
174
|
+
input: F(),
|
|
175
|
+
inputId: Me(),
|
|
176
|
+
nativeButton: V()
|
|
177
|
+
}), (e) => {
|
|
178
|
+
function t() {
|
|
179
|
+
if (e.explicit || e.fieldLabel || e.nativeButton || !e.input) {
|
|
180
|
+
$(), I(void 0);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
let t = e.input.closest("label") ?? e.input.labels?.[0];
|
|
184
|
+
if (!t) {
|
|
185
|
+
$(), I(void 0);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
$(t), t.id || (t.id = j, z = t), I(t.id || void 0);
|
|
189
|
+
}
|
|
190
|
+
if (t(), e.explicit || e.fieldLabel || e.nativeButton || !e.input || typeof MutationObserver > "u") return;
|
|
191
|
+
let n, r = new MutationObserver(() => {
|
|
192
|
+
t(), i();
|
|
193
|
+
});
|
|
194
|
+
function i() {
|
|
195
|
+
let t = e.input?.getRootNode();
|
|
196
|
+
!t || t === n || (r.disconnect(), n = t, r.observe(t, {
|
|
197
|
+
attributes: !0,
|
|
198
|
+
attributeFilter: ["for", "id"],
|
|
199
|
+
childList: !0,
|
|
200
|
+
subtree: !0
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
return i(), () => {
|
|
204
|
+
r.disconnect(), $();
|
|
205
|
+
};
|
|
206
|
+
}), C(() => x, (e) => e?.registerCheckbox(Be)), C(() => ({
|
|
207
|
+
group: x,
|
|
208
|
+
input: F(),
|
|
209
|
+
parent: H()
|
|
210
|
+
}), (e) => {
|
|
211
|
+
if (!e.input || e.parent) return;
|
|
212
|
+
let t = e.group?.fieldControlSource ?? O;
|
|
213
|
+
return s.validation.registerInput(t, e.input, tt);
|
|
214
|
+
}), C(() => ({
|
|
215
|
+
checked: Y(),
|
|
216
|
+
group: x,
|
|
217
|
+
indeterminate: X(),
|
|
218
|
+
input: F(),
|
|
219
|
+
name: q()
|
|
220
|
+
}), (e) => {
|
|
221
|
+
e.input && (e.input.indeterminate = e.indeterminate), e.group || s.setFilled(e.checked), !(e.group || e.checked === Oe) && (Oe = e.checked, D(() => {
|
|
222
|
+
ee.clearError(e.name), s.setDirty(e.checked !== s.validityData().initialValue), s.validation.change(e.checked);
|
|
223
|
+
}));
|
|
224
|
+
}), C(() => ({
|
|
225
|
+
disabled: W(),
|
|
226
|
+
group: x,
|
|
227
|
+
name: S.name,
|
|
228
|
+
root: P()
|
|
229
|
+
}), (e) => {
|
|
230
|
+
Ve.name = e.name, s.registerFieldControl(O, !e.group && !e.disabled && e.root ? Ve : void 0);
|
|
231
|
+
}), ue(() => {
|
|
232
|
+
x || s.setFilled(Y()), P();
|
|
233
|
+
}), le(() => {
|
|
234
|
+
B(), $(), s.registerFieldControl(O, void 0);
|
|
235
|
+
}), m(pe, {
|
|
236
|
+
value: Z,
|
|
237
|
+
get children() {
|
|
238
|
+
return [
|
|
239
|
+
m(Fe, _({
|
|
240
|
+
ref: [((e) => Te(e)), S.ref],
|
|
241
|
+
get id() {
|
|
242
|
+
return Ne();
|
|
243
|
+
},
|
|
244
|
+
get class() {
|
|
245
|
+
return Pe();
|
|
246
|
+
},
|
|
247
|
+
get style() {
|
|
248
|
+
return Ie();
|
|
249
|
+
},
|
|
250
|
+
get type() {
|
|
251
|
+
return V() ? "button" : void 0;
|
|
252
|
+
},
|
|
253
|
+
role: "checkbox",
|
|
254
|
+
get tabIndex() {
|
|
255
|
+
return W() ? -1 : 0;
|
|
256
|
+
},
|
|
257
|
+
get disabled() {
|
|
258
|
+
return V() && W() ? !0 : void 0;
|
|
259
|
+
},
|
|
260
|
+
get "aria-disabled"() {
|
|
261
|
+
return !V() && W() ? "true" : void 0;
|
|
262
|
+
},
|
|
263
|
+
get "aria-checked"() {
|
|
264
|
+
return g(() => !!X())() ? "mixed" : Y() ? "true" : "false";
|
|
265
|
+
},
|
|
266
|
+
get "aria-readonly"() {
|
|
267
|
+
return G() ? "true" : void 0;
|
|
268
|
+
},
|
|
269
|
+
get "aria-required"() {
|
|
270
|
+
return K() ? "true" : void 0;
|
|
271
|
+
},
|
|
272
|
+
get "aria-labelledby"() {
|
|
273
|
+
return Re();
|
|
274
|
+
},
|
|
275
|
+
get "aria-describedby"() {
|
|
276
|
+
return ze();
|
|
277
|
+
},
|
|
278
|
+
get "aria-invalid"() {
|
|
279
|
+
return Z().valid === !1 && !W() ? "true" : void 0;
|
|
280
|
+
},
|
|
281
|
+
get "data-parent"() {
|
|
282
|
+
return H() ? "" : void 0;
|
|
283
|
+
},
|
|
284
|
+
get "aria-controls"() {
|
|
285
|
+
return g(() => !!(U() && H()))() ? x?.parent.ariaControls() : void 0;
|
|
286
|
+
},
|
|
287
|
+
onBlur: Ye,
|
|
288
|
+
onClick: qe,
|
|
289
|
+
onFocus: Je,
|
|
290
|
+
onKeyDown: Xe,
|
|
291
|
+
onKeyUp: Ze
|
|
292
|
+
}, Le, ke)),
|
|
293
|
+
m(se, {
|
|
294
|
+
get when() {
|
|
295
|
+
return g(() => !!(!Y() && !x && q() && !H()))() ? S.uncheckedValue !== void 0 : !Y() && !x && q() && !H();
|
|
296
|
+
},
|
|
297
|
+
get children() {
|
|
298
|
+
var e = h(ge);
|
|
299
|
+
return ie(() => ({
|
|
300
|
+
e: S.form,
|
|
301
|
+
t: q(),
|
|
302
|
+
a: S.uncheckedValue,
|
|
303
|
+
o: W()
|
|
304
|
+
}), ({ e: t, t: n, a: r, o: i }, a) => {
|
|
305
|
+
t !== a?.e && y(e, "form", t), n !== a?.t && y(e, "name", n), oe(e, "value", r), i !== a?.o && y(e, "disabled", i);
|
|
306
|
+
}), e;
|
|
307
|
+
}
|
|
308
|
+
}),
|
|
309
|
+
(() => {
|
|
310
|
+
var e = h(_e);
|
|
311
|
+
return ae(() => [((e) => Ee(e)), S.inputRef], e), b(e, _({
|
|
312
|
+
type: "checkbox",
|
|
313
|
+
get form() {
|
|
314
|
+
return S.form;
|
|
315
|
+
},
|
|
316
|
+
get id() {
|
|
317
|
+
return V() ? void 0 : Me();
|
|
318
|
+
},
|
|
319
|
+
get name() {
|
|
320
|
+
return H() ? void 0 : q();
|
|
321
|
+
},
|
|
322
|
+
tabindex: -1,
|
|
323
|
+
get style() {
|
|
324
|
+
return q() ? ye : ve;
|
|
325
|
+
},
|
|
326
|
+
"aria-hidden": "true",
|
|
327
|
+
get "aria-describedby"() {
|
|
328
|
+
return ze();
|
|
329
|
+
},
|
|
330
|
+
get "aria-invalid"() {
|
|
331
|
+
return Z().valid === !1 && !W() ? "true" : void 0;
|
|
332
|
+
}
|
|
333
|
+
}, () => S.value === void 0 ? {} : { value: x && !Y() ? "" : S.value }, {
|
|
334
|
+
get disabled() {
|
|
335
|
+
return W();
|
|
336
|
+
},
|
|
337
|
+
get checked() {
|
|
338
|
+
return Y();
|
|
339
|
+
},
|
|
340
|
+
get required() {
|
|
341
|
+
return K();
|
|
342
|
+
},
|
|
343
|
+
onClick: Qe,
|
|
344
|
+
onChange: $e,
|
|
345
|
+
onFocus: () => P()?.focus({ preventScroll: !0 })
|
|
346
|
+
}), !1), v(), e;
|
|
347
|
+
})()
|
|
348
|
+
];
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
function be(e, t) {
|
|
353
|
+
let n = e.ownerDocument.defaultView;
|
|
354
|
+
if (!n) return;
|
|
355
|
+
let r = n.PointerEvent ?? n.MouseEvent;
|
|
356
|
+
e.dispatchEvent(new r("click", {
|
|
357
|
+
bubbles: !0,
|
|
358
|
+
cancelable: !0,
|
|
359
|
+
composed: !0,
|
|
360
|
+
detail: 0,
|
|
361
|
+
shiftKey: t.shiftKey,
|
|
362
|
+
ctrlKey: t.ctrlKey,
|
|
363
|
+
altKey: t.altKey,
|
|
364
|
+
metaKey: t.metaKey
|
|
365
|
+
}));
|
|
366
|
+
}
|
|
367
|
+
function xe(e, t) {
|
|
368
|
+
e.defaultPrevented || queueMicrotask(() => {
|
|
369
|
+
e.defaultPrevented || A(t)?.click();
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function A(e) {
|
|
373
|
+
if (!e) return null;
|
|
374
|
+
for (let t of e.elements) if ((t.tagName === "BUTTON" || t.tagName === "INPUT") && t.type === "submit") return t;
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/checkbox/indicator/CheckboxIndicator.tsx
|
|
379
|
+
var j = /* @__PURE__ */ x("<span>");
|
|
380
|
+
function M(e) {
|
|
381
|
+
let r, o = !1, c = me(), l = e, ne = ce(e, "render", "class", "keepMounted", "ref", "style"), u = w(() => c().checked || c().indeterminate), d = te(() => u()), f = w(() => (l.keepMounted ?? !1) || d.mounted()), p = w(() => ({
|
|
382
|
+
...c(),
|
|
383
|
+
transitionStatus: d.transitionStatus()
|
|
384
|
+
})), re = t(e, () => p(), (e) => (() => {
|
|
385
|
+
var t = h(j);
|
|
386
|
+
return b(t, e, !1), v(), t;
|
|
387
|
+
})()), ie = w(() => f() ? i(e.class, p()) : void 0), g = w(() => f() ? a(e.style, p()) : void 0), ae = w(() => n(p(), {
|
|
388
|
+
...fe(p()),
|
|
389
|
+
...s
|
|
390
|
+
}));
|
|
391
|
+
return C(() => ({
|
|
392
|
+
element: r,
|
|
393
|
+
rendered: u(),
|
|
394
|
+
status: d.transitionStatus()
|
|
395
|
+
}), (e) => {
|
|
396
|
+
if (o = e.rendered, e.rendered || e.status !== "ending" || !e.element) return;
|
|
397
|
+
let t = new AbortController();
|
|
398
|
+
return ee(e.element, () => {
|
|
399
|
+
o || d.setMounted(!1);
|
|
400
|
+
}, t.signal), () => t.abort();
|
|
401
|
+
}), m(se, {
|
|
402
|
+
get when() {
|
|
403
|
+
return f();
|
|
404
|
+
},
|
|
405
|
+
get children() {
|
|
406
|
+
return m(re, _({
|
|
407
|
+
ref: [l.ref, ((e) => r = e)],
|
|
408
|
+
get class() {
|
|
409
|
+
return ie();
|
|
410
|
+
},
|
|
411
|
+
get style() {
|
|
412
|
+
return g();
|
|
413
|
+
}
|
|
414
|
+
}, ae, ne));
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/checkbox/index.parts.ts
|
|
420
|
+
var Se = /* @__PURE__ */ e({
|
|
421
|
+
Indicator: () => M,
|
|
422
|
+
Root: () => k
|
|
423
|
+
});
|
|
424
|
+
//#endregion
|
|
425
|
+
export { Se as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../checkbox-group-
|
|
1
|
+
import { t as e } from "../checkbox-group-CwMDoSTK.js";
|
|
2
2
|
export { e as CheckboxGroup };
|
|
@@ -0,0 +1,135 @@
|
|
|
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 { fieldStateAttributesMapping as i } from "./internals/field-constants.js";
|
|
5
|
+
import { n as a } from "./FieldRootContext-izCEh80D.js";
|
|
6
|
+
import { n as o } from "./FormContext-CwLBtm_d.js";
|
|
7
|
+
import { r as s } from "./LabelableContext-CmQF-TX2.js";
|
|
8
|
+
import { t as ee } from "./createLabelableId-DxJRwMUJ.js";
|
|
9
|
+
import { t as c } from "./CheckboxGroupContext-1CRRHK0T.js";
|
|
10
|
+
import { createComponent as l, getNextElement as te, mergeProps as ne, runHydrationEvents as u, spread as d, template as f } from "@solidjs/web";
|
|
11
|
+
import { createEffect as p, createMemo as m, createSignal as h, createUniqueId as g, omit as _, onCleanup as v, onSettled as y, untrack as b } from "solid-js";
|
|
12
|
+
//#region src/checkbox-group/CheckboxGroup.tsx
|
|
13
|
+
var re = /* @__PURE__ */ f("<div>"), x = [];
|
|
14
|
+
function S(f) {
|
|
15
|
+
let S = a(!0), T = o(), E = s(), [D, O] = h(0);
|
|
16
|
+
ee(() => null, "");
|
|
17
|
+
let k = f, A = f, j = Symbol("CheckboxGroup"), M = `base-ui-${g()}`, N = `base-ui-${g()}`, P = b(() => k.value !== void 0), [F, I] = h(() => [...b(() => k.defaultValue) ?? x]), [L, R] = h(), [z, B] = h("mixed"), V = /* @__PURE__ */ new Map(), H = b(() => P ? k.value ?? x : F()), U = H, W = H, G = _(A, "aria-describedby", "aria-labelledby", "allValues", "render", "class", "defaultValue", "disabled", "onValueChange", "ref", "style", "value"), K = m(() => P ? k.value ?? x : F()), q = m(() => S.disabled() || (k.disabled ?? !1)), J = m(() => ({
|
|
18
|
+
...S.state(),
|
|
19
|
+
disabled: q()
|
|
20
|
+
})), Y = m(() => n(f.class, J())), ie = e(f, () => J(), (e) => (() => {
|
|
21
|
+
var t = te(re);
|
|
22
|
+
return d(t, e, !1), u(), t;
|
|
23
|
+
})()), ae = m(() => r(f.style, J())), oe = m(() => t(J(), i)), se = m(() => k["aria-labelledby"] ?? E.labelId()), ce = m(() => E.getAriaDescribedBy(k["aria-describedby"])), le = m(() => K().length === (k.allValues ?? x).length), ue = m(() => K().length > 0 && K().length !== (k.allValues ?? x).length), de = m(() => (D(), (k.allValues ?? x).map((e) => Array.from(V.values()).find((t) => !t.parent() && t.value() === e)?.id()).filter(Boolean).join(" ") || void 0));
|
|
24
|
+
function fe(e) {
|
|
25
|
+
return V.set(e.token, e), O((e) => e + 1), () => {
|
|
26
|
+
V.delete(e.token), O((e) => e + 1);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function X(e, t) {
|
|
30
|
+
return k.onValueChange?.(e, t), !t.isCanceled && (P || (U = e, I(e)), !0);
|
|
31
|
+
}
|
|
32
|
+
function Z(e) {
|
|
33
|
+
for (let t of V.values()) if (!t.parent() && t.value() === e) return t.disabled();
|
|
34
|
+
return !1;
|
|
35
|
+
}
|
|
36
|
+
function pe(e) {
|
|
37
|
+
let t = k.allValues ?? x, n = t.filter((e) => Z(e) && H.includes(e)), r = t.filter((e) => !Z(e) || H.includes(e)), i = H.length === r.length || H.length === 0, a, o = "mixed";
|
|
38
|
+
return i ? a = Q().length === r.length ? n : r : z() === "mixed" ? (a = r, o = "on") : z() === "on" ? (a = n, o = "off") : a = H, X(a, e) ? (i || B(o), !0) : !1;
|
|
39
|
+
}
|
|
40
|
+
function me(e, t, n) {
|
|
41
|
+
let r = Q().slice();
|
|
42
|
+
if (t) r.push(e);
|
|
43
|
+
else {
|
|
44
|
+
let t = r.indexOf(e);
|
|
45
|
+
t !== -1 && r.splice(t, 1);
|
|
46
|
+
}
|
|
47
|
+
return X(r, n) ? (H = r, B("mixed"), !0) : !1;
|
|
48
|
+
}
|
|
49
|
+
function he() {
|
|
50
|
+
let e = T.formElement();
|
|
51
|
+
if (!e) return Q();
|
|
52
|
+
let t = /* @__PURE__ */ new Set();
|
|
53
|
+
for (let n of V.values()) {
|
|
54
|
+
let r = n.input(), i = n.value();
|
|
55
|
+
r && !n.parent() && i !== void 0 && r.checked && w(r, e) && t.add(i);
|
|
56
|
+
}
|
|
57
|
+
return Q().filter((e) => t.has(e));
|
|
58
|
+
}
|
|
59
|
+
function Q() {
|
|
60
|
+
return P ? K() : U;
|
|
61
|
+
}
|
|
62
|
+
let $ = {
|
|
63
|
+
id: M,
|
|
64
|
+
name: void 0,
|
|
65
|
+
value: K,
|
|
66
|
+
getValue: he,
|
|
67
|
+
getControl: () => S.validation.getInputControl()
|
|
68
|
+
}, ge = {
|
|
69
|
+
allValues: () => k.allValues,
|
|
70
|
+
disabled: q,
|
|
71
|
+
fieldControlSource: j,
|
|
72
|
+
registerControlId: E.registerControlId,
|
|
73
|
+
getValue: Q,
|
|
74
|
+
parent: {
|
|
75
|
+
id: N,
|
|
76
|
+
checked: le,
|
|
77
|
+
indeterminate: ue,
|
|
78
|
+
ariaControls: de,
|
|
79
|
+
changeParent: pe,
|
|
80
|
+
changeChild: me
|
|
81
|
+
},
|
|
82
|
+
registerCheckbox: fe,
|
|
83
|
+
setValue: X,
|
|
84
|
+
value: K
|
|
85
|
+
};
|
|
86
|
+
return p(() => ({
|
|
87
|
+
disabled: q(),
|
|
88
|
+
element: L(),
|
|
89
|
+
id: k.id ?? M,
|
|
90
|
+
name: S.name()
|
|
91
|
+
}), (e) => {
|
|
92
|
+
$.id = e.id, $.name = e.name, S.registerFieldControl(j, e.name && !e.disabled && e.element ? $ : void 0);
|
|
93
|
+
}), p(() => ({
|
|
94
|
+
initialValue: S.validityData().initialValue,
|
|
95
|
+
name: S.name(),
|
|
96
|
+
value: K()
|
|
97
|
+
}), (e) => {
|
|
98
|
+
e.value !== W && (W = e.value, U = e.value, b(() => {
|
|
99
|
+
T.clearError(e.name), S.setFilled(e.value.length > 0), S.setDirty(!C(e.value, e.initialValue)), S.validation.change(e.value);
|
|
100
|
+
}));
|
|
101
|
+
}), y(() => {
|
|
102
|
+
S.setFilled(K().length > 0);
|
|
103
|
+
}), v(() => S.registerFieldControl(j, void 0)), l(c, {
|
|
104
|
+
value: ge,
|
|
105
|
+
get children() {
|
|
106
|
+
return l(ie, ne({
|
|
107
|
+
ref: [((e) => R(e)), k.ref],
|
|
108
|
+
get class() {
|
|
109
|
+
return Y();
|
|
110
|
+
},
|
|
111
|
+
get style() {
|
|
112
|
+
return ae();
|
|
113
|
+
},
|
|
114
|
+
role: "group",
|
|
115
|
+
get "aria-labelledby"() {
|
|
116
|
+
return se();
|
|
117
|
+
},
|
|
118
|
+
get "aria-describedby"() {
|
|
119
|
+
return ce();
|
|
120
|
+
},
|
|
121
|
+
get "aria-invalid"() {
|
|
122
|
+
return J().valid === !1 && !q() ? "true" : void 0;
|
|
123
|
+
}
|
|
124
|
+
}, oe, G));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function C(e, t) {
|
|
129
|
+
return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => e === t[n]);
|
|
130
|
+
}
|
|
131
|
+
function w(e, t) {
|
|
132
|
+
return e.matches(":disabled") ? !1 : e.form === t || e.form === null && !e.hasAttribute("form");
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
export { S as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../collapsible-
|
|
1
|
+
import { t as e } from "../collapsible-t8YReaIp.js";
|
|
2
2
|
export { e as Collapsible };
|