solid-baseui 0.1.0-alpha.0
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/LICENSE +26 -0
- package/README.md +150 -0
- package/dist/lib/client/CSPContext-faVzToiT.js +10 -0
- package/dist/lib/client/CheckboxGroupContext-1CRRHK0T.js +8 -0
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +518 -0
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +136 -0
- package/dist/lib/client/DirectionContext-BwMabICS.js +7 -0
- package/dist/lib/client/FieldControl-Bc-z2og6.js +116 -0
- package/dist/lib/client/FieldItemContext-Bwzf-4tL.js +7 -0
- package/dist/lib/client/FieldRootContext-izCEh80D.js +32 -0
- package/dist/lib/client/FieldsetRootContext-BgThSAcd.js +13 -0
- package/dist/lib/client/FloatingTree-23B7KKPD.js +83 -0
- package/dist/lib/client/FocusManager-grSdNHqW.js +360 -0
- package/dist/lib/client/FormContext-BB05lWOI.js +16 -0
- package/dist/lib/client/InternalBackdrop-cSK13gaM.js +160 -0
- package/dist/lib/client/LabelableContext-DKsB0fIx.js +48 -0
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +1570 -0
- package/dist/lib/client/MenubarContext-BYt3fkt-.js +13 -0
- package/dist/lib/client/PopupHandle-CcJG4NMy.js +101 -0
- package/dist/lib/client/PopupStore-DjB-wO88.js +468 -0
- package/dist/lib/client/PopupViewport-DgrIqQea.js +152 -0
- package/dist/lib/client/RadioGroupContext-CZexBsPa.js +9 -0
- package/dist/lib/client/Separator-9DboD_Si.js +25 -0
- package/dist/lib/client/ToggleGroupContext-_THxLgJU.js +9 -0
- package/dist/lib/client/ToolbarGroupContext-Dpc3_mFx.js +9 -0
- package/dist/lib/client/ToolbarItemOwnerContext-DtVqVnSE.js +9 -0
- package/dist/lib/client/ToolbarRootContext-88yZoAOy.js +13 -0
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +56 -0
- package/dist/lib/client/accordion/index.js +2 -0
- package/dist/lib/client/accordion-sOXt9AlG.js +399 -0
- package/dist/lib/client/alert-dialog/index.js +2 -0
- package/dist/lib/client/alert-dialog-BH_3ndio.js +30 -0
- package/dist/lib/client/autocomplete/index.js +2 -0
- package/dist/lib/client/autocomplete-Cob_FZEP.js +113 -0
- package/dist/lib/client/avatar/index.js +2 -0
- package/dist/lib/client/avatar-AF9vyD4q.js +146 -0
- package/dist/lib/client/button/index.js +2 -0
- package/dist/lib/client/button-DpUi-2g8.js +82 -0
- package/dist/lib/client/buttonSemantics-paljfpOX.js +39 -0
- package/dist/lib/client/checkbox/index.js +2 -0
- package/dist/lib/client/checkbox-BbAwOptH.js +441 -0
- package/dist/lib/client/checkbox-group/index.js +2 -0
- package/dist/lib/client/checkbox-group-CSSp_805.js +128 -0
- package/dist/lib/client/collapsible/index.js +2 -0
- package/dist/lib/client/collapsible-BIbje_ub.js +232 -0
- package/dist/lib/client/combobox/index.js +2 -0
- package/dist/lib/client/combobox-8O-vgTLL.js +352 -0
- package/dist/lib/client/compositeNavigation-sxniYTc7.js +58 -0
- package/dist/lib/client/constants-BYjBUIIi.js +424 -0
- package/dist/lib/client/context-menu/index.js +2 -0
- package/dist/lib/client/context-menu-BTMkXtrs.js +217 -0
- package/dist/lib/client/createAnchorPositioning-DcxDXUgB.js +1058 -0
- package/dist/lib/client/createAnchoredPopupScrollLock-Cx0cbh1_.js +19 -0
- package/dist/lib/client/createClickInteraction-CTaIFBiV.js +45 -0
- package/dist/lib/client/createCollapsiblePanel-DeDu0O2t.js +231 -0
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +50 -0
- package/dist/lib/client/createPopupAutoResize-CGNiLhGq.js +60 -0
- package/dist/lib/client/createTransitionStatus-B1L-whed.js +53 -0
- package/dist/lib/client/csp-provider/index.js +2 -0
- package/dist/lib/client/csp-provider-C7nRHDKK.js +16 -0
- package/dist/lib/client/dialog/index.js +2 -0
- package/dist/lib/client/dialog-DkaQwIgP.js +19 -0
- package/dist/lib/client/direction-provider/index.js +3 -0
- package/dist/lib/client/direction-provider-DYhRN-8f.js +13 -0
- package/dist/lib/client/dom-BEAeQ9Eb.js +58 -0
- package/dist/lib/client/drawer/index.js +2 -0
- package/dist/lib/client/drawer-Ce2cChLt.js +1550 -0
- package/dist/lib/client/field/index.js +2 -0
- package/dist/lib/client/field-C-o7jzKW.js +469 -0
- package/dist/lib/client/fieldset/index.js +2 -0
- package/dist/lib/client/fieldset-BQTAWv2L.js +65 -0
- package/dist/lib/client/form/index.js +2 -0
- package/dist/lib/client/form-BINBiW5L.js +106 -0
- package/dist/lib/client/form-types-DFBxc1LF.js +8 -0
- package/dist/lib/client/index.js +43 -0
- package/dist/lib/client/input/index.js +2 -0
- package/dist/lib/client/input-gb0ejxkm.js +7 -0
- package/dist/lib/client/internals/composeEventHandlers.js +50 -0
- package/dist/lib/client/internals/createBaseUIEventDetails.js +31 -0
- package/dist/lib/client/internals/csp-context/index.js +2 -0
- package/dist/lib/client/internals/direction-context/index.js +2 -0
- package/dist/lib/client/internals/field-constants.js +56 -0
- package/dist/lib/client/internals/field-root-context/index.js +2 -0
- package/dist/lib/client/internals/form-context/index.js +2 -0
- package/dist/lib/client/internals/getStateAttributesProps.js +21 -0
- package/dist/lib/client/internals/labelable-provider/index.js +19 -0
- package/dist/lib/client/internals/mergeStyles.js +9 -0
- package/dist/lib/client/internals/reasons.js +2 -0
- package/dist/lib/client/internals/stateAttributesMapping.js +8 -0
- package/dist/lib/client/internals/types.js +0 -0
- package/dist/lib/client/menu/index.js +2 -0
- package/dist/lib/client/menu-DeMT08oD.js +326 -0
- package/dist/lib/client/menubar/index.js +2 -0
- package/dist/lib/client/menubar-C4aomSYv.js +185 -0
- package/dist/lib/client/mergeStyleValue-C4ITiiIV.js +42 -0
- package/dist/lib/client/meter/index.js +2 -0
- package/dist/lib/client/meter-xSU37Q0m.js +171 -0
- package/dist/lib/client/navigation-menu/index.js +2 -0
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +1083 -0
- package/dist/lib/client/number-field/index.js +2 -0
- package/dist/lib/client/number-field-B8CsTb_8.js +1035 -0
- package/dist/lib/client/otp-field/index.js +2 -0
- package/dist/lib/client/otp-field-DBkMcnog.js +582 -0
- package/dist/lib/client/platform-Bk5Q32mf.js +13 -0
- package/dist/lib/client/popover/index.js +2 -0
- package/dist/lib/client/popover-CQwyp-fs.js +929 -0
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +367 -0
- package/dist/lib/client/preview-card/index.js +2 -0
- package/dist/lib/client/preview-card-D_2Q8lpC.js +625 -0
- package/dist/lib/client/progress/index.js +2 -0
- package/dist/lib/client/progress-D7r0xAC9.js +188 -0
- package/dist/lib/client/radio/index.js +2 -0
- package/dist/lib/client/radio-CzGQ81z1.js +299 -0
- package/dist/lib/client/radio-group/index.js +2 -0
- package/dist/lib/client/radio-group-DpHlBKA6.js +193 -0
- package/dist/lib/client/reasons-Co5CzjKq.js +41 -0
- package/dist/lib/client/resolveStyle-XcgAuaKR.js +11 -0
- package/dist/lib/client/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +48 -0
- package/dist/lib/client/safePolygon--bbKn0c8.js +316 -0
- package/dist/lib/client/scroll-area/index.js +2 -0
- package/dist/lib/client/scroll-area-CffM4U0R.js +701 -0
- package/dist/lib/client/scrollable-SRNYlhF7.js +42 -0
- package/dist/lib/client/select/index.js +2 -0
- package/dist/lib/client/select-IFhiEg73.js +1940 -0
- package/dist/lib/client/separator/index.js +2 -0
- package/dist/lib/client/setRef-fXF6OIo3.js +7 -0
- package/dist/lib/client/slider/index.js +2 -0
- package/dist/lib/client/slider-BCagYmGp.js +921 -0
- package/dist/lib/client/switch/index.js +2 -0
- package/dist/lib/client/switch-RIJeDnvS.js +308 -0
- package/dist/lib/client/tabs/index.js +2 -0
- package/dist/lib/client/tabs-fOAKs7r3.js +696 -0
- package/dist/lib/client/toast/index.js +2 -0
- package/dist/lib/client/toast-D2P8UqUs.js +1108 -0
- package/dist/lib/client/toggle/index.js +2 -0
- package/dist/lib/client/toggle-group/index.js +2 -0
- package/dist/lib/client/toggle-group-0Aue0owJ.js +129 -0
- package/dist/lib/client/toggle-momVEIBL.js +138 -0
- package/dist/lib/client/toolbar/index.js +2 -0
- package/dist/lib/client/toolbar-Du22aKCv.js +492 -0
- package/dist/lib/client/tooltip/index.js +2 -0
- package/dist/lib/client/tooltip-CyK61fl1.js +844 -0
- package/dist/lib/client/types/index.js +0 -0
- package/dist/lib/client/useFilteredItems-DTekHz39.js +2223 -0
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +13 -0
- package/dist/lib/server/CSPContext-DOxR0PO7.js +10 -0
- package/dist/lib/server/CheckboxGroupContext-DTP679kK.js +8 -0
- package/dist/lib/server/DialogHandle-ATZlm9RC.js +689 -0
- package/dist/lib/server/DialogPopup-BebI-w5P.js +159 -0
- package/dist/lib/server/DirectionContext-YORWLF08.js +10 -0
- package/dist/lib/server/FieldControl-Y_kI7ARp.js +174 -0
- package/dist/lib/server/FieldItemContext-x-C7ZlmX.js +7 -0
- package/dist/lib/server/FieldRootContext-IC-LWzVp.js +34 -0
- package/dist/lib/server/FieldsetRootContext-DyNqCjK6.js +14 -0
- package/dist/lib/server/FloatingTree-z1JPD1dR.js +101 -0
- package/dist/lib/server/FocusManager-BrbZVWME.js +538 -0
- package/dist/lib/server/FormContext-pvESt85v.js +17 -0
- package/dist/lib/server/InternalBackdrop-C_iDPVR-.js +260 -0
- package/dist/lib/server/LabelableContext-DZP3rgAY.js +59 -0
- package/dist/lib/server/MenuSubmenuTrigger-DA4gsv6z.js +2072 -0
- package/dist/lib/server/MenubarContext-C-62rMnO.js +14 -0
- package/dist/lib/server/PopupHandle-DthPgNjy.js +115 -0
- package/dist/lib/server/PopupStore-DEs3FAEe.js +645 -0
- package/dist/lib/server/PopupViewport-3r_KTFwX.js +220 -0
- package/dist/lib/server/RadioGroupContext-D5xmTkDz.js +10 -0
- package/dist/lib/server/Separator-vhhYxWGr.js +31 -0
- package/dist/lib/server/ToggleGroupContext-COor8gYc.js +10 -0
- package/dist/lib/server/ToolbarGroupContext-CzdHxijX.js +10 -0
- package/dist/lib/server/ToolbarItemOwnerContext-L5dsZ_vS.js +10 -0
- package/dist/lib/server/ToolbarRootContext-DD-qe7s8.js +14 -0
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +63 -0
- package/dist/lib/server/accordion/index.js +566 -0
- package/dist/lib/server/alert-dialog/index.js +36 -0
- package/dist/lib/server/autocomplete/index.js +173 -0
- package/dist/lib/server/avatar/index.js +199 -0
- package/dist/lib/server/button/index.js +119 -0
- package/dist/lib/server/buttonSemantics-BSwDxJhh.js +49 -0
- package/dist/lib/server/checkbox/index.js +537 -0
- package/dist/lib/server/checkbox-group/index.js +198 -0
- package/dist/lib/server/collapsible/index.js +307 -0
- package/dist/lib/server/combobox/index.js +480 -0
- package/dist/lib/server/compositeNavigation-BRVT1C38.js +68 -0
- package/dist/lib/server/constants-9H__9xbS.js +706 -0
- package/dist/lib/server/context-menu/index.js +263 -0
- package/dist/lib/server/createAnchorPositioning-C-cVOPwz.js +381 -0
- package/dist/lib/server/createAnchoredPopupScrollLock-DFuUrykR.js +20 -0
- package/dist/lib/server/createClickInteraction-BYsMgvup.js +68 -0
- package/dist/lib/server/createCollapsiblePanel-DTyVJz0G.js +297 -0
- package/dist/lib/server/createFocusInteraction-EIS0QOel.js +77 -0
- package/dist/lib/server/createPopupAutoResize-DO50jjNX.js +111 -0
- package/dist/lib/server/createTransitionStatus-BTlrerSS.js +61 -0
- package/dist/lib/server/csp-provider/index.js +15 -0
- package/dist/lib/server/dialog/index.js +19 -0
- package/dist/lib/server/direction-provider/index.js +13 -0
- package/dist/lib/server/dom-Crg_2R-j.js +67 -0
- package/dist/lib/server/drawer/index.js +2351 -0
- package/dist/lib/server/field/index.js +677 -0
- package/dist/lib/server/fieldset/index.js +91 -0
- package/dist/lib/server/form/index.js +136 -0
- package/dist/lib/server/form-types-P7-SCWyr.js +8 -0
- package/dist/lib/server/index.js +43 -0
- package/dist/lib/server/input/index.js +11 -0
- package/dist/lib/server/internals/composeEventHandlers.js +60 -0
- package/dist/lib/server/internals/createBaseUIEventDetails.js +33 -0
- package/dist/lib/server/internals/csp-context/index.js +2 -0
- package/dist/lib/server/internals/direction-context/index.js +2 -0
- package/dist/lib/server/internals/field-constants.js +64 -0
- package/dist/lib/server/internals/field-root-context/index.js +2 -0
- package/dist/lib/server/internals/form-context/index.js +2 -0
- package/dist/lib/server/internals/getStateAttributesProps.js +23 -0
- package/dist/lib/server/internals/labelable-provider/index.js +20 -0
- package/dist/lib/server/internals/mergeStyles.js +15 -0
- package/dist/lib/server/internals/reasons.js +76 -0
- package/dist/lib/server/internals/stateAttributesMapping.js +15 -0
- package/dist/lib/server/internals/types.js +1 -0
- package/dist/lib/server/menu/index.js +423 -0
- package/dist/lib/server/menubar/index.js +242 -0
- package/dist/lib/server/mergeStyleValue-Db8bRCM4.js +67 -0
- package/dist/lib/server/meter/index.js +217 -0
- package/dist/lib/server/navigation-menu/index.js +1436 -0
- package/dist/lib/server/number-field/index.js +1497 -0
- package/dist/lib/server/otp-field/index.js +811 -0
- package/dist/lib/server/platform-DYukKUir.js +13 -0
- package/dist/lib/server/popover/index.js +1187 -0
- package/dist/lib/server/popupStateMapping-nKoUwoke.js +459 -0
- package/dist/lib/server/preview-card/index.js +797 -0
- package/dist/lib/server/progress/index.js +252 -0
- package/dist/lib/server/radio/index.js +364 -0
- package/dist/lib/server/radio-group/index.js +282 -0
- package/dist/lib/server/resolveStyle-XCSFDHAL.js +11 -0
- package/dist/lib/server/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/lib/server/runOnceAnimationsFinish-DCHzXWZU.js +59 -0
- package/dist/lib/server/safePolygon-CAm5RJGv.js +474 -0
- package/dist/lib/server/scroll-area/index.js +993 -0
- package/dist/lib/server/scrollable-CjsSxbGr.js +54 -0
- package/dist/lib/server/select/index.js +2630 -0
- package/dist/lib/server/separator/index.js +2 -0
- package/dist/lib/server/setRef-Bt70sW7c.js +7 -0
- package/dist/lib/server/slider/index.js +1333 -0
- package/dist/lib/server/switch/index.js +389 -0
- package/dist/lib/server/tabs/index.js +1007 -0
- package/dist/lib/server/toast/index.js +1588 -0
- package/dist/lib/server/toggle/index.js +201 -0
- package/dist/lib/server/toggle-group/index.js +192 -0
- package/dist/lib/server/toolbar/index.js +685 -0
- package/dist/lib/server/tooltip/index.js +1092 -0
- package/dist/lib/server/types/index.js +1 -0
- package/dist/lib/server/useFilteredItems-DvuctLt3.js +3157 -0
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +20 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +12 -0
- package/dist/lib/types/accordion/index.d.ts +6 -0
- package/dist/lib/types/accordion/index.parts.d.ts +5 -0
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +29 -0
- package/dist/lib/types/accordion/item/AccordionItemContext.d.ts +22 -0
- package/dist/lib/types/accordion/item/AccordionItemDataAttributes.d.ts +5 -0
- package/dist/lib/types/accordion/item/stateAttributesMapping.d.ts +13 -0
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +20 -0
- package/dist/lib/types/accordion/panel/AccordionPanelCssVars.d.ts +4 -0
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +46 -0
- package/dist/lib/types/accordion/root/AccordionRootContext.d.ts +22 -0
- package/dist/lib/types/accordion/root/stateAttributesMapping.d.ts +3 -0
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +27 -0
- package/dist/lib/types/accordion/trigger/AccordionTriggerDataAttributes.d.ts +4 -0
- package/dist/lib/types/alert-dialog/handle.d.ts +6 -0
- package/dist/lib/types/alert-dialog/index.d.ts +10 -0
- package/dist/lib/types/alert-dialog/index.parts.d.ts +10 -0
- package/dist/lib/types/alert-dialog/root/AlertDialogRoot.d.ts +29 -0
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +19 -0
- package/dist/lib/types/autocomplete/index.d.ts +24 -0
- package/dist/lib/types/autocomplete/index.parts.d.ts +23 -0
- package/dist/lib/types/autocomplete/input-group/AutocompleteInputGroup.d.ts +26 -0
- package/dist/lib/types/autocomplete/item/AutocompleteItem.d.ts +18 -0
- package/dist/lib/types/autocomplete/root/AutocompleteRoot.d.ts +195 -0
- package/dist/lib/types/autocomplete/root/utils/useFilter.d.ts +9 -0
- package/dist/lib/types/autocomplete/separator/AutocompleteSeparator.d.ts +17 -0
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +24 -0
- package/dist/lib/types/autocomplete/value/AutocompleteValue.d.ts +15 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +16 -0
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +17 -0
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +10 -0
- package/dist/lib/types/avatar/index.d.ts +4 -0
- package/dist/lib/types/avatar/index.parts.d.ts +3 -0
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +13 -0
- package/dist/lib/types/avatar/root/AvatarRootContext.d.ts +10 -0
- package/dist/lib/types/button/Button.d.ts +34 -0
- package/dist/lib/types/button/index.d.ts +2 -0
- package/dist/lib/types/checkbox/index.d.ts +3 -0
- package/dist/lib/types/checkbox/index.parts.d.ts +2 -0
- package/dist/lib/types/checkbox/indicator/CheckboxIndicator.d.ts +20 -0
- package/dist/lib/types/checkbox/root/CheckboxRoot.d.ts +56 -0
- package/dist/lib/types/checkbox/root/CheckboxRootContext.d.ts +7 -0
- package/dist/lib/types/checkbox/utils/getCheckboxStateAttributesMapping.d.ts +3 -0
- package/dist/lib/types/checkbox-group/CheckboxGroup.d.ts +32 -0
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +30 -0
- package/dist/lib/types/checkbox-group/index.d.ts +2 -0
- package/dist/lib/types/collapsible/index.d.ts +4 -0
- package/dist/lib/types/collapsible/index.parts.d.ts +3 -0
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +25 -0
- package/dist/lib/types/collapsible/panel/createCollapsiblePanel.d.ts +26 -0
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +34 -0
- package/dist/lib/types/collapsible/root/CollapsibleRootContext.d.ts +19 -0
- package/dist/lib/types/collapsible/root/createCollapsibleTransitionStatus.d.ts +9 -0
- package/dist/lib/types/collapsible/root/stateAttributesMapping.d.ts +14 -0
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +28 -0
- package/dist/lib/types/combobox/arrow/ComboboxArrow.d.ts +16 -0
- package/dist/lib/types/combobox/backdrop/ComboboxBackdrop.d.ts +14 -0
- package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +17 -0
- package/dist/lib/types/combobox/chip/ComboboxChipContext.d.ts +8 -0
- package/dist/lib/types/combobox/chip-remove/ComboboxChipRemove.d.ts +26 -0
- package/dist/lib/types/combobox/chips/ComboboxChips.d.ts +16 -0
- package/dist/lib/types/combobox/chips/ComboboxChipsContext.d.ts +26 -0
- package/dist/lib/types/combobox/clear/ComboboxClear.d.ts +35 -0
- package/dist/lib/types/combobox/collection/ComboboxCollection.d.ts +19 -0
- package/dist/lib/types/combobox/empty/ComboboxEmpty.d.ts +16 -0
- package/dist/lib/types/combobox/group/ComboboxGroup.d.ts +19 -0
- package/dist/lib/types/combobox/group/ComboboxGroupContext.d.ts +9 -0
- package/dist/lib/types/combobox/group-label/ComboboxGroupLabel.d.ts +11 -0
- package/dist/lib/types/combobox/icon/ComboboxIcon.d.ts +12 -0
- package/dist/lib/types/combobox/index.d.ts +29 -0
- package/dist/lib/types/combobox/index.parts.d.ts +28 -0
- package/dist/lib/types/combobox/input/ComboboxInput.d.ts +36 -0
- package/dist/lib/types/combobox/input-group/ComboboxInputGroup.d.ts +24 -0
- package/dist/lib/types/combobox/item/ComboboxItem.d.ts +40 -0
- package/dist/lib/types/combobox/item/ComboboxItemContext.d.ts +9 -0
- package/dist/lib/types/combobox/item-indicator/ComboboxItemIndicator.d.ts +22 -0
- package/dist/lib/types/combobox/label/ComboboxLabel.d.ts +22 -0
- package/dist/lib/types/combobox/list/ComboboxList.d.ts +24 -0
- package/dist/lib/types/combobox/popup/ComboboxPopup.d.ts +35 -0
- package/dist/lib/types/combobox/portal/ComboboxPortal.d.ts +25 -0
- package/dist/lib/types/combobox/portal/ComboboxPortalContext.d.ts +5 -0
- package/dist/lib/types/combobox/positioner/ComboboxPositioner.d.ts +37 -0
- package/dist/lib/types/combobox/positioner/ComboboxPositionerContext.d.ts +11 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +82 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +180 -0
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +99 -0
- package/dist/lib/types/combobox/root/utils/useFilter.d.ts +25 -0
- package/dist/lib/types/combobox/root/utils/useFilteredItems.d.ts +5 -0
- package/dist/lib/types/combobox/row/ComboboxRow.d.ts +14 -0
- package/dist/lib/types/combobox/row/ComboboxRowContext.d.ts +3 -0
- package/dist/lib/types/combobox/separator/ComboboxSeparator.d.ts +21 -0
- package/dist/lib/types/combobox/status/ComboboxStatus.d.ts +17 -0
- package/dist/lib/types/combobox/store/ComboboxItemRegistry.d.ts +39 -0
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +65 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +36 -0
- package/dist/lib/types/combobox/types.d.ts +15 -0
- package/dist/lib/types/combobox/utils/ComboboxInternalDismissButton.d.ts +9 -0
- package/dist/lib/types/combobox/utils/comboboxPopupId.d.ts +5 -0
- package/dist/lib/types/combobox/utils/createInitialLiveRegionTextMutation.d.ts +7 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +7 -0
- package/dist/lib/types/combobox/utils/parts.d.ts +4 -0
- package/dist/lib/types/combobox/utils/stateAttributesMapping.d.ts +58 -0
- package/dist/lib/types/combobox/value/ComboboxValue.d.ts +20 -0
- package/dist/lib/types/context-menu/index.d.ts +19 -0
- package/dist/lib/types/context-menu/index.parts.d.ts +19 -0
- package/dist/lib/types/context-menu/root/ContextMenuRoot.d.ts +21 -0
- package/dist/lib/types/context-menu/root/ContextMenuRootContext.d.ts +19 -0
- package/dist/lib/types/context-menu/trigger/ContextMenuTrigger.d.ts +21 -0
- package/dist/lib/types/csp-provider/CSPProvider.d.ts +14 -0
- package/dist/lib/types/csp-provider/index.d.ts +2 -0
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +18 -0
- package/dist/lib/types/dialog/close/DialogClose.d.ts +26 -0
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +11 -0
- package/dist/lib/types/dialog/index.d.ts +10 -0
- package/dist/lib/types/dialog/index.parts.d.ts +10 -0
- package/dist/lib/types/dialog/popup/DialogPopup.d.ts +24 -0
- package/dist/lib/types/dialog/portal/DialogPortal.d.ts +17 -0
- package/dist/lib/types/dialog/portal/DialogPortalContext.d.ts +8 -0
- package/dist/lib/types/dialog/root/DialogRoot.d.ts +44 -0
- package/dist/lib/types/dialog/root/DialogRootContext.d.ts +38 -0
- package/dist/lib/types/dialog/store/DialogHandle.d.ts +11 -0
- package/dist/lib/types/dialog/store/DialogStore.d.ts +20 -0
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +11 -0
- package/dist/lib/types/dialog/trigger/DialogTrigger.d.ts +30 -0
- package/dist/lib/types/dialog/utils/mergeDialogStyles.d.ts +2 -0
- package/dist/lib/types/dialog/utils/stateAttributesMapping.d.ts +20 -0
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +16 -0
- package/dist/lib/types/direction-provider/DirectionProvider.d.ts +13 -0
- package/dist/lib/types/direction-provider/index.d.ts +4 -0
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +24 -0
- package/dist/lib/types/drawer/backdrop/DrawerBackdropCssVars.d.ts +7 -0
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +14 -0
- package/dist/lib/types/drawer/content/DrawerContentDataAttributes.d.ts +1 -0
- package/dist/lib/types/drawer/handle.d.ts +14 -0
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +16 -0
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +23 -0
- package/dist/lib/types/drawer/index.d.ts +17 -0
- package/dist/lib/types/drawer/index.parts.d.ts +16 -0
- package/dist/lib/types/drawer/popup/DrawerPopup.d.ts +46 -0
- package/dist/lib/types/drawer/popup/DrawerPopupCssVars.d.ts +37 -0
- package/dist/lib/types/drawer/popup/DrawerPopupDataAttributes.d.ts +25 -0
- package/dist/lib/types/drawer/provider/DrawerProvider.d.ts +15 -0
- package/dist/lib/types/drawer/provider/DrawerProviderContext.d.ts +21 -0
- package/dist/lib/types/drawer/root/DrawerRoot.d.ts +65 -0
- package/dist/lib/types/drawer/root/DrawerRootContext.d.ts +68 -0
- package/dist/lib/types/drawer/root/createDrawerSnapPoints.d.ts +24 -0
- package/dist/lib/types/drawer/swipe-area/DrawerSwipeArea.d.ts +43 -0
- package/dist/lib/types/drawer/swipe-area/DrawerSwipeAreaDataAttributes.d.ts +15 -0
- package/dist/lib/types/drawer/viewport/DrawerViewport.d.ts +31 -0
- package/dist/lib/types/drawer/viewport/DrawerViewportContext.d.ts +12 -0
- package/dist/lib/types/drawer/viewport/DrawerViewportCssVars.d.ts +8 -0
- package/dist/lib/types/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardContext.d.ts +14 -0
- package/dist/lib/types/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardProvider.d.ts +14 -0
- package/dist/lib/types/field/control/FieldControl.d.ts +35 -0
- package/dist/lib/types/field/description/FieldDescription.d.ts +16 -0
- package/dist/lib/types/field/error/FieldError.d.ts +19 -0
- package/dist/lib/types/field/index.d.ts +8 -0
- package/dist/lib/types/field/index.parts.d.ts +8 -0
- package/dist/lib/types/field/item/FieldItem.d.ts +16 -0
- package/dist/lib/types/field/item/FieldItemContext.d.ts +6 -0
- package/dist/lib/types/field/label/FieldLabel.d.ts +24 -0
- package/dist/lib/types/field/root/FieldRoot.d.ts +30 -0
- package/dist/lib/types/field/root/createFieldValidation.d.ts +22 -0
- package/dist/lib/types/field/validity/FieldValidity.d.ts +16 -0
- package/dist/lib/types/fieldset/index.d.ts +3 -0
- package/dist/lib/types/fieldset/index.parts.d.ts +2 -0
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +21 -0
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +21 -0
- package/dist/lib/types/fieldset/root/FieldsetRootContext.d.ts +11 -0
- package/dist/lib/types/form/Form.d.ts +39 -0
- package/dist/lib/types/form/index.d.ts +2 -0
- package/dist/lib/types/index.d.ts +41 -0
- package/dist/lib/types/input/Input.d.ts +20 -0
- package/dist/lib/types/input/index.d.ts +2 -0
- package/dist/lib/types/internals/buttonSemantics.d.ts +10 -0
- package/dist/lib/types/internals/clamp.d.ts +1 -0
- package/dist/lib/types/internals/composeEventHandlers.d.ts +11 -0
- package/dist/lib/types/internals/constants.d.ts +4 -0
- package/dist/lib/types/internals/createBaseUIEventDetails.d.ts +57 -0
- package/dist/lib/types/internals/createTransitionStatus.d.ts +9 -0
- package/dist/lib/types/internals/csp-context/CSPContext.d.ts +7 -0
- package/dist/lib/types/internals/csp-context/index.d.ts +2 -0
- package/dist/lib/types/internals/direction-context/DirectionContext.d.ts +6 -0
- package/dist/lib/types/internals/direction-context/index.d.ts +2 -0
- package/dist/lib/types/internals/field-constants.d.ts +44 -0
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +31 -0
- package/dist/lib/types/internals/field-root-context/index.d.ts +2 -0
- package/dist/lib/types/internals/filter.d.ts +18 -0
- package/dist/lib/types/internals/form-context/FormContext.d.ts +13 -0
- package/dist/lib/types/internals/form-context/index.d.ts +3 -0
- package/dist/lib/types/internals/form-types.d.ts +11 -0
- package/dist/lib/types/internals/getStateAttributesProps.d.ts +4 -0
- package/dist/lib/types/internals/installOwnedEventHandlers.d.ts +3 -0
- package/dist/lib/types/internals/isSolidAccessor.d.ts +6 -0
- package/dist/lib/types/internals/itemEquality.d.ts +17 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +18 -0
- package/dist/lib/types/internals/labelable-provider/LabelableProvider.d.ts +11 -0
- package/dist/lib/types/internals/labelable-provider/index.d.ts +2 -0
- package/dist/lib/types/internals/mergeStyleValue.d.ts +8 -0
- package/dist/lib/types/internals/mergeStyles.d.ts +6 -0
- package/dist/lib/types/internals/overlay/FloatingRootStore.d.ts +49 -0
- package/dist/lib/types/internals/overlay/FloatingTree.d.ts +48 -0
- package/dist/lib/types/internals/overlay/FocusGuard.d.ts +2 -0
- package/dist/lib/types/internals/overlay/FocusManager.d.ts +30 -0
- package/dist/lib/types/internals/overlay/InternalBackdrop.d.ts +6 -0
- package/dist/lib/types/internals/overlay/PopupHandle.d.ts +47 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +37 -0
- package/dist/lib/types/internals/overlay/PopupStore.d.ts +89 -0
- package/dist/lib/types/internals/overlay/PopupTriggerMap.d.ts +11 -0
- package/dist/lib/types/internals/overlay/PopupViewport.d.ts +16 -0
- package/dist/lib/types/internals/overlay/ReactiveStore.d.ts +26 -0
- package/dist/lib/types/internals/overlay/TriggerFocusGuards.d.ts +14 -0
- package/dist/lib/types/internals/overlay/adaptiveOrigin.d.ts +2 -0
- package/dist/lib/types/internals/overlay/compositeNavigation.d.ts +20 -0
- package/dist/lib/types/internals/overlay/createAnchorPositioning.d.ts +57 -0
- package/dist/lib/types/internals/overlay/createAnchoredPopupScrollLock.d.ts +12 -0
- package/dist/lib/types/internals/overlay/createClickInteraction.d.ts +20 -0
- package/dist/lib/types/internals/overlay/createClientPoint.d.ts +12 -0
- package/dist/lib/types/internals/overlay/createContextMenuInteraction.d.ts +17 -0
- package/dist/lib/types/internals/overlay/createDelayGroup.d.ts +18 -0
- package/dist/lib/types/internals/overlay/createDismiss.d.ts +27 -0
- package/dist/lib/types/internals/overlay/createFloatingPosition.d.ts +22 -0
- package/dist/lib/types/internals/overlay/createFocusInteraction.d.ts +14 -0
- package/dist/lib/types/internals/overlay/createHoverInteraction.d.ts +30 -0
- package/dist/lib/types/internals/overlay/createInitialPositioning.d.ts +3 -0
- package/dist/lib/types/internals/overlay/createListNavigation.d.ts +26 -0
- package/dist/lib/types/internals/overlay/createPopupAutoResize.d.ts +18 -0
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +18 -0
- package/dist/lib/types/internals/overlay/createSwipeDismiss.d.ts +107 -0
- package/dist/lib/types/internals/overlay/createTypeahead.d.ts +20 -0
- package/dist/lib/types/internals/overlay/dom.d.ts +19 -0
- package/dist/lib/types/internals/overlay/eventEmitter.d.ts +7 -0
- package/dist/lib/types/internals/overlay/getElementAtPoint.d.ts +8 -0
- package/dist/lib/types/internals/overlay/index.d.ts +37 -0
- package/dist/lib/types/internals/overlay/inlineRect.d.ts +32 -0
- package/dist/lib/types/internals/overlay/markOthers.d.ts +6 -0
- package/dist/lib/types/internals/overlay/popupStateMapping.d.ts +46 -0
- package/dist/lib/types/internals/overlay/safePolygon.d.ts +24 -0
- package/dist/lib/types/internals/overlay/scrollLock.d.ts +10 -0
- package/dist/lib/types/internals/overlay/tabbable.d.ts +11 -0
- package/dist/lib/types/internals/platform.d.ts +1 -0
- package/dist/lib/types/internals/reason-parts.d.ts +35 -0
- package/dist/lib/types/internals/reasons.d.ts +4 -0
- package/dist/lib/types/internals/resolveClass.d.ts +3 -0
- package/dist/lib/types/internals/resolveStyle.d.ts +3 -0
- package/dist/lib/types/internals/runOnceAnimationsFinish.d.ts +4 -0
- package/dist/lib/types/internals/scrollable.d.ts +18 -0
- package/dist/lib/types/internals/setRef.d.ts +2 -0
- package/dist/lib/types/internals/stateAttributesMapping.d.ts +8 -0
- package/dist/lib/types/internals/types.d.ts +2 -0
- package/dist/lib/types/internals/valueLabel.d.ts +28 -0
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +7 -0
- package/dist/lib/types/menu/arrow/MenuArrow.d.ts +16 -0
- package/dist/lib/types/menu/backdrop/MenuBackdrop.d.ts +14 -0
- package/dist/lib/types/menu/checkbox-item/MenuCheckboxItem.d.ts +37 -0
- package/dist/lib/types/menu/checkbox-item/MenuCheckboxItemContext.d.ts +6 -0
- package/dist/lib/types/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.d.ts +18 -0
- package/dist/lib/types/menu/group/MenuGroup.d.ts +11 -0
- package/dist/lib/types/menu/group/MenuGroupContext.d.ts +9 -0
- package/dist/lib/types/menu/group-label/MenuGroupLabel.d.ts +11 -0
- package/dist/lib/types/menu/index.d.ts +20 -0
- package/dist/lib/types/menu/index.parts.d.ts +21 -0
- package/dist/lib/types/menu/item/MenuItem.d.ts +28 -0
- package/dist/lib/types/menu/item/createMenuItem.d.ts +24 -0
- package/dist/lib/types/menu/link-item/MenuLinkItem.d.ts +25 -0
- package/dist/lib/types/menu/popup/MenuPopup.d.ts +28 -0
- package/dist/lib/types/menu/portal/MenuPortal.d.ts +17 -0
- package/dist/lib/types/menu/portal/MenuPortalContext.d.ts +8 -0
- package/dist/lib/types/menu/positioner/MenuPositioner.d.ts +39 -0
- package/dist/lib/types/menu/positioner/MenuPositionerContext.d.ts +5 -0
- package/dist/lib/types/menu/radio-group/MenuRadioGroup.d.ts +24 -0
- package/dist/lib/types/menu/radio-group/MenuRadioGroupContext.d.ts +11 -0
- package/dist/lib/types/menu/radio-item/MenuRadioItem.d.ts +30 -0
- package/dist/lib/types/menu/radio-item/MenuRadioItemContext.d.ts +6 -0
- package/dist/lib/types/menu/radio-item-indicator/MenuRadioItemIndicator.d.ts +18 -0
- package/dist/lib/types/menu/root/MenuRoot.d.ts +56 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +23 -0
- package/dist/lib/types/menu/store/MenuCollection.d.ts +19 -0
- package/dist/lib/types/menu/store/MenuHandle.d.ts +10 -0
- package/dist/lib/types/menu/store/MenuStore.d.ts +110 -0
- package/dist/lib/types/menu/submenu-root/MenuSubmenuRoot.d.ts +17 -0
- package/dist/lib/types/menu/submenu-root/MenuSubmenuRootContext.d.ts +8 -0
- package/dist/lib/types/menu/submenu-trigger/MenuSubmenuTrigger.d.ts +33 -0
- package/dist/lib/types/menu/trigger/MenuTrigger.d.ts +36 -0
- package/dist/lib/types/menu/utils/mergeMenuStyles.d.ts +2 -0
- package/dist/lib/types/menu/utils/stateAttributesMapping.d.ts +39 -0
- package/dist/lib/types/menu/viewport/MenuViewport.d.ts +15 -0
- package/dist/lib/types/menubar/Menubar.d.ts +23 -0
- package/dist/lib/types/menubar/MenubarContext.d.ts +34 -0
- package/dist/lib/types/menubar/index.d.ts +2 -0
- package/dist/lib/types/meter/index.d.ts +6 -0
- package/dist/lib/types/meter/index.parts.d.ts +5 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +12 -0
- package/dist/lib/types/meter/label/MeterLabel.d.ts +17 -0
- package/dist/lib/types/meter/root/MeterRoot.d.ts +28 -0
- package/dist/lib/types/meter/root/MeterRootContext.d.ts +12 -0
- package/dist/lib/types/meter/track/MeterTrack.d.ts +12 -0
- package/dist/lib/types/meter/value/MeterValue.d.ts +16 -0
- package/dist/lib/types/navigation-menu/arrow/NavigationMenuArrow.d.ts +16 -0
- package/dist/lib/types/navigation-menu/backdrop/NavigationMenuBackdrop.d.ts +14 -0
- package/dist/lib/types/navigation-menu/composite/NavigationMenuCompositeContext.d.ts +22 -0
- package/dist/lib/types/navigation-menu/content/NavigationMenuContent.d.ts +21 -0
- package/dist/lib/types/navigation-menu/icon/NavigationMenuIcon.d.ts +12 -0
- package/dist/lib/types/navigation-menu/index.d.ts +14 -0
- package/dist/lib/types/navigation-menu/index.parts.d.ts +13 -0
- package/dist/lib/types/navigation-menu/item/NavigationMenuItem.d.ts +15 -0
- package/dist/lib/types/navigation-menu/item/NavigationMenuItemContext.d.ts +8 -0
- package/dist/lib/types/navigation-menu/link/NavigationMenuLink.d.ts +20 -0
- package/dist/lib/types/navigation-menu/list/NavigationMenuList.d.ts +12 -0
- package/dist/lib/types/navigation-menu/popup/NavigationMenuPopup.d.ts +23 -0
- package/dist/lib/types/navigation-menu/portal/NavigationMenuPortal.d.ts +17 -0
- package/dist/lib/types/navigation-menu/portal/NavigationMenuPortalContext.d.ts +8 -0
- package/dist/lib/types/navigation-menu/positioner/NavigationMenuPositioner.d.ts +37 -0
- package/dist/lib/types/navigation-menu/positioner/NavigationMenuPositionerContext.d.ts +5 -0
- package/dist/lib/types/navigation-menu/root/NavigationMenuRoot.d.ts +39 -0
- package/dist/lib/types/navigation-menu/root/NavigationMenuRootContext.d.ts +19 -0
- package/dist/lib/types/navigation-menu/store/NavigationMenuStore.d.ts +64 -0
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +27 -0
- package/dist/lib/types/navigation-menu/utils/mergeNavigationMenuStyles.d.ts +2 -0
- package/dist/lib/types/navigation-menu/viewport/NavigationMenuViewport.d.ts +11 -0
- package/dist/lib/types/number-field/decrement/NumberFieldDecrement.d.ts +12 -0
- package/dist/lib/types/number-field/group/NumberFieldGroup.d.ts +12 -0
- package/dist/lib/types/number-field/increment/NumberFieldIncrement.d.ts +12 -0
- package/dist/lib/types/number-field/increment/NumberFieldStepperButton.d.ts +26 -0
- package/dist/lib/types/number-field/index.d.ts +8 -0
- package/dist/lib/types/number-field/index.parts.d.ts +7 -0
- package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +25 -0
- package/dist/lib/types/number-field/root/NumberFieldRoot.d.ts +55 -0
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +39 -0
- package/dist/lib/types/number-field/root/createPressAndHold.d.ts +24 -0
- package/dist/lib/types/number-field/scrub-area/NumberFieldScrubArea.d.ts +20 -0
- package/dist/lib/types/number-field/scrub-area/NumberFieldScrubAreaContext.d.ts +13 -0
- package/dist/lib/types/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.d.ts +12 -0
- package/dist/lib/types/number-field/utils/format.d.ts +2 -0
- package/dist/lib/types/number-field/utils/getViewportRect.d.ts +6 -0
- package/dist/lib/types/number-field/utils/parse.d.ts +40 -0
- package/dist/lib/types/number-field/utils/platform.d.ts +3 -0
- package/dist/lib/types/number-field/utils/stateAttributesMapping.d.ts +10 -0
- package/dist/lib/types/number-field/utils/types.d.ts +16 -0
- package/dist/lib/types/number-field/utils/validate.d.ts +9 -0
- package/dist/lib/types/otp-field/index.d.ts +3 -0
- package/dist/lib/types/otp-field/index.parts.d.ts +3 -0
- package/dist/lib/types/otp-field/input/OTPFieldInput.d.ts +29 -0
- package/dist/lib/types/otp-field/root/OTPFieldRoot.d.ts +56 -0
- package/dist/lib/types/otp-field/root/OTPFieldRootContext.d.ts +45 -0
- package/dist/lib/types/otp-field/utils/otp.d.ts +14 -0
- package/dist/lib/types/otp-field/utils/stateAttributesMapping.d.ts +5 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +16 -0
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +14 -0
- package/dist/lib/types/popover/close/PopoverClose.d.ts +25 -0
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +11 -0
- package/dist/lib/types/popover/index.d.ts +12 -0
- package/dist/lib/types/popover/index.parts.d.ts +12 -0
- package/dist/lib/types/popover/popup/PopoverPopup.d.ts +26 -0
- package/dist/lib/types/popover/portal/PopoverPortal.d.ts +17 -0
- package/dist/lib/types/popover/portal/PopoverPortalContext.d.ts +8 -0
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +38 -0
- package/dist/lib/types/popover/positioner/PopoverPositionerContext.d.ts +5 -0
- package/dist/lib/types/popover/root/PopoverRoot.d.ts +38 -0
- package/dist/lib/types/popover/root/PopoverRootContext.d.ts +25 -0
- package/dist/lib/types/popover/store/PopoverHandle.d.ts +10 -0
- package/dist/lib/types/popover/store/PopoverStore.d.ts +65 -0
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +11 -0
- package/dist/lib/types/popover/trigger/PopoverTrigger.d.ts +33 -0
- package/dist/lib/types/popover/utils/ClosePartContext.d.ts +10 -0
- package/dist/lib/types/popover/utils/mergePopoverStyles.d.ts +2 -0
- package/dist/lib/types/popover/utils/stateAttributesMapping.d.ts +26 -0
- package/dist/lib/types/popover/viewport/PopoverViewport.d.ts +15 -0
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +16 -0
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +14 -0
- package/dist/lib/types/preview-card/index.d.ts +9 -0
- package/dist/lib/types/preview-card/index.parts.d.ts +9 -0
- package/dist/lib/types/preview-card/popup/PreviewCardPopup.d.ts +23 -0
- package/dist/lib/types/preview-card/portal/PreviewCardPortal.d.ts +17 -0
- package/dist/lib/types/preview-card/portal/PreviewCardPortalContext.d.ts +8 -0
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +38 -0
- package/dist/lib/types/preview-card/positioner/PreviewCardPositionerContext.d.ts +5 -0
- package/dist/lib/types/preview-card/root/PreviewCardRoot.d.ts +37 -0
- package/dist/lib/types/preview-card/root/PreviewCardRootContext.d.ts +12 -0
- package/dist/lib/types/preview-card/store/PreviewCardHandle.d.ts +10 -0
- package/dist/lib/types/preview-card/store/PreviewCardStore.d.ts +34 -0
- package/dist/lib/types/preview-card/trigger/PreviewCardTrigger.d.ts +20 -0
- package/dist/lib/types/preview-card/utils/mergePreviewCardStyles.d.ts +2 -0
- package/dist/lib/types/preview-card/utils/stateAttributesMapping.d.ts +32 -0
- package/dist/lib/types/preview-card/viewport/PreviewCardViewport.d.ts +14 -0
- package/dist/lib/types/progress/index.d.ts +6 -0
- package/dist/lib/types/progress/index.parts.d.ts +6 -0
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +12 -0
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +17 -0
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +31 -0
- package/dist/lib/types/progress/root/ProgressRootContext.d.ts +13 -0
- package/dist/lib/types/progress/root/stateAttributesMapping.d.ts +3 -0
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +12 -0
- package/dist/lib/types/progress/value/ProgressValue.d.ts +16 -0
- package/dist/lib/types/radio/index.d.ts +3 -0
- package/dist/lib/types/radio/index.parts.d.ts +2 -0
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +20 -0
- package/dist/lib/types/radio/root/RadioRoot.d.ts +39 -0
- package/dist/lib/types/radio/root/RadioRootContext.d.ts +7 -0
- package/dist/lib/types/radio-group/RadioGroup.d.ts +43 -0
- package/dist/lib/types/radio-group/RadioGroupContext.d.ts +33 -0
- package/dist/lib/types/radio-group/index.d.ts +2 -0
- package/dist/lib/types/scroll-area/constants.d.ts +2 -0
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +12 -0
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +11 -0
- package/dist/lib/types/scroll-area/index.d.ts +7 -0
- package/dist/lib/types/scroll-area/index.parts.d.ts +6 -0
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +58 -0
- package/dist/lib/types/scroll-area/root/ScrollAreaRootContext.d.ts +44 -0
- package/dist/lib/types/scroll-area/root/stateAttributes.d.ts +3 -0
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +28 -0
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbarContext.d.ts +7 -0
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +22 -0
- package/dist/lib/types/scroll-area/utils/dom.d.ts +2 -0
- package/dist/lib/types/scroll-area/utils/eventTarget.d.ts +2 -0
- package/dist/lib/types/scroll-area/utils/getOffset.d.ts +1 -0
- package/dist/lib/types/scroll-area/utils/scrollEdges.d.ts +1 -0
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +22 -0
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewportContext.d.ts +7 -0
- package/dist/lib/types/select/arrow/SelectArrow.d.ts +16 -0
- package/dist/lib/types/select/backdrop/SelectBackdrop.d.ts +14 -0
- package/dist/lib/types/select/group/SelectGroup.d.ts +11 -0
- package/dist/lib/types/select/group/SelectGroupContext.d.ts +9 -0
- package/dist/lib/types/select/group-label/SelectGroupLabel.d.ts +11 -0
- package/dist/lib/types/select/icon/SelectIcon.d.ts +12 -0
- package/dist/lib/types/select/index.d.ts +20 -0
- package/dist/lib/types/select/index.parts.d.ts +19 -0
- package/dist/lib/types/select/item/SelectItem.d.ts +32 -0
- package/dist/lib/types/select/item/SelectItemContext.d.ts +12 -0
- package/dist/lib/types/select/item-indicator/SelectItemIndicator.d.ts +18 -0
- package/dist/lib/types/select/item-text/SelectItemText.d.ts +11 -0
- package/dist/lib/types/select/label/SelectLabel.d.ts +17 -0
- package/dist/lib/types/select/list/SelectList.d.ts +16 -0
- package/dist/lib/types/select/popup/SelectPopup.d.ts +26 -0
- package/dist/lib/types/select/portal/SelectPortal.d.ts +16 -0
- package/dist/lib/types/select/portal/SelectPortalContext.d.ts +4 -0
- package/dist/lib/types/select/positioner/SelectPositioner.d.ts +37 -0
- package/dist/lib/types/select/positioner/SelectPositionerContext.d.ts +16 -0
- package/dist/lib/types/select/root/SelectRoot.d.ts +52 -0
- package/dist/lib/types/select/root/SelectRootContext.d.ts +63 -0
- package/dist/lib/types/select/scroll-arrow/SelectScrollArrow.d.ts +22 -0
- package/dist/lib/types/select/scroll-down-arrow/SelectScrollDownArrow.d.ts +15 -0
- package/dist/lib/types/select/scroll-up-arrow/SelectScrollUpArrow.d.ts +15 -0
- package/dist/lib/types/select/separator/SelectSeparator.d.ts +17 -0
- package/dist/lib/types/select/store/SelectCollection.d.ts +25 -0
- package/dist/lib/types/select/store/SelectStore.d.ts +82 -0
- package/dist/lib/types/select/trigger/SelectTrigger.d.ts +35 -0
- package/dist/lib/types/select/types.d.ts +10 -0
- package/dist/lib/types/select/utils/equality.d.ts +2 -0
- package/dist/lib/types/select/utils/mergeSelectStyles.d.ts +1 -0
- package/dist/lib/types/select/utils/scrollEdges.d.ts +3 -0
- package/dist/lib/types/select/utils/stateAttributesMapping.d.ts +37 -0
- package/dist/lib/types/select/utils/value.d.ts +7 -0
- package/dist/lib/types/select/value/SelectValue.d.ts +18 -0
- package/dist/lib/types/separator/Separator.d.ts +19 -0
- package/dist/lib/types/separator/index.d.ts +2 -0
- package/dist/lib/types/slider/control/SliderControl.d.ts +18 -0
- package/dist/lib/types/slider/index.d.ts +8 -0
- package/dist/lib/types/slider/index.parts.d.ts +7 -0
- package/dist/lib/types/slider/indicator/SliderIndicator.d.ts +12 -0
- package/dist/lib/types/slider/label/SliderLabel.d.ts +17 -0
- package/dist/lib/types/slider/root/SliderRoot.d.ts +57 -0
- package/dist/lib/types/slider/root/SliderRootContext.d.ts +63 -0
- package/dist/lib/types/slider/stateAttributesMapping.d.ts +14 -0
- package/dist/lib/types/slider/thumb/SliderThumb.d.ts +31 -0
- package/dist/lib/types/slider/thumb/SliderThumbDataAttributes.d.ts +11 -0
- package/dist/lib/types/slider/thumb/prehydrationScript.d.ts +1 -0
- package/dist/lib/types/slider/track/SliderTrack.d.ts +12 -0
- package/dist/lib/types/slider/utils/dom.d.ts +4 -0
- package/dist/lib/types/slider/utils/getPushedThumbValues.d.ts +1 -0
- package/dist/lib/types/slider/utils/getSliderValue.d.ts +1 -0
- package/dist/lib/types/slider/utils/math.d.ts +4 -0
- package/dist/lib/types/slider/utils/resolveThumbCollision.d.ts +7 -0
- package/dist/lib/types/slider/utils/roundValueToStep.d.ts +2 -0
- package/dist/lib/types/slider/utils/validateMinimumDistance.d.ts +1 -0
- package/dist/lib/types/slider/value/SliderValue.d.ts +16 -0
- package/dist/lib/types/switch/index.d.ts +3 -0
- package/dist/lib/types/switch/index.parts.d.ts +2 -0
- package/dist/lib/types/switch/root/SwitchRoot.d.ts +55 -0
- package/dist/lib/types/switch/root/SwitchRootContext.d.ts +7 -0
- package/dist/lib/types/switch/stateAttributesMapping.d.ts +9 -0
- package/dist/lib/types/switch/thumb/SwitchThumb.d.ts +12 -0
- package/dist/lib/types/tabs/index.d.ts +6 -0
- package/dist/lib/types/tabs/index.parts.d.ts +5 -0
- package/dist/lib/types/tabs/indicator/TabsIndicator.d.ts +22 -0
- package/dist/lib/types/tabs/indicator/TabsIndicatorCssVars.d.ts +8 -0
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -0
- package/dist/lib/types/tabs/list/TabsList.d.ts +21 -0
- package/dist/lib/types/tabs/list/TabsListContext.d.ts +14 -0
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +30 -0
- package/dist/lib/types/tabs/panel/TabsPanelDataAttributes.d.ts +6 -0
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +38 -0
- package/dist/lib/types/tabs/root/TabsRootContext.d.ts +43 -0
- package/dist/lib/types/tabs/root/TabsRootDataAttributes.d.ts +4 -0
- package/dist/lib/types/tabs/root/stateAttributesMapping.d.ts +8 -0
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +59 -0
- package/dist/lib/types/tabs/tab/TabsTabDataAttributes.d.ts +6 -0
- package/dist/lib/types/toast/action/ToastAction.d.ts +30 -0
- package/dist/lib/types/toast/arrow/ToastArrow.d.ts +18 -0
- package/dist/lib/types/toast/close/ToastClose.d.ts +29 -0
- package/dist/lib/types/toast/content/ToastContent.d.ts +15 -0
- package/dist/lib/types/toast/createToastManager.d.ts +15 -0
- package/dist/lib/types/toast/description/ToastDescription.d.ts +16 -0
- package/dist/lib/types/toast/index.d.ts +17 -0
- package/dist/lib/types/toast/index.parts.d.ts +11 -0
- package/dist/lib/types/toast/portal/ToastPortal.d.ts +20 -0
- package/dist/lib/types/toast/positioner/ToastPositioner.d.ts +42 -0
- package/dist/lib/types/toast/positioner/ToastPositionerContext.d.ts +6 -0
- package/dist/lib/types/toast/provider/ToastProvider.d.ts +28 -0
- package/dist/lib/types/toast/provider/ToastProviderContext.d.ts +5 -0
- package/dist/lib/types/toast/root/ToastRoot.d.ts +39 -0
- package/dist/lib/types/toast/root/ToastRootContext.d.ts +14 -0
- package/dist/lib/types/toast/store/ToastStore.d.ts +60 -0
- package/dist/lib/types/toast/title/ToastTitle.d.ts +13 -0
- package/dist/lib/types/toast/types.d.ts +77 -0
- package/dist/lib/types/toast/useToastManager.d.ts +11 -0
- package/dist/lib/types/toast/utils/createToastLabelPart.d.ts +17 -0
- package/dist/lib/types/toast/utils/focusVisible.d.ts +6 -0
- package/dist/lib/types/toast/utils/generateToastId.d.ts +5 -0
- package/dist/lib/types/toast/utils/isRenderableNode.d.ts +6 -0
- package/dist/lib/types/toast/utils/mergeToastStyles.d.ts +2 -0
- package/dist/lib/types/toast/utils/resolvePromiseOptions.d.ts +2 -0
- package/dist/lib/types/toast/viewport/ToastViewport.d.ts +13 -0
- package/dist/lib/types/toggle/Toggle.d.ts +40 -0
- package/dist/lib/types/toggle/index.d.ts +2 -0
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +37 -0
- package/dist/lib/types/toggle-group/ToggleGroupContext.d.ts +25 -0
- package/dist/lib/types/toggle-group/index.d.ts +2 -0
- package/dist/lib/types/toolbar/ToolbarItemOwnerContext.d.ts +10 -0
- package/dist/lib/types/toolbar/button/ToolbarButton.d.ts +32 -0
- package/dist/lib/types/toolbar/createToolbarItem.d.ts +13 -0
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +16 -0
- package/dist/lib/types/toolbar/group/ToolbarGroupContext.d.ts +8 -0
- package/dist/lib/types/toolbar/index.d.ts +8 -0
- package/dist/lib/types/toolbar/index.parts.d.ts +7 -0
- package/dist/lib/types/toolbar/input/ToolbarInput.d.ts +29 -0
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +14 -0
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +29 -0
- package/dist/lib/types/toolbar/root/ToolbarRootContext.d.ts +23 -0
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +16 -0
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +17 -0
- package/dist/lib/types/tooltip/index.d.ts +9 -0
- package/dist/lib/types/tooltip/index.parts.d.ts +9 -0
- package/dist/lib/types/tooltip/popup/TooltipPopup.d.ts +23 -0
- package/dist/lib/types/tooltip/portal/TooltipPortal.d.ts +17 -0
- package/dist/lib/types/tooltip/portal/TooltipPortalContext.d.ts +8 -0
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +37 -0
- package/dist/lib/types/tooltip/positioner/TooltipPositionerContext.d.ts +14 -0
- package/dist/lib/types/tooltip/provider/TooltipProvider.d.ts +15 -0
- package/dist/lib/types/tooltip/provider/TooltipProviderContext.d.ts +10 -0
- package/dist/lib/types/tooltip/root/TooltipRoot.d.ts +40 -0
- package/dist/lib/types/tooltip/root/TooltipRootContext.d.ts +11 -0
- package/dist/lib/types/tooltip/store/TooltipHandle.d.ts +10 -0
- package/dist/lib/types/tooltip/store/TooltipStore.d.ts +60 -0
- package/dist/lib/types/tooltip/trigger/TooltipTrigger.d.ts +35 -0
- package/dist/lib/types/tooltip/utils/mergeTooltipStyles.d.ts +2 -0
- package/dist/lib/types/tooltip/utils/stateAttributesMapping.d.ts +68 -0
- package/dist/lib/types/tooltip/viewport/TooltipViewport.d.ts +14 -0
- package/dist/lib/types/types/index.d.ts +29 -0
- package/package.json +583 -0
|
@@ -0,0 +1,1007 @@
|
|
|
1
|
+
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { getStateAttributesProps } from "../internals/getStateAttributesProps.js";
|
|
3
|
+
import { C as missing, p as initial, s as disabled, w as none } from "../internals/reasons.js";
|
|
4
|
+
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
5
|
+
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
6
|
+
import { transitionStatusMapping } from "../internals/stateAttributesMapping.js";
|
|
7
|
+
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
8
|
+
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-DCHzXWZU.js";
|
|
9
|
+
import { t as createTransitionStatus } from "../createTransitionStatus-BTlrerSS.js";
|
|
10
|
+
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
11
|
+
import { n as useCSPContext } from "../CSPContext-DOxR0PO7.js";
|
|
12
|
+
import { mergeStyles } from "../internals/mergeStyles.js";
|
|
13
|
+
import { Dynamic, escape, isServer, memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
14
|
+
import { Show, createContext, createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, sharedConfig, untrack, useContext } from "solid-js";
|
|
15
|
+
//#region src/tabs/root/TabsRootContext.ts
|
|
16
|
+
var MISSING_CONTEXT$1 = Symbol("TabsRootContext");
|
|
17
|
+
var TabsRootContext = createContext(MISSING_CONTEXT$1);
|
|
18
|
+
function useTabsRootContext() {
|
|
19
|
+
const context = useContext(TabsRootContext);
|
|
20
|
+
if (context === MISSING_CONTEXT$1) throw new Error("Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");
|
|
21
|
+
return context;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/tabs/root/TabsRootDataAttributes.ts
|
|
25
|
+
var TabsRootDataAttributes = /* @__PURE__ */ function(TabsRootDataAttributes) {
|
|
26
|
+
TabsRootDataAttributes["orientation"] = "data-orientation";
|
|
27
|
+
TabsRootDataAttributes["activationDirection"] = "data-activation-direction";
|
|
28
|
+
return TabsRootDataAttributes;
|
|
29
|
+
}({});
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/tabs/root/stateAttributesMapping.ts
|
|
32
|
+
var tabsStateAttributesMapping = {
|
|
33
|
+
orientation: (value) => ({ [TabsRootDataAttributes.orientation]: value }),
|
|
34
|
+
tabActivationDirection: (value) => ({ [TabsRootDataAttributes.activationDirection]: value })
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/tabs/root/TabsRoot.tsx
|
|
38
|
+
/** Groups tabs and their corresponding panels. */
|
|
39
|
+
function TabsRoot(props) {
|
|
40
|
+
const internalProps = props;
|
|
41
|
+
const allProps = props;
|
|
42
|
+
const controlled = untrack(() => internalProps.value !== void 0);
|
|
43
|
+
const explicitDefault = untrack(() => internalProps.defaultValue !== void 0);
|
|
44
|
+
const initialDefaultProp = untrack(() => internalProps.defaultValue);
|
|
45
|
+
const initialDefaultValue = untrack(() => internalProps.defaultValue === void 0 ? 0 : internalProps.defaultValue);
|
|
46
|
+
const [uncontrolledValue, setUncontrolledValue] = createSignal(() => initialDefaultValue);
|
|
47
|
+
const [tabActivationDirection, setTabActivationDirection] = createSignal("none");
|
|
48
|
+
const [tabsVersion, setTabsVersion] = createSignal(0);
|
|
49
|
+
const [panelsVersion, setPanelsVersion] = createSignal(0);
|
|
50
|
+
const tabs = /* @__PURE__ */ new Map();
|
|
51
|
+
const panels = /* @__PURE__ */ new Map();
|
|
52
|
+
let nextTabOrder = 0;
|
|
53
|
+
let nextPanelOrder = 0;
|
|
54
|
+
let previousValue = untrack(() => controlled ? internalProps.value : uncontrolledValue());
|
|
55
|
+
let directionComputationIncomplete = false;
|
|
56
|
+
let shouldNotifyInitialValueChange = !explicitDefault;
|
|
57
|
+
let shouldHonorDisabledDefaultValue = explicitDefault;
|
|
58
|
+
let didRegisterTabs = false;
|
|
59
|
+
let lastKnownTabElement;
|
|
60
|
+
let tabChangeQueued = false;
|
|
61
|
+
let panelChangeQueued = false;
|
|
62
|
+
let disposed = false;
|
|
63
|
+
let warnedMode = false;
|
|
64
|
+
let warnedDefault = false;
|
|
65
|
+
const others = omit(allProps, "as", "class", "defaultValue", "onValueChange", "orientation", "ref", "style", "value");
|
|
66
|
+
const value = createMemo(() => controlled ? internalProps.value : uncontrolledValue());
|
|
67
|
+
const orientation = createMemo(() => internalProps.orientation ?? "horizontal");
|
|
68
|
+
const state = createMemo(() => ({
|
|
69
|
+
orientation: orientation(),
|
|
70
|
+
tabActivationDirection: tabActivationDirection()
|
|
71
|
+
}));
|
|
72
|
+
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
73
|
+
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
74
|
+
const stateAttributes = createMemo(() => getStateAttributesProps(state(), tabsStateAttributesMapping));
|
|
75
|
+
function notifyTabChange() {
|
|
76
|
+
if (tabChangeQueued) return;
|
|
77
|
+
tabChangeQueued = true;
|
|
78
|
+
queueMicrotask(() => {
|
|
79
|
+
tabChangeQueued = false;
|
|
80
|
+
if (!disposed) setTabsVersion((version) => version + 1);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function notifyPanelChange() {
|
|
84
|
+
if (panelChangeQueued) return;
|
|
85
|
+
panelChangeQueued = true;
|
|
86
|
+
queueMicrotask(() => {
|
|
87
|
+
panelChangeQueued = false;
|
|
88
|
+
if (!disposed) setPanelsVersion((version) => version + 1);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function registerTab(registration) {
|
|
92
|
+
registration.order = nextTabOrder;
|
|
93
|
+
nextTabOrder += 1;
|
|
94
|
+
tabs.set(registration.token, registration);
|
|
95
|
+
notifyTabChange();
|
|
96
|
+
return () => {
|
|
97
|
+
tabs.delete(registration.token);
|
|
98
|
+
notifyTabChange();
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function registerPanel(registration) {
|
|
102
|
+
registration.order = nextPanelOrder;
|
|
103
|
+
nextPanelOrder += 1;
|
|
104
|
+
panels.set(registration.token, registration);
|
|
105
|
+
notifyPanelChange();
|
|
106
|
+
return () => {
|
|
107
|
+
panels.delete(registration.token);
|
|
108
|
+
notifyPanelChange();
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function claimPanel(registration) {
|
|
112
|
+
if (!panels.has(registration.token)) return;
|
|
113
|
+
registration.order = nextPanelOrder;
|
|
114
|
+
nextPanelOrder += 1;
|
|
115
|
+
notifyPanelChange();
|
|
116
|
+
}
|
|
117
|
+
function getOrderedTabs() {
|
|
118
|
+
return Array.from(tabs.values()).filter((tab) => {
|
|
119
|
+
const element = tab.element();
|
|
120
|
+
return element && element.isConnected;
|
|
121
|
+
}).sort(compareRegistrations);
|
|
122
|
+
}
|
|
123
|
+
function getOrderedPanels() {
|
|
124
|
+
return Array.from(panels.values()).filter((panel) => {
|
|
125
|
+
const element = panel.element();
|
|
126
|
+
return panel.rendered() && element && element.isConnected;
|
|
127
|
+
}).sort(compareRegistrations);
|
|
128
|
+
}
|
|
129
|
+
function getTabElementBySelectedValue(selectedValue) {
|
|
130
|
+
tabsVersion();
|
|
131
|
+
return getOrderedTabs().find((tab) => tab.value() === selectedValue)?.element();
|
|
132
|
+
}
|
|
133
|
+
function getTabIdByPanelValue(panelValue) {
|
|
134
|
+
tabsVersion();
|
|
135
|
+
return getOrderedTabs().find((tab) => tab.value() === panelValue)?.id();
|
|
136
|
+
}
|
|
137
|
+
function getTabPanelIdByValue(tabValue) {
|
|
138
|
+
panelsVersion();
|
|
139
|
+
let matchingPanel;
|
|
140
|
+
for (const panel of panels.values()) {
|
|
141
|
+
const element = panel.element();
|
|
142
|
+
if (panel.rendered() && element?.isConnected && panel.value() === tabValue && (!matchingPanel || panel.order > matchingPanel.order)) matchingPanel = panel;
|
|
143
|
+
}
|
|
144
|
+
return matchingPanel?.id();
|
|
145
|
+
}
|
|
146
|
+
function onValueChange(nextValue, details) {
|
|
147
|
+
const activationDirection = computeActivationDirection(value(), nextValue, orientation(), getOrderedTabs());
|
|
148
|
+
details.activationDirection = activationDirection;
|
|
149
|
+
internalProps.onValueChange?.(nextValue, details);
|
|
150
|
+
if (details.isCanceled) return false;
|
|
151
|
+
if (!controlled) {
|
|
152
|
+
previousValue = nextValue;
|
|
153
|
+
directionComputationIncomplete = false;
|
|
154
|
+
setTabActivationDirection(activationDirection);
|
|
155
|
+
setUncontrolledValue(() => nextValue);
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
function commitAutomaticValueChange(nextValue, reason) {
|
|
160
|
+
previousValue = nextValue;
|
|
161
|
+
directionComputationIncomplete = false;
|
|
162
|
+
setTabActivationDirection("none");
|
|
163
|
+
setUncontrolledValue(() => nextValue);
|
|
164
|
+
internalProps.onValueChange?.(nextValue, createChangeEventDetails(reason, void 0, void 0, { activationDirection: "none" }));
|
|
165
|
+
shouldNotifyInitialValueChange = false;
|
|
166
|
+
}
|
|
167
|
+
const context = {
|
|
168
|
+
value,
|
|
169
|
+
orientation,
|
|
170
|
+
tabActivationDirection,
|
|
171
|
+
state,
|
|
172
|
+
tabsVersion,
|
|
173
|
+
panelsVersion,
|
|
174
|
+
getOrderedTabs,
|
|
175
|
+
getTabIndex(registration) {
|
|
176
|
+
tabsVersion();
|
|
177
|
+
return getOrderedTabs().indexOf(registration);
|
|
178
|
+
},
|
|
179
|
+
getPanelIndex(registration) {
|
|
180
|
+
panelsVersion();
|
|
181
|
+
return getOrderedPanels().indexOf(registration);
|
|
182
|
+
},
|
|
183
|
+
getTabElementBySelectedValue,
|
|
184
|
+
getTabIdByPanelValue,
|
|
185
|
+
getTabPanelIdByValue,
|
|
186
|
+
claimPanel,
|
|
187
|
+
notifyTabChange,
|
|
188
|
+
notifyPanelChange,
|
|
189
|
+
onValueChange,
|
|
190
|
+
registerTab,
|
|
191
|
+
registerPanel
|
|
192
|
+
};
|
|
193
|
+
createEffect(() => {
|
|
194
|
+
tabsVersion();
|
|
195
|
+
const currentValue = value();
|
|
196
|
+
const currentOrientation = orientation();
|
|
197
|
+
const orderedTabs = getOrderedTabs();
|
|
198
|
+
return {
|
|
199
|
+
currentValue,
|
|
200
|
+
direction: previousValue === currentValue && !directionComputationIncomplete ? void 0 : computeActivationDirection(previousValue, currentValue, currentOrientation, orderedTabs),
|
|
201
|
+
incomplete: previousValue != null && currentValue != null && orderedTabs.every((tab) => tab.value() !== currentValue)
|
|
202
|
+
};
|
|
203
|
+
}, (current) => {
|
|
204
|
+
if (current.direction === void 0) return;
|
|
205
|
+
directionComputationIncomplete = current.incomplete;
|
|
206
|
+
setTabActivationDirection(current.direction);
|
|
207
|
+
if (!directionComputationIncomplete) previousValue = current.currentValue;
|
|
208
|
+
});
|
|
209
|
+
createEffect(() => {
|
|
210
|
+
tabsVersion();
|
|
211
|
+
return {
|
|
212
|
+
currentValue: value(),
|
|
213
|
+
registrations: getOrderedTabs().map((tab) => ({
|
|
214
|
+
registration: tab,
|
|
215
|
+
disabled: tab.disabled(),
|
|
216
|
+
element: tab.element(),
|
|
217
|
+
value: tab.value()
|
|
218
|
+
}))
|
|
219
|
+
};
|
|
220
|
+
}, (current) => {
|
|
221
|
+
if (controlled) return;
|
|
222
|
+
const registrations = current.registrations;
|
|
223
|
+
if (registrations.length === 0) {
|
|
224
|
+
if (didRegisterTabs && current.currentValue !== null && !lastKnownTabElement?.isConnected) commitAutomaticValueChange(null, missing);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
didRegisterTabs = true;
|
|
228
|
+
lastKnownTabElement = registrations[0]?.element;
|
|
229
|
+
const selectedTab = registrations.find((tab) => tab.value === current.currentValue);
|
|
230
|
+
const firstEnabledTab = registrations.find((tab) => !tab.disabled);
|
|
231
|
+
const selectionIsDisabled = selectedTab?.disabled === true;
|
|
232
|
+
const selectionIsMissing = selectedTab == null && current.currentValue !== null;
|
|
233
|
+
if (!selectionIsDisabled && current.currentValue === initialDefaultValue) shouldHonorDisabledDefaultValue = false;
|
|
234
|
+
if (shouldHonorDisabledDefaultValue && selectionIsDisabled && current.currentValue === initialDefaultValue) return;
|
|
235
|
+
if (selectionIsDisabled || selectionIsMissing) {
|
|
236
|
+
const fallbackValue = firstEnabledTab?.value ?? null;
|
|
237
|
+
if (current.currentValue === fallbackValue) {
|
|
238
|
+
shouldNotifyInitialValueChange = false;
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
commitAutomaticValueChange(fallbackValue, shouldNotifyInitialValueChange ? initial : selectionIsDisabled ? disabled : missing);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (shouldNotifyInitialValueChange && selectedTab) {
|
|
245
|
+
internalProps.onValueChange?.(current.currentValue, createChangeEventDetails(initial, void 0, void 0, { activationDirection: "none" }));
|
|
246
|
+
shouldNotifyInitialValueChange = false;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
createEffect(() => ({
|
|
250
|
+
defaultValue: internalProps.defaultValue,
|
|
251
|
+
suppliedControlled: internalProps.value !== void 0
|
|
252
|
+
}), (current) => {
|
|
253
|
+
if (!isDevelopment()) return;
|
|
254
|
+
if (!warnedMode && current.suppliedControlled !== controlled) {
|
|
255
|
+
warnedMode = true;
|
|
256
|
+
console.error(`Base UI: A Tabs component changed from ${controlled ? "controlled" : "uncontrolled"} to ${controlled ? "uncontrolled" : "controlled"}.`);
|
|
257
|
+
}
|
|
258
|
+
if (!controlled && !warnedDefault && current.defaultValue !== initialDefaultProp) {
|
|
259
|
+
warnedDefault = true;
|
|
260
|
+
console.error("Base UI: A Tabs component changed its defaultValue after initialization.");
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
onCleanup(() => {
|
|
264
|
+
disposed = true;
|
|
265
|
+
});
|
|
266
|
+
return TabsRootContext({
|
|
267
|
+
value: context,
|
|
268
|
+
get children() {
|
|
269
|
+
return Dynamic(mergeProps({
|
|
270
|
+
get component() {
|
|
271
|
+
return props.as ?? "div";
|
|
272
|
+
},
|
|
273
|
+
ref: [internalProps.ref],
|
|
274
|
+
get ["class"]() {
|
|
275
|
+
return classValue();
|
|
276
|
+
},
|
|
277
|
+
get style() {
|
|
278
|
+
return styleValue();
|
|
279
|
+
}
|
|
280
|
+
}, stateAttributes, others));
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
function compareRegistrations(a, b) {
|
|
285
|
+
const aElement = a.element();
|
|
286
|
+
const bElement = b.element();
|
|
287
|
+
if (aElement && bElement && aElement !== bElement) {
|
|
288
|
+
const position = aElement.compareDocumentPosition(bElement);
|
|
289
|
+
if ((position & Node.DOCUMENT_POSITION_DISCONNECTED) === 0) {
|
|
290
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
|
|
291
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return a.order - b.order;
|
|
295
|
+
}
|
|
296
|
+
function computeActivationDirection(oldValue, newValue, orientation, tabs) {
|
|
297
|
+
if (oldValue == null || newValue == null) return "none";
|
|
298
|
+
const oldTab = tabs.find((tab) => tab.value() === oldValue)?.element();
|
|
299
|
+
const newTab = tabs.find((tab) => tab.value() === newValue)?.element();
|
|
300
|
+
const backward = orientation === "horizontal" ? "left" : "up";
|
|
301
|
+
const forward = orientation === "horizontal" ? "right" : "down";
|
|
302
|
+
if (!oldTab || !newTab) {
|
|
303
|
+
if (oldTab !== newTab && (typeof oldValue === "number" || typeof oldValue === "string") && typeof oldValue === typeof newValue) return newValue > oldValue ? forward : backward;
|
|
304
|
+
return "none";
|
|
305
|
+
}
|
|
306
|
+
const position = orientation === "horizontal" ? "left" : "top";
|
|
307
|
+
const oldPosition = oldTab.getBoundingClientRect()[position];
|
|
308
|
+
const newPosition = newTab.getBoundingClientRect()[position];
|
|
309
|
+
if (newPosition < oldPosition) return backward;
|
|
310
|
+
if (newPosition > oldPosition) return forward;
|
|
311
|
+
return "none";
|
|
312
|
+
}
|
|
313
|
+
function isDevelopment() {
|
|
314
|
+
return Boolean(false);
|
|
315
|
+
}
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/tabs/list/TabsListContext.ts
|
|
318
|
+
var MISSING_CONTEXT = Symbol("TabsListContext");
|
|
319
|
+
var TabsListContext = createContext(MISSING_CONTEXT);
|
|
320
|
+
function useTabsListContext() {
|
|
321
|
+
const context = useContext(TabsListContext);
|
|
322
|
+
if (context === MISSING_CONTEXT) throw new Error("Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");
|
|
323
|
+
return context;
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/tabs/list/TabsList.tsx
|
|
327
|
+
/** Groups the individual tab buttons. */
|
|
328
|
+
function TabsList(props) {
|
|
329
|
+
const root = useTabsRootContext();
|
|
330
|
+
const direction = useDirection();
|
|
331
|
+
const internalProps = props;
|
|
332
|
+
const allProps = props;
|
|
333
|
+
const [listElement, setListElement] = createSignal();
|
|
334
|
+
const [highlightedTab, setHighlightedTabToken] = createSignal();
|
|
335
|
+
const indicatorListeners = /* @__PURE__ */ new Set();
|
|
336
|
+
let initializedHighlight = false;
|
|
337
|
+
let navigating = false;
|
|
338
|
+
let navigationResetQueued = false;
|
|
339
|
+
const others = omit(allProps, "activateOnFocus", "as", "class", "loopFocus", "onKeyDown", "ref", "style");
|
|
340
|
+
const activateOnFocus = createMemo(() => internalProps.activateOnFocus ?? false);
|
|
341
|
+
const loopFocus = createMemo(() => internalProps.loopFocus ?? true);
|
|
342
|
+
const state = createMemo(() => root.state());
|
|
343
|
+
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
344
|
+
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
345
|
+
const stateAttributes = createMemo(() => getStateAttributesProps(state(), tabsStateAttributesMapping));
|
|
346
|
+
function markNavigating() {
|
|
347
|
+
navigating = true;
|
|
348
|
+
if (navigationResetQueued) return;
|
|
349
|
+
navigationResetQueued = true;
|
|
350
|
+
queueMicrotask(() => {
|
|
351
|
+
navigationResetQueued = false;
|
|
352
|
+
navigating = false;
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function setHighlightedTab(registration) {
|
|
356
|
+
setHighlightedTabToken(registration.token);
|
|
357
|
+
}
|
|
358
|
+
function registerIndicatorUpdateListener(listener) {
|
|
359
|
+
indicatorListeners.add(listener);
|
|
360
|
+
return () => {
|
|
361
|
+
indicatorListeners.delete(listener);
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
function notifyIndicators() {
|
|
365
|
+
for (const listener of indicatorListeners) listener();
|
|
366
|
+
}
|
|
367
|
+
function handleKeyDown(event) {
|
|
368
|
+
if (event.defaultPrevented || event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) return;
|
|
369
|
+
const orderedTabs = root.getOrderedTabs();
|
|
370
|
+
if (orderedTabs.length < 2 && event.key !== "Home" && event.key !== "End") return;
|
|
371
|
+
const eventTarget = event.composedPath()[0];
|
|
372
|
+
const currentIndex = orderedTabs.findIndex((tab) => {
|
|
373
|
+
const element = tab.element();
|
|
374
|
+
return element && eventTarget instanceof Node && element.contains(eventTarget);
|
|
375
|
+
});
|
|
376
|
+
if (currentIndex < 0) return;
|
|
377
|
+
let targetIndex;
|
|
378
|
+
if (event.key === "Home") targetIndex = findNavigableEndpoint(orderedTabs, 1);
|
|
379
|
+
else if (event.key === "End") targetIndex = findNavigableEndpoint(orderedTabs, -1);
|
|
380
|
+
else {
|
|
381
|
+
const delta = getNavigationDelta(event.key, root.orientation(), direction());
|
|
382
|
+
if (delta === 0) return;
|
|
383
|
+
targetIndex = getNextNavigableIndex(orderedTabs, currentIndex, delta, loopFocus());
|
|
384
|
+
}
|
|
385
|
+
if (targetIndex === void 0 || targetIndex === currentIndex) return;
|
|
386
|
+
const target = orderedTabs[targetIndex];
|
|
387
|
+
const targetElement = target?.element();
|
|
388
|
+
if (!target || !targetElement) return;
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
event.stopPropagation();
|
|
391
|
+
markNavigating();
|
|
392
|
+
setHighlightedTab(target);
|
|
393
|
+
scrollTabIntoView(targetElement, root.orientation());
|
|
394
|
+
queueMicrotask(() => target.element()?.focus());
|
|
395
|
+
}
|
|
396
|
+
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => handleKeyDown);
|
|
397
|
+
const context = {
|
|
398
|
+
activateOnFocus,
|
|
399
|
+
highlightedTab,
|
|
400
|
+
listElement,
|
|
401
|
+
markNavigating,
|
|
402
|
+
registerIndicatorUpdateListener,
|
|
403
|
+
setHighlightedTab
|
|
404
|
+
};
|
|
405
|
+
createEffect(() => {
|
|
406
|
+
root.tabsVersion();
|
|
407
|
+
return {
|
|
408
|
+
activeValue: root.value(),
|
|
409
|
+
element: listElement(),
|
|
410
|
+
tabs: root.getOrderedTabs().map((tab) => ({
|
|
411
|
+
registration: tab,
|
|
412
|
+
disabled: tab.disabled(),
|
|
413
|
+
value: tab.value()
|
|
414
|
+
}))
|
|
415
|
+
};
|
|
416
|
+
}, (current) => {
|
|
417
|
+
const active = current.tabs.find((tab) => tab.value === current.activeValue);
|
|
418
|
+
if (!initializedHighlight && current.tabs.length > 0) {
|
|
419
|
+
initializedHighlight = true;
|
|
420
|
+
setHighlightedTab(active?.registration ?? current.tabs[0].registration);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
if (!active || active.disabled || navigating) return;
|
|
424
|
+
const activeElement = current.element ? getDeepActiveElement(current.element.ownerDocument) : null;
|
|
425
|
+
if (current.element && activeElement && containsComposed(current.element, activeElement)) return;
|
|
426
|
+
setHighlightedTab(active.registration);
|
|
427
|
+
});
|
|
428
|
+
createEffect(() => {
|
|
429
|
+
root.tabsVersion();
|
|
430
|
+
return {
|
|
431
|
+
element: listElement(),
|
|
432
|
+
tabs: root.getOrderedTabs().flatMap((tab) => tab.element() ?? [])
|
|
433
|
+
};
|
|
434
|
+
}, (current) => {
|
|
435
|
+
const element = current.element;
|
|
436
|
+
if (!element) return;
|
|
437
|
+
const ResizeObserverConstructor = element.ownerDocument.defaultView?.ResizeObserver;
|
|
438
|
+
if (!ResizeObserverConstructor) return;
|
|
439
|
+
const observer = new ResizeObserverConstructor(notifyIndicators);
|
|
440
|
+
observer.observe(element);
|
|
441
|
+
for (const tabElement of current.tabs) observer.observe(tabElement);
|
|
442
|
+
return () => observer.disconnect();
|
|
443
|
+
});
|
|
444
|
+
createEffect(listElement, (element) => {
|
|
445
|
+
if (!element) return;
|
|
446
|
+
const MutationObserverConstructor = element.ownerDocument.defaultView?.MutationObserver;
|
|
447
|
+
if (!MutationObserverConstructor) return;
|
|
448
|
+
const observer = new MutationObserverConstructor(() => root.notifyTabChange());
|
|
449
|
+
observer.observe(element, {
|
|
450
|
+
childList: true,
|
|
451
|
+
subtree: true
|
|
452
|
+
});
|
|
453
|
+
return () => observer.disconnect();
|
|
454
|
+
});
|
|
455
|
+
createEffect(() => ({
|
|
456
|
+
activeValue: root.value(),
|
|
457
|
+
version: root.tabsVersion()
|
|
458
|
+
}), () => notifyIndicators());
|
|
459
|
+
return TabsListContext({
|
|
460
|
+
value: context,
|
|
461
|
+
get children() {
|
|
462
|
+
return Dynamic(mergeProps({
|
|
463
|
+
get component() {
|
|
464
|
+
return props.as ?? "div";
|
|
465
|
+
},
|
|
466
|
+
ref: [((element) => setListElement(element)), internalProps.ref],
|
|
467
|
+
get ["class"]() {
|
|
468
|
+
return classValue();
|
|
469
|
+
},
|
|
470
|
+
get style() {
|
|
471
|
+
return styleValue();
|
|
472
|
+
},
|
|
473
|
+
role: "tablist",
|
|
474
|
+
get ["aria-orientation"]() {
|
|
475
|
+
return root.orientation() === "vertical" ? "vertical" : void 0;
|
|
476
|
+
},
|
|
477
|
+
onKeyDown
|
|
478
|
+
}, stateAttributes, others));
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
function getNavigationDelta(key, orientation, direction) {
|
|
483
|
+
if (orientation === "vertical") {
|
|
484
|
+
if (key === "ArrowUp") return -1;
|
|
485
|
+
return key === "ArrowDown" ? 1 : 0;
|
|
486
|
+
}
|
|
487
|
+
if (key === "ArrowLeft") return direction === "rtl" ? 1 : -1;
|
|
488
|
+
if (key === "ArrowRight") return direction === "rtl" ? -1 : 1;
|
|
489
|
+
return 0;
|
|
490
|
+
}
|
|
491
|
+
function getNextNavigableIndex(tabs, currentIndex, delta, loop) {
|
|
492
|
+
let index = currentIndex;
|
|
493
|
+
for (let count = 0; count < tabs.length; count += 1) {
|
|
494
|
+
index += delta;
|
|
495
|
+
if (index < 0 || index >= tabs.length) {
|
|
496
|
+
if (!loop) return;
|
|
497
|
+
index = (index + tabs.length) % tabs.length;
|
|
498
|
+
}
|
|
499
|
+
const element = tabs[index]?.element();
|
|
500
|
+
if (element && !isNativelyDisabled(element) && !element.hidden) return index;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function findNavigableEndpoint(tabs, direction) {
|
|
504
|
+
let index = direction === 1 ? 0 : tabs.length - 1;
|
|
505
|
+
while (index >= 0 && index < tabs.length) {
|
|
506
|
+
const element = tabs[index]?.element();
|
|
507
|
+
if (element && !isNativelyDisabled(element) && !element.hidden) return index;
|
|
508
|
+
index += direction;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
function isNativelyDisabled(element) {
|
|
512
|
+
try {
|
|
513
|
+
return element.matches(":disabled");
|
|
514
|
+
} catch {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function scrollTabIntoView(element, orientation) {
|
|
519
|
+
element.scrollIntoView?.({
|
|
520
|
+
block: orientation === "vertical" ? "nearest" : "center",
|
|
521
|
+
inline: orientation === "horizontal" ? "nearest" : "center"
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
function getDeepActiveElement(document) {
|
|
525
|
+
let active = document.activeElement;
|
|
526
|
+
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
527
|
+
return active;
|
|
528
|
+
}
|
|
529
|
+
function containsComposed(parent, child) {
|
|
530
|
+
if (parent.contains(child)) return true;
|
|
531
|
+
let current = child;
|
|
532
|
+
while (current) {
|
|
533
|
+
if (current === parent) return true;
|
|
534
|
+
current = current.parentNode ?? (current instanceof ShadowRoot ? current.host : null);
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region src/tabs/tab/TabsTabDataAttributes.ts
|
|
540
|
+
var TabsTabDataAttributes = /* @__PURE__ */ function(TabsTabDataAttributes) {
|
|
541
|
+
TabsTabDataAttributes["orientation"] = "data-orientation";
|
|
542
|
+
TabsTabDataAttributes["activationDirection"] = "data-activation-direction";
|
|
543
|
+
TabsTabDataAttributes["active"] = "data-active";
|
|
544
|
+
TabsTabDataAttributes["disabled"] = "data-disabled";
|
|
545
|
+
return TabsTabDataAttributes;
|
|
546
|
+
}({});
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region src/tabs/tab/TabsTab.tsx
|
|
549
|
+
var stateAttributesMapping$2 = {
|
|
550
|
+
...tabsStateAttributesMapping,
|
|
551
|
+
active: (value) => value ? { [TabsTabDataAttributes.active]: "" } : null,
|
|
552
|
+
disabled: (value) => value ? { [TabsTabDataAttributes.disabled]: "" } : null
|
|
553
|
+
};
|
|
554
|
+
/** An interactive tab that selects its matching panel. */
|
|
555
|
+
function TabsTab(props) {
|
|
556
|
+
const root = useTabsRootContext();
|
|
557
|
+
const list = useTabsListContext();
|
|
558
|
+
const internalProps = props;
|
|
559
|
+
const allProps = props;
|
|
560
|
+
const generatedId = `base-ui-${createUniqueId()}`;
|
|
561
|
+
const token = Symbol("TabsTab");
|
|
562
|
+
const [element, setElement] = createSignal();
|
|
563
|
+
const id = createMemo(() => internalProps.id ?? generatedId);
|
|
564
|
+
const disabled = createMemo(() => internalProps.disabled ?? false);
|
|
565
|
+
const nativeButton = createMemo(() => internalProps.nativeButton ?? true);
|
|
566
|
+
const active = createMemo(() => internalProps.value === root.value());
|
|
567
|
+
const registration = {
|
|
568
|
+
token,
|
|
569
|
+
order: 0,
|
|
570
|
+
element,
|
|
571
|
+
id,
|
|
572
|
+
value: () => internalProps.value,
|
|
573
|
+
disabled
|
|
574
|
+
};
|
|
575
|
+
const unregister = root.registerTab(registration);
|
|
576
|
+
const others = omit(allProps, "as", "class", "disabled", "id", "nativeButton", "onClick", "onFocus", "onKeyDown", "onPointerDown", "ref", "style", "value");
|
|
577
|
+
const state = createMemo(() => ({
|
|
578
|
+
disabled: disabled(),
|
|
579
|
+
active: active(),
|
|
580
|
+
orientation: root.orientation(),
|
|
581
|
+
tabActivationDirection: root.tabActivationDirection()
|
|
582
|
+
}));
|
|
583
|
+
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
584
|
+
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
585
|
+
const stateAttributes = createMemo(() => getStateAttributesProps(state(), stateAttributesMapping$2));
|
|
586
|
+
const tabIndex = createMemo(() => list.highlightedTab() === token ? 0 : -1);
|
|
587
|
+
const tabPanelId = createMemo(() => root.getTabPanelIdByValue(internalProps.value));
|
|
588
|
+
let pressing = false;
|
|
589
|
+
let mainButton = false;
|
|
590
|
+
let removePointerListeners;
|
|
591
|
+
function activate(event) {
|
|
592
|
+
root.onValueChange(internalProps.value, createChangeEventDetails(none, event, void 0, { activationDirection: "none" }));
|
|
593
|
+
}
|
|
594
|
+
function preventDisabledInteraction(event) {
|
|
595
|
+
if (!disabled()) return;
|
|
596
|
+
event.preventDefault();
|
|
597
|
+
event.preventBaseUIHandler();
|
|
598
|
+
}
|
|
599
|
+
function handleClick(event) {
|
|
600
|
+
if (active() || disabled() || event.button !== 0) return;
|
|
601
|
+
activate(event);
|
|
602
|
+
}
|
|
603
|
+
function handleFocus(event) {
|
|
604
|
+
list.setHighlightedTab(registration);
|
|
605
|
+
if (!active() && !disabled() && list.activateOnFocus() && (!pressing || mainButton)) activate(event);
|
|
606
|
+
}
|
|
607
|
+
function handlePointerDown(event) {
|
|
608
|
+
if (active() || disabled()) return;
|
|
609
|
+
pressing = true;
|
|
610
|
+
mainButton = event.button === 0;
|
|
611
|
+
removePointerListeners?.();
|
|
612
|
+
const document = event.currentTarget.ownerDocument;
|
|
613
|
+
const handlePointerEnd = () => {
|
|
614
|
+
pressing = false;
|
|
615
|
+
mainButton = false;
|
|
616
|
+
removePointerListeners?.();
|
|
617
|
+
removePointerListeners = void 0;
|
|
618
|
+
};
|
|
619
|
+
document.addEventListener("pointerup", handlePointerEnd);
|
|
620
|
+
document.addEventListener("pointercancel", handlePointerEnd);
|
|
621
|
+
removePointerListeners = () => {
|
|
622
|
+
document.removeEventListener("pointerup", handlePointerEnd);
|
|
623
|
+
document.removeEventListener("pointercancel", handlePointerEnd);
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
function handleKeyDown(event) {
|
|
627
|
+
if (event.target !== event.currentTarget || active() || disabled() || list.activateOnFocus() || event.key !== "Enter" && event.key !== " ") return;
|
|
628
|
+
event.preventDefault();
|
|
629
|
+
activate(event);
|
|
630
|
+
}
|
|
631
|
+
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledInteraction : void 0), () => internalProps.onClick, () => handleClick);
|
|
632
|
+
const onFocus = composeEventHandlers(() => internalProps.onFocus, () => handleFocus);
|
|
633
|
+
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, () => handleKeyDown);
|
|
634
|
+
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, () => handlePointerDown);
|
|
635
|
+
createEffect(() => ({
|
|
636
|
+
disabled: disabled(),
|
|
637
|
+
element: element(),
|
|
638
|
+
id: id(),
|
|
639
|
+
value: internalProps.value
|
|
640
|
+
}), () => root.notifyTabChange());
|
|
641
|
+
onCleanup(() => {
|
|
642
|
+
removePointerListeners?.();
|
|
643
|
+
unregister();
|
|
644
|
+
});
|
|
645
|
+
return Dynamic(mergeProps({
|
|
646
|
+
get component() {
|
|
647
|
+
return props.as ?? "button";
|
|
648
|
+
},
|
|
649
|
+
ref: [((current) => setElement(current)), internalProps.ref],
|
|
650
|
+
get id() {
|
|
651
|
+
return id();
|
|
652
|
+
},
|
|
653
|
+
get ["class"]() {
|
|
654
|
+
return classValue();
|
|
655
|
+
},
|
|
656
|
+
get style() {
|
|
657
|
+
return styleValue();
|
|
658
|
+
},
|
|
659
|
+
get type() {
|
|
660
|
+
return nativeButton() ? "button" : void 0;
|
|
661
|
+
},
|
|
662
|
+
role: "tab",
|
|
663
|
+
get tabIndex() {
|
|
664
|
+
return tabIndex();
|
|
665
|
+
},
|
|
666
|
+
get ["aria-controls"]() {
|
|
667
|
+
return tabPanelId();
|
|
668
|
+
},
|
|
669
|
+
get ["aria-selected"]() {
|
|
670
|
+
return active() ? "true" : "false";
|
|
671
|
+
},
|
|
672
|
+
get ["aria-disabled"]() {
|
|
673
|
+
return disabled() ? "true" : void 0;
|
|
674
|
+
},
|
|
675
|
+
get ["data-composite-item-active"]() {
|
|
676
|
+
return active() ? "" : void 0;
|
|
677
|
+
},
|
|
678
|
+
onClick,
|
|
679
|
+
onFocus,
|
|
680
|
+
onKeyDown,
|
|
681
|
+
onPointerDown
|
|
682
|
+
}, stateAttributes, others));
|
|
683
|
+
}
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region src/tabs/indicator/TabsIndicatorCssVars.ts
|
|
686
|
+
var TabsIndicatorCssVars = /* @__PURE__ */ function(TabsIndicatorCssVars) {
|
|
687
|
+
TabsIndicatorCssVars["activeTabLeft"] = "--active-tab-left";
|
|
688
|
+
TabsIndicatorCssVars["activeTabRight"] = "--active-tab-right";
|
|
689
|
+
TabsIndicatorCssVars["activeTabTop"] = "--active-tab-top";
|
|
690
|
+
TabsIndicatorCssVars["activeTabBottom"] = "--active-tab-bottom";
|
|
691
|
+
TabsIndicatorCssVars["activeTabWidth"] = "--active-tab-width";
|
|
692
|
+
TabsIndicatorCssVars["activeTabHeight"] = "--active-tab-height";
|
|
693
|
+
return TabsIndicatorCssVars;
|
|
694
|
+
}({});
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region src/tabs/indicator/prehydrationScript.ts
|
|
697
|
+
var tabsIndicatorPrehydrationScript = `!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest('[role="tablist"]');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;function o(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}function n(){let n=0,r=0,s=0,h=0;const{width:c,height:f}=o(i),{width:l,height:u}=o(e),d=i.getBoundingClientRect(),a=e.getBoundingClientRect(),g=l>0?a.width/l:1,b=u>0?a.height/u:1;if(Math.abs(g)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=d.left-a.left,i=d.top-a.top;n=t/g+e.scrollLeft-e.clientLeft,s=i/b+e.scrollTop-e.clientTop}else n=i.offsetLeft,s=i.offsetTop;const p=c,m=f;function v(e,i){t.style.setProperty(\`--active-tab-\${e}\`,\`\${i}px\`)}return r=e.scrollWidth-n-p,h=e.scrollHeight-s-m,v("left",n),v("right",r),v("top",s),v("bottom",h),v("width",p),v("height",m),p>0&&m>0&&(t.removeAttribute("hidden"),!0)}if(n()||"undefined"==typeof ResizeObserver)return;let r,s;function h(){s.disconnect(),clearTimeout(r)}s=new ResizeObserver(()=>{t.isConnected&&t.hasAttribute("hidden")&&i.hasAttribute("data-active")?n()&&h():h()}),s.observe(i),r=setTimeout(h,1e4)}();`;
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/tabs/indicator/TabsIndicator.tsx
|
|
700
|
+
var stateAttributesMapping$1 = {
|
|
701
|
+
...tabsStateAttributesMapping,
|
|
702
|
+
activeTabPosition: () => null,
|
|
703
|
+
activeTabSize: () => null
|
|
704
|
+
};
|
|
705
|
+
/** A visual indicator positioned over the active tab. */
|
|
706
|
+
function TabsIndicator(props) {
|
|
707
|
+
const root = useTabsRootContext();
|
|
708
|
+
const list = useTabsListContext();
|
|
709
|
+
const csp = useCSPContext();
|
|
710
|
+
const internalProps = props;
|
|
711
|
+
const allProps = props;
|
|
712
|
+
const [geometry, setGeometry] = createSignal(null);
|
|
713
|
+
const [measureVersion, setMeasureVersion] = createSignal(0);
|
|
714
|
+
const [hydrating, setHydrating] = createSignal(Boolean(isServer || sharedConfig.hydrating));
|
|
715
|
+
const trustedPrehydrationScript = { innerHTML: tabsIndicatorPrehydrationScript };
|
|
716
|
+
const others = omit(allProps, "as", "class", "ref", "renderBeforeHydration", "style");
|
|
717
|
+
const state = createMemo(() => ({
|
|
718
|
+
...root.state(),
|
|
719
|
+
activeTabPosition: geometry()?.position ?? null,
|
|
720
|
+
activeTabSize: geometry()?.size ?? null
|
|
721
|
+
}));
|
|
722
|
+
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
723
|
+
const internalStyle = createMemo(() => {
|
|
724
|
+
const current = geometry();
|
|
725
|
+
if (!current) return;
|
|
726
|
+
return {
|
|
727
|
+
[TabsIndicatorCssVars.activeTabLeft]: `${current.position.left}px`,
|
|
728
|
+
[TabsIndicatorCssVars.activeTabRight]: `${current.position.right}px`,
|
|
729
|
+
[TabsIndicatorCssVars.activeTabTop]: `${current.position.top}px`,
|
|
730
|
+
[TabsIndicatorCssVars.activeTabBottom]: `${current.position.bottom}px`,
|
|
731
|
+
[TabsIndicatorCssVars.activeTabWidth]: `${current.size.width}px`,
|
|
732
|
+
[TabsIndicatorCssVars.activeTabHeight]: `${current.size.height}px`
|
|
733
|
+
};
|
|
734
|
+
});
|
|
735
|
+
const styleValue = createMemo(() => mergeStyles(internalStyle(), resolveStyle(props.style, state())));
|
|
736
|
+
const hidden = createMemo(() => {
|
|
737
|
+
const current = geometry();
|
|
738
|
+
return !current || current.size.width <= 0 || current.size.height <= 0;
|
|
739
|
+
});
|
|
740
|
+
const stateAttributes = createMemo(() => getStateAttributesProps(state(), stateAttributesMapping$1));
|
|
741
|
+
function measure(listElement, selectedValue) {
|
|
742
|
+
if (!listElement || selectedValue == null) return null;
|
|
743
|
+
const activeTab = root.getTabElementBySelectedValue(selectedValue);
|
|
744
|
+
if (!activeTab) return null;
|
|
745
|
+
const size = getCssDimensions(activeTab);
|
|
746
|
+
const listSize = getCssDimensions(listElement);
|
|
747
|
+
const tabRect = activeTab.getBoundingClientRect();
|
|
748
|
+
const listRect = listElement.getBoundingClientRect();
|
|
749
|
+
const scaleX = listSize.width > 0 ? listRect.width / listSize.width : 1;
|
|
750
|
+
const scaleY = listSize.height > 0 ? listRect.height / listSize.height : 1;
|
|
751
|
+
let left;
|
|
752
|
+
let top;
|
|
753
|
+
if (scaleX > Number.EPSILON && scaleY > Number.EPSILON) {
|
|
754
|
+
left = (tabRect.left - listRect.left) / scaleX + listElement.scrollLeft - listElement.clientLeft;
|
|
755
|
+
top = (tabRect.top - listRect.top) / scaleY + listElement.scrollTop - listElement.clientTop;
|
|
756
|
+
} else {
|
|
757
|
+
left = activeTab.offsetLeft;
|
|
758
|
+
top = activeTab.offsetTop;
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
position: {
|
|
762
|
+
left,
|
|
763
|
+
right: listElement.scrollWidth - left - size.width,
|
|
764
|
+
top,
|
|
765
|
+
bottom: listElement.scrollHeight - top - size.height
|
|
766
|
+
},
|
|
767
|
+
size
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
const unregisterListener = list.registerIndicatorUpdateListener(() => {
|
|
771
|
+
setMeasureVersion((version) => version + 1);
|
|
772
|
+
});
|
|
773
|
+
createEffect(() => {
|
|
774
|
+
measureVersion();
|
|
775
|
+
root.tabsVersion();
|
|
776
|
+
return measure(list.listElement(), root.value());
|
|
777
|
+
}, (nextGeometry) => {
|
|
778
|
+
setGeometry(nextGeometry);
|
|
779
|
+
});
|
|
780
|
+
onSettled(() => {
|
|
781
|
+
setHydrating(false);
|
|
782
|
+
});
|
|
783
|
+
onCleanup(unregisterListener);
|
|
784
|
+
return Show({
|
|
785
|
+
get when() {
|
|
786
|
+
return root.value() != null;
|
|
787
|
+
},
|
|
788
|
+
get children() {
|
|
789
|
+
return [Show({
|
|
790
|
+
get when() {
|
|
791
|
+
return props.as;
|
|
792
|
+
},
|
|
793
|
+
get fallback() {
|
|
794
|
+
return ssrElement("span", () => {
|
|
795
|
+
return mergeProps({
|
|
796
|
+
get ["class"]() {
|
|
797
|
+
return classValue();
|
|
798
|
+
},
|
|
799
|
+
get style() {
|
|
800
|
+
return styleValue();
|
|
801
|
+
},
|
|
802
|
+
role: "presentation",
|
|
803
|
+
get hidden() {
|
|
804
|
+
return hidden();
|
|
805
|
+
}
|
|
806
|
+
}, stateAttributes, others);
|
|
807
|
+
}, void 0, true);
|
|
808
|
+
},
|
|
809
|
+
children: (component) => Dynamic(mergeProps({
|
|
810
|
+
get component() {
|
|
811
|
+
return component();
|
|
812
|
+
},
|
|
813
|
+
get ["class"]() {
|
|
814
|
+
return classValue();
|
|
815
|
+
},
|
|
816
|
+
get style() {
|
|
817
|
+
return styleValue();
|
|
818
|
+
},
|
|
819
|
+
role: "presentation",
|
|
820
|
+
get hidden() {
|
|
821
|
+
return hidden();
|
|
822
|
+
}
|
|
823
|
+
}, stateAttributes, others))
|
|
824
|
+
}), memo(() => {
|
|
825
|
+
return escape(memo(() => {
|
|
826
|
+
return !!((internalProps.renderBeforeHydration ?? false) && hydrating());
|
|
827
|
+
})() ? ssrElement("script", () => {
|
|
828
|
+
return mergeProps({ get nonce() {
|
|
829
|
+
return csp.nonce();
|
|
830
|
+
} }, trustedPrehydrationScript);
|
|
831
|
+
}, void 0, true) : (internalProps.renderBeforeHydration ?? false) && hydrating());
|
|
832
|
+
})];
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
function getCssDimensions(element) {
|
|
837
|
+
const computedStyle = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
838
|
+
let width = Number.parseFloat(computedStyle?.width ?? "") || 0;
|
|
839
|
+
let height = Number.parseFloat(computedStyle?.height ?? "") || 0;
|
|
840
|
+
if (Math.round(width) !== element.offsetWidth || Math.round(height) !== element.offsetHeight) {
|
|
841
|
+
width = element.offsetWidth;
|
|
842
|
+
height = element.offsetHeight;
|
|
843
|
+
}
|
|
844
|
+
return {
|
|
845
|
+
width,
|
|
846
|
+
height
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
//#endregion
|
|
850
|
+
//#region src/tabs/panel/TabsPanelDataAttributes.ts
|
|
851
|
+
var TabsPanelDataAttributes = /* @__PURE__ */ function(TabsPanelDataAttributes) {
|
|
852
|
+
TabsPanelDataAttributes["orientation"] = "data-orientation";
|
|
853
|
+
TabsPanelDataAttributes["activationDirection"] = "data-activation-direction";
|
|
854
|
+
TabsPanelDataAttributes["hidden"] = "data-hidden";
|
|
855
|
+
TabsPanelDataAttributes["index"] = "data-index";
|
|
856
|
+
return TabsPanelDataAttributes;
|
|
857
|
+
}({});
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region src/tabs/panel/TabsPanel.tsx
|
|
860
|
+
var stateAttributesMapping = {
|
|
861
|
+
...tabsStateAttributesMapping,
|
|
862
|
+
...transitionStatusMapping,
|
|
863
|
+
hidden: (value) => value ? { [TabsPanelDataAttributes.hidden]: "" } : null
|
|
864
|
+
};
|
|
865
|
+
/** A panel displayed when its corresponding tab is active. */
|
|
866
|
+
function TabsPanel(props) {
|
|
867
|
+
const root = useTabsRootContext();
|
|
868
|
+
const internalProps = props;
|
|
869
|
+
const allProps = props;
|
|
870
|
+
const generatedId = `base-ui-${createUniqueId()}`;
|
|
871
|
+
const token = Symbol("TabsPanel");
|
|
872
|
+
const [element, setElement] = createSignal();
|
|
873
|
+
const id = createMemo(() => internalProps.id ?? generatedId);
|
|
874
|
+
const open = createMemo(() => internalProps.value === root.value());
|
|
875
|
+
const transition = createTransitionStatus(() => open());
|
|
876
|
+
const hidden = createMemo(() => !transition.mounted());
|
|
877
|
+
const shouldRender = createMemo(() => (internalProps.keepMounted ?? false) || transition.mounted());
|
|
878
|
+
const registration = {
|
|
879
|
+
token,
|
|
880
|
+
order: 0,
|
|
881
|
+
element,
|
|
882
|
+
id,
|
|
883
|
+
value: () => internalProps.value,
|
|
884
|
+
rendered: shouldRender
|
|
885
|
+
};
|
|
886
|
+
const unregister = root.registerPanel(registration);
|
|
887
|
+
const others = omit(allProps, "as", "class", "id", "keepMounted", "ref", "style", "value");
|
|
888
|
+
const state = createMemo(() => ({
|
|
889
|
+
...root.state(),
|
|
890
|
+
hidden: hidden(),
|
|
891
|
+
transitionStatus: transition.transitionStatus()
|
|
892
|
+
}));
|
|
893
|
+
const classValue = createMemo(() => shouldRender() ? resolveClass(props.class, state()) : void 0);
|
|
894
|
+
const styleValue = createMemo(() => shouldRender() ? resolveStyle(props.style, state()) : void 0);
|
|
895
|
+
const stateAttributes = createMemo(() => getStateAttributesProps(state(), stateAttributesMapping));
|
|
896
|
+
const index = createMemo(() => root.getPanelIndex(registration));
|
|
897
|
+
const correspondingTabId = createMemo(() => root.getTabIdByPanelValue(internalProps.value));
|
|
898
|
+
let latestOpen = untrack(open);
|
|
899
|
+
createEffect(() => ({
|
|
900
|
+
element: element(),
|
|
901
|
+
open: open(),
|
|
902
|
+
status: transition.transitionStatus()
|
|
903
|
+
}), (current) => {
|
|
904
|
+
latestOpen = current.open;
|
|
905
|
+
if (current.open || current.status !== "ending" || !current.element) return;
|
|
906
|
+
const abortController = new AbortController();
|
|
907
|
+
runOnceAnimationsFinish(current.element, () => {
|
|
908
|
+
if (!latestOpen) transition.setMounted(false);
|
|
909
|
+
}, abortController.signal);
|
|
910
|
+
return () => abortController.abort();
|
|
911
|
+
});
|
|
912
|
+
createEffect(() => ({
|
|
913
|
+
element: element(),
|
|
914
|
+
id: id(),
|
|
915
|
+
rendered: shouldRender(),
|
|
916
|
+
value: internalProps.value
|
|
917
|
+
}), (current) => {
|
|
918
|
+
if (current.rendered && current.element) root.claimPanel(registration);
|
|
919
|
+
else root.notifyPanelChange();
|
|
920
|
+
});
|
|
921
|
+
onCleanup(() => unregister());
|
|
922
|
+
return Show({
|
|
923
|
+
get when() {
|
|
924
|
+
return shouldRender();
|
|
925
|
+
},
|
|
926
|
+
get children() {
|
|
927
|
+
return Show({
|
|
928
|
+
get when() {
|
|
929
|
+
return props.as;
|
|
930
|
+
},
|
|
931
|
+
get fallback() {
|
|
932
|
+
return ssrElement("div", () => {
|
|
933
|
+
return mergeProps({
|
|
934
|
+
get id() {
|
|
935
|
+
return id();
|
|
936
|
+
},
|
|
937
|
+
get ["class"]() {
|
|
938
|
+
return classValue();
|
|
939
|
+
},
|
|
940
|
+
get style() {
|
|
941
|
+
return styleValue();
|
|
942
|
+
},
|
|
943
|
+
role: "tabpanel",
|
|
944
|
+
get tabIndex() {
|
|
945
|
+
return open() ? 0 : -1;
|
|
946
|
+
},
|
|
947
|
+
get ["aria-labelledby"]() {
|
|
948
|
+
return correspondingTabId();
|
|
949
|
+
},
|
|
950
|
+
get hidden() {
|
|
951
|
+
return hidden();
|
|
952
|
+
},
|
|
953
|
+
get inert() {
|
|
954
|
+
return !open() ? true : void 0;
|
|
955
|
+
},
|
|
956
|
+
get ["data-index"]() {
|
|
957
|
+
return index();
|
|
958
|
+
}
|
|
959
|
+
}, stateAttributes, others);
|
|
960
|
+
}, void 0, true);
|
|
961
|
+
},
|
|
962
|
+
children: (component) => Dynamic(mergeProps({
|
|
963
|
+
get component() {
|
|
964
|
+
return component();
|
|
965
|
+
},
|
|
966
|
+
ref: [((current) => setElement(current)), internalProps.ref],
|
|
967
|
+
get id() {
|
|
968
|
+
return id();
|
|
969
|
+
},
|
|
970
|
+
get ["class"]() {
|
|
971
|
+
return classValue();
|
|
972
|
+
},
|
|
973
|
+
get style() {
|
|
974
|
+
return styleValue();
|
|
975
|
+
},
|
|
976
|
+
role: "tabpanel",
|
|
977
|
+
get tabIndex() {
|
|
978
|
+
return open() ? 0 : -1;
|
|
979
|
+
},
|
|
980
|
+
get ["aria-labelledby"]() {
|
|
981
|
+
return correspondingTabId();
|
|
982
|
+
},
|
|
983
|
+
get hidden() {
|
|
984
|
+
return hidden();
|
|
985
|
+
},
|
|
986
|
+
get inert() {
|
|
987
|
+
return !open() ? true : void 0;
|
|
988
|
+
},
|
|
989
|
+
get ["data-index"]() {
|
|
990
|
+
return index();
|
|
991
|
+
}
|
|
992
|
+
}, stateAttributes, others))
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
//#endregion
|
|
998
|
+
//#region src/tabs/index.parts.ts
|
|
999
|
+
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1000
|
+
Indicator: () => TabsIndicator,
|
|
1001
|
+
List: () => TabsList,
|
|
1002
|
+
Panel: () => TabsPanel,
|
|
1003
|
+
Root: () => TabsRoot,
|
|
1004
|
+
Tab: () => TabsTab
|
|
1005
|
+
});
|
|
1006
|
+
//#endregion
|
|
1007
|
+
export { index_parts_exports as Tabs };
|