@fldr/ui 0.0.0-stage → 0.3.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/CHANGELOG.md +2366 -0
- package/LICENSE +21 -0
- package/README.md +488 -2
- package/ai/USAGE.md +216 -0
- package/ai/component-registry.json +8694 -0
- package/ai/component-registry.md +11933 -0
- package/ai/schemas.ts +1239 -0
- package/bin/kumo.js +36 -0
- package/dist/.build-complete +1 -0
- package/dist/ai/schemas.d.ts +3229 -0
- package/dist/ai/schemas.js +5963 -0
- package/dist/blocks-source/delete-resource/delete-resource.test.tsx +21 -0
- package/dist/blocks-source/delete-resource/delete-resource.tsx +219 -0
- package/dist/blocks-source/page-header/page-header.tsx +99 -0
- package/dist/blocks-source/resource-list/resource-list.test.tsx +28 -0
- package/dist/blocks-source/resource-list/resource-list.tsx +66 -0
- package/dist/button-DzavLWXm.d.ts +227 -0
- package/dist/catalog.d.ts +380 -0
- package/dist/catalog.js +387 -0
- package/dist/chunks/AccordionPanelDataAttributes-mmrmkky28u1010l5.js +457 -0
- package/dist/chunks/AlertDialogTrigger-l1r1gbxcky1xq889.js +24 -0
- package/dist/chunks/AlertDialogTriggerDataAttributes-go49qon601catpgn.js +56 -0
- package/dist/chunks/AutocompleteItem-36ysm5nwbsd0snr6.js +70 -0
- package/dist/chunks/AutocompleteItemDataAttributes-n5rigpf0s9ylnwi3.js +232 -0
- package/dist/chunks/AutocompleteSeparator-bnqeqh7i983d92gx.js +12 -0
- package/dist/chunks/AvatarImageDataAttributes-jw70u384c83lhqfp.js +247 -0
- package/dist/chunks/ButtonDataAttributes-nceand1fi7lvnmkb.js +35 -0
- package/dist/chunks/CSPContext-iv67i0qqhihg8mur.js +11 -0
- package/dist/chunks/CSPProvider-finau3a8hnc9o2td.js +24 -0
- package/dist/chunks/CheckboxGroup-581mfftu99wvjb3a.js +190 -0
- package/dist/chunks/CheckboxGroupContext-jf1bt3znvqlhrql6.js +10 -0
- package/dist/chunks/CheckboxGroupDataAttributes-nskqcxts64symbvf.js +10 -0
- package/dist/chunks/CheckboxIndicator-i13dmhacfgqo328c.js +414 -0
- package/dist/chunks/CheckboxIndicatorDataAttributes-3p29ju7nkczz1l2y.js +85 -0
- package/dist/chunks/CollapsiblePanel-md5suzmtnsyz1kab.js +178 -0
- package/dist/chunks/CollapsibleRootDataAttributes-bynmgxmt4jikaoha.js +36 -0
- package/dist/chunks/ComboboxClear-ioejwvtnmqanph88.js +294 -0
- package/dist/chunks/ComboboxClearDataAttributes-lo0enstdmrqpywsy.js +402 -0
- package/dist/chunks/ComboboxEmpty-gkt1y5b81a4983v7.js +1950 -0
- package/dist/chunks/ComboboxItemIndicatorDataAttributes-iku7l9ig0ve09an4.js +259 -0
- package/dist/chunks/ComboboxPopup-n8cbgys9st446j1i.js +205 -0
- package/dist/chunks/CompositeItem-kepwg8jtvgap06o6.js +20 -0
- package/dist/chunks/CompositeList-gwuaf6d14s4da0j0.js +182 -0
- package/dist/chunks/CompositeListContext-bejvmlu39hsfjzgu.js +15 -0
- package/dist/chunks/CompositeRoot-dnlkb27uw4g5aocf.js +223 -0
- package/dist/chunks/CompositeRootContext-obm54j7y6s86qwhq.js +12 -0
- package/dist/chunks/ContextMenuTriggerDataAttributes-xwozccynxv6pk5s0.js +237 -0
- package/dist/chunks/DialogBackdropDataAttributes-jwqxd6jla03xh8ke.js +28 -0
- package/dist/chunks/DialogCloseDataAttributes-12m7gwh3i6fd7d05.js +76 -0
- package/dist/chunks/DialogPopup-n6w7b389e7bs0472.js +133 -0
- package/dist/chunks/DialogRoot-hkkqj7vcjpkx8qk8.js +16 -0
- package/dist/chunks/DialogTrigger-kpugfkbfswqrus4u.js +142 -0
- package/dist/chunks/DialogTriggerDataAttributes-bp9bu13cvwuddh5b.js +18 -0
- package/dist/chunks/DialogViewportDataAttributes-mma9emv1edsc1vuy.js +78 -0
- package/dist/chunks/DirectionContext-kpby968j030psajn.js +10 -0
- package/dist/chunks/DirectionProvider-cg0pwzgdyg6r73r6.js +21 -0
- package/dist/chunks/DrawerViewport-mzqpwvqtylnad8ib.js +1532 -0
- package/dist/chunks/DrawerViewportDataAttributes-dd9593zm9fl9vcsm.js +1072 -0
- package/dist/chunks/FieldControl-hjj2tcqruozadgdi.js +122 -0
- package/dist/chunks/FieldDescription-orix2gepowrp5ni4.js +122 -0
- package/dist/chunks/FieldItemContext-ohsf45im6xhpay40.js +10 -0
- package/dist/chunks/FieldItemDataAttributes-m52srx69pispz49i.js +283 -0
- package/dist/chunks/FieldLabel-fjc7tdis7rcbq8o4.js +353 -0
- package/dist/chunks/FieldsetLegend-gl9z9eezr0xg9zr7.js +61 -0
- package/dist/chunks/FieldsetLegendDataAttributes-fn20251jxjqkpkxm.js +17 -0
- package/dist/chunks/FieldsetRootContext-fphwizvcm55ydg94.js +12 -0
- package/dist/chunks/FloatingPortalLite-j7dsy7gokbxdoe1i.js +25 -0
- package/dist/chunks/FloatingRootStore-men6ufp3a2b296fh.js +840 -0
- package/dist/chunks/FloatingTree-kiyzavvaum442o1s.js +115 -0
- package/dist/chunks/Form-oz425k7r4abea8o4.js +113 -0
- package/dist/chunks/FormContext-jv19engyccpf6xcl.js +18 -0
- package/dist/chunks/Input-ozudotydd679ly63.js +20 -0
- package/dist/chunks/InputDataAttributes-oy8t6q5y5t8ik02j.js +42 -0
- package/dist/chunks/ItemIndicator-cvf8cw5fv5l3cd8j.js +37 -0
- package/dist/chunks/LabelableContext-dz4wz3lu3lgqusu7.js +135 -0
- package/dist/chunks/ListboxSeparator-skazx18vzzj7i9zp.js +21 -0
- package/dist/chunks/MenuClearDataAttributes-fo0pekd36n56mdxu.js +1645 -0
- package/dist/chunks/MenuSubmenuTrigger-hm5xbgik6aq95x35.js +1976 -0
- package/dist/chunks/MenuSubmenuTriggerDataAttributes-gdfxdjymgmnaxdds.js +372 -0
- package/dist/chunks/MenuTrigger-dlfvicsaggss0o9m.js +265 -0
- package/dist/chunks/Menubar-ja5int05ihjj0ra4.js +116 -0
- package/dist/chunks/MenubarContext-ooz0h08i55c8oip5.js +12 -0
- package/dist/chunks/MeterLabel-cykbkvqys5263z05.js +148 -0
- package/dist/chunks/NavigationMenuIconDataAttributes-l82pkpm61d0meqxf.js +1654 -0
- package/dist/chunks/NullStore-my62xo2vfcfkerri.js +110 -0
- package/dist/chunks/NumberFieldScrubAreaCursorDataAttributes-k2lsbk35svshnwf5.js +1493 -0
- package/dist/chunks/OTPFieldInputDataAttributes-gvgtu2gg85kgjzwr.js +683 -0
- package/dist/chunks/PopoverViewport-peh28i8q4hqfjy97.js +713 -0
- package/dist/chunks/PopoverViewportDataAttributes-gplhq9d7ffp9q8u3.js +329 -0
- package/dist/chunks/PrehydrationScript-hs2je3mndbxuts7w.js +78 -0
- package/dist/chunks/PreviewCardViewportDataAttributes-bgfwmyshey7fx6nr.js +914 -0
- package/dist/chunks/ProgressLabelDataAttributes-j8mutcz11ei0ohvj.js +287 -0
- package/dist/chunks/RadioGroup-kioqngmmuo7a1lfa.js +163 -0
- package/dist/chunks/RadioGroupContext-dr6uihsj7oky0eol.js +10 -0
- package/dist/chunks/RadioGroupDataAttributes-dpdr6xe4ve204qwb.js +10 -0
- package/dist/chunks/RadioIndicator-bhxqih8wzv7hyrec.js +299 -0
- package/dist/chunks/RadioIndicatorDataAttributes-n5yupp5psifu0d4f.js +80 -0
- package/dist/chunks/ScrollAreaThumb-hxig41yn4lrurd3o.js +928 -0
- package/dist/chunks/ScrollAreaThumbDataAttributes-gup5wfxvqye6jj27.js +137 -0
- package/dist/chunks/SelectScrollUpArrowDataAttributes-fce5i1afjkb0necr.js +473 -0
- package/dist/chunks/SelectSeparator-nnak70azojox8b2b.js +1632 -0
- package/dist/chunks/Separator-fhwve0tfny3tht3a.js +24 -0
- package/dist/chunks/SeparatorDataAttributes-ch6e63bas7zflw00.js +11 -0
- package/dist/chunks/SliderIndicator-h1o3qbrvr8x0t4t2.js +1171 -0
- package/dist/chunks/SliderIndicatorDataAttributes-ff2f1cjealif5nvo.js +240 -0
- package/dist/chunks/SwitchRoot-m4t2tq5zn5wibyxk.js +244 -0
- package/dist/chunks/SwitchThumbDataAttributes-f95ld864on9y6ptk.js +90 -0
- package/dist/chunks/TabsList-n5n93rxr4sy704u8.js +664 -0
- package/dist/chunks/TabsListDataAttributes-e03a7kbubuf02z1l.js +183 -0
- package/dist/chunks/ToastArrowDataAttributes-jbnvz3kp6a35slgj.js +136 -0
- package/dist/chunks/ToggleDataAttributes-jl9ojyvwgrvefke6.js +103 -0
- package/dist/chunks/ToggleGroupContext-hg8zbkgqpscqhz83.js +10 -0
- package/dist/chunks/ToggleGroupDataAttributes-n1dwona1alvabstl.js +102 -0
- package/dist/chunks/ToolbarGroupContext-eawva8xkxb4osbxb.js +10 -0
- package/dist/chunks/ToolbarInput-kyxl1be0p3cyuayp.js +174 -0
- package/dist/chunks/ToolbarInputDataAttributes-n4a18a4km735du04.js +150 -0
- package/dist/chunks/ToolbarRootContext-difqbj720teyt8lu.js +12 -0
- package/dist/chunks/TooltipPopup-furysmeyb68uycbz.js +839 -0
- package/dist/chunks/TooltipProvider-hyans0ens4axh1y8.js +61 -0
- package/dist/chunks/TooltipViewportDataAttributes-gkwbezdq40ssuevg.js +312 -0
- package/dist/chunks/adaptiveOriginMiddleware-m9tqzw58wya9sdds.js +51 -0
- package/dist/chunks/addEventListener-ku3x23446prmd1kz.js +13 -0
- package/dist/chunks/areArraysEqual-nnpg93s9g7aqcaoh.js +15 -0
- package/dist/chunks/autocomplete-gdd9aruremdgdvx7.js +152 -0
- package/dist/chunks/badge-gca8xfu79ne55d5k.js +165 -0
- package/dist/chunks/banner-mo1xl9ww734kgsqh.js +269 -0
- package/dist/chunks/breadcrumbs-z1jo40oxlw8e4eh4.js +159 -0
- package/dist/chunks/button-group-biv43ksvaipc3p5n.js +59 -0
- package/dist/chunks/button-hzvowfkbathmx8yg.js +274 -0
- package/dist/chunks/chart-dgh98nbzo2sux2bs.js +3985 -0
- package/dist/chunks/checkbox-eifiwbw34xwsikvf.js +211 -0
- package/dist/chunks/clamp-rcpupxvhqrn8uuyf.js +7 -0
- package/dist/chunks/clipboard-text-oukrnke1s3kebk3y.js +209 -0
- package/dist/chunks/cloudflare-logo-d8mid9xr190h78cu.js +186 -0
- package/dist/chunks/code-hp2x28uiufmk3elz.js +94 -0
- package/dist/chunks/collapsible-ic6813hc4yv5s5hv.js +185 -0
- package/dist/chunks/combobox-mzvobpvalz2gnpli.js +321 -0
- package/dist/chunks/command-palette-d45ueqbuxygu87ir.js +507 -0
- package/dist/chunks/composite-c11t1ok72s3cggjc.js +90 -0
- package/dist/chunks/constants-l10cgj6pyqg27jod.js +5 -0
- package/dist/chunks/createBaseUIEventDetails-nvee6bghv2reeqdb.js +50 -0
- package/dist/chunks/createItems-n07tfwx89cdoar18.js +323 -0
- package/dist/chunks/createToastManager-cxjmn4jx3ejh85fs.js +1225 -0
- package/dist/chunks/date-picker-ija2bz17ai6ypnao.js +6865 -0
- package/dist/chunks/date-range-picker-oivlshld01jbel29.js +336 -0
- package/dist/chunks/dialog-g7wavhkdv2gplwq9.js +173 -0
- package/dist/chunks/dropdown-m5a8nwer5hpvnkfk.js +384 -0
- package/dist/chunks/empty-e0onzpyokyl6h9bp.js +96 -0
- package/dist/chunks/engine-hzmefiqm63hu0c7i.js +10 -0
- package/dist/chunks/error-lbnic2b20qr3mukp.js +6 -0
- package/dist/chunks/field-fowmq5smvp17pnqe.js +75 -0
- package/dist/chunks/flow-fak0fyldoaozd32s.js +10290 -0
- package/dist/chunks/formatNumber-b4kjdsebslm2b3t0.js +21 -0
- package/dist/chunks/getCssDimensions-gckwdrp86f73cv51.js +21 -0
- package/dist/chunks/getElementTransform-cz3jyftv0x5io95f.js +38 -0
- package/dist/chunks/getFiniteAnimations-jwd833ybtz81j5f0.js +13 -0
- package/dist/chunks/getHighlightReason-fhc53kq6qakcct9s.js +15 -0
- package/dist/chunks/getPseudoElementBounds-csuw8kwsoeyxd5tv.js +37 -0
- package/dist/chunks/grid-nwiczrab3r4w0zr2.js +118 -0
- package/dist/chunks/highlighter-mouttug0tu8xg1i8.js +1364 -0
- package/dist/chunks/index.parts-db9pzsm9rrs9tp0t.js +200 -0
- package/dist/chunks/index.parts-ggacwr0yakuemead.js +24 -0
- package/dist/chunks/index.parts-pcg3pmf3yyro841t.js +13 -0
- package/dist/chunks/inertValue-n09gkjvwwa1kddov.js +9 -0
- package/dist/chunks/inline-copy-text-izxpvnrtebcqlquf.js +104 -0
- package/dist/chunks/input-group-h9fepskc84e1h11n.js +457 -0
- package/dist/chunks/input-kfi46426y22ocoo4.js +85 -0
- package/dist/chunks/input-m2tfec2viezoz9hh.js +146 -0
- package/dist/chunks/isElementDisabled-dyqutxpzdfppbohx.js +7 -0
- package/dist/chunks/itemEquality-ki3x4tzdhjlqjey6.js +56 -0
- package/dist/chunks/label-f18fnpbv85jddo4q.js +76 -0
- package/dist/chunks/layer-card-lsmeuqic9i1isv2b.js +74 -0
- package/dist/chunks/layer-dialog-ejtz9s7bbfhjk1md.js +414 -0
- package/dist/chunks/link-h84bkh8eem39p529.js +112 -0
- package/dist/chunks/link-provider-kbwllpbo24fvgioj.js +60 -0
- package/dist/chunks/loader-kv5nk8j8tsuesxqo.js +87 -0
- package/dist/chunks/locale-provider-j4ii538ntyok36r6.js +50 -0
- package/dist/chunks/menubar-gzlyhmmc4i24prn1.js +106 -0
- package/dist/chunks/mergeCleanups-nw73c6jfwl5tyhw4.js +15 -0
- package/dist/chunks/meter-poh8jpe0qtq6mvee.js +35 -0
- package/dist/chunks/pagination-lmogkvvtu19mnr7f.js +296 -0
- package/dist/chunks/popover-nqrt3ykqv6sic8pz.js +206 -0
- package/dist/chunks/popupHandle-dk3ixgc8flr7v971.js +177 -0
- package/dist/chunks/popupStoreUtils-czfnxn051xakask5.js +868 -0
- package/dist/chunks/portal-provider-eveknxf26oudn7pp.js +63 -0
- package/dist/chunks/radio-nf717i5ypsga9zdh.js +204 -0
- package/dist/chunks/reason-parts-hssx64rmlxyn6gw5.js +40 -0
- package/dist/chunks/resolve-variant-l6x5ksfrjtu4m66l.js +35 -0
- package/dist/chunks/resolveAriaLabelledBy-knaucrjrjwnk7tvs.js +10 -0
- package/dist/chunks/resolveValueLabel-ntacnb58mhka5gg0.js +70 -0
- package/dist/chunks/rolldown-runtime-hi7ti5xiuxsegr96.js +18 -0
- package/dist/chunks/safePolygon-ep4133qogeu5vjf3.js +661 -0
- package/dist/chunks/safeReact-ek77ilng4ekk7mgz.js +18 -0
- package/dist/chunks/scrollable-k784b35i80aolmvg.js +29 -0
- package/dist/chunks/select-lnekz415wm4v6d6m.js +279 -0
- package/dist/chunks/sensitive-input-dvwlnntm7rdudwp0.js +252 -0
- package/dist/chunks/serializeValue-d1otz2i7h5tygrwf.js +13 -0
- package/dist/chunks/sidebar-mhlgvpawixxoey2k.js +1466 -0
- package/dist/chunks/skeleton-line-kmhnp0lx3rxhioxa.js +74 -0
- package/dist/chunks/slider-e395gihi5cjd62ss.js +87 -0
- package/dist/chunks/stringifyLocale-gbxouqj7ol627jxh.js +9 -0
- package/dist/chunks/styles-eb8bvypmayf578jf.js +35 -0
- package/dist/chunks/surface-jr8x5hy0gucjk5ig.js +30 -0
- package/dist/chunks/switch-nc8thi7ogd51m3gi.js +202 -0
- package/dist/chunks/table-ngl1b5yc8mcur662.js +238 -0
- package/dist/chunks/table-of-contents-gkjv9ck8etbz64ej.js +234 -0
- package/dist/chunks/tabs-o59bv7348nh2gppm.js +280 -0
- package/dist/chunks/tag-input-lbx9yzt33d4wu07o.js +156 -0
- package/dist/chunks/text-nqum95flcp07ac9s.js +126 -0
- package/dist/chunks/toast-ljpenshot856xqq4.js +341 -0
- package/dist/chunks/toolbar-kh6pc12ii7b6dv1x.js +141 -0
- package/dist/chunks/tooltip-bcymn9bfyz29fvji.js +92 -0
- package/dist/chunks/unwrap-lazy-element-hzbdkmujhd7iksau.js +45 -0
- package/dist/chunks/use-copy-feedback-gl55ghst0csvpv4j.js +55 -0
- package/dist/chunks/useAnchoredPopupScrollLock-msm8tzkewysnunut.js +31 -0
- package/dist/chunks/useAnimationFrame-k9lqdj9quln3sd85.js +87 -0
- package/dist/chunks/useAriaLabelledBy-j3j9jqlr9ukyk08s.js +36 -0
- package/dist/chunks/useBaseUiId-nk4k7nj9h1cy76ny.js +13 -0
- package/dist/chunks/useButton-lklvdzuhvj22bx07.js +186 -0
- package/dist/chunks/useClick-pcbkcc7r620v1smu.js +87 -0
- package/dist/chunks/useCollapsiblePanel-lrfsgx21ds36cwlp.js +415 -0
- package/dist/chunks/useCompositeItem-2juex3zh9gyrs8e9.js +31 -0
- package/dist/chunks/useCompositeListItem-ekwo2j2rjkggg7xj.js +54 -0
- package/dist/chunks/useControlled-i3srnkxy598s0au9.js +52 -0
- package/dist/chunks/useFieldValidation-oe16jiigp971yrzr.js +224 -0
- package/dist/chunks/useFloatingRootContext-k676b6m7f80bdapd.js +51 -0
- package/dist/chunks/useFocus-mn7a9t9v6fnlb4mf.js +124 -0
- package/dist/chunks/useId-82z8yqlmc1hy1c5t.js +50 -0
- package/dist/chunks/useInitialLiveRegionTextMutation-nl2hus7zx1h7ggno.js +86 -0
- package/dist/chunks/useLabel-me6zzfvkypo458pi.js +58 -0
- package/dist/chunks/useLabelableId-bjeh6q3pgrqjb7er.js +56 -0
- package/dist/chunks/useListNavigation-hpddbd0cc9pvt461.js +441 -0
- package/dist/chunks/useOnMount-gxggz1m0n869s6r0.js +12 -0
- package/dist/chunks/useOpenChangeComplete-edtabjwqmechsyv6.js +129 -0
- package/dist/chunks/usePopupHandleStore-gawjmfjf1xdgiph3.js +27 -0
- package/dist/chunks/usePopupViewport-l6w01iohvzloghy8.js +367 -0
- package/dist/chunks/usePositioner-mzvgnazldqvy44z2.js +580 -0
- package/dist/chunks/usePressAndHold-k9ynk78pgf677kpx.js +179 -0
- package/dist/chunks/usePreviousValue-o6swt5tb7xhpdu4e.js +21 -0
- package/dist/chunks/useRegisterFieldControl-m1stc9l9y4cndf0k.js +40 -0
- package/dist/chunks/useRegisteredLabelId-b7u9ygya03448zzn.js +16 -0
- package/dist/chunks/useRender-h9ktka9xt4obdv6y.js +13 -0
- package/dist/chunks/useRenderDialogRoot-bsqrqpc1ddau7xg4.js +312 -0
- package/dist/chunks/useRenderElement-nkklxbq1rp7h2kw0.js +436 -0
- package/dist/chunks/useScrollLock-le7ajwlt7oh6fzxi.js +877 -0
- package/dist/chunks/useSetFieldFocused-fbvj7gcv67dqfkp0.js +35 -0
- package/dist/chunks/useStableCallback-le5qgj6p9l04729n.js +38 -0
- package/dist/chunks/useSwipeDismiss-e8tfxzlp05p86mgb.js +697 -0
- package/dist/chunks/useTimeout-f0ayn2l2l9aop4l8.js +43 -0
- package/dist/chunks/useTransitionStatus-disysoblzgk34w14.js +74 -0
- package/dist/chunks/useTriggerFocusGuards-dyd3hb1m8en8ct50.js +40 -0
- package/dist/chunks/useTriggerSwitchTransition-hk5j36hd5dq2ok6w.js +62 -0
- package/dist/chunks/useTypeahead-kfdsw1ksl5bgvvzl.js +111 -0
- package/dist/chunks/useValueAsRef-dv0tmfr1xlpzdlru.js +27 -0
- package/dist/chunks/useValueChanged-fjssa2v6d4w8y332.js +15 -0
- package/dist/chunks/utils-o44zfmzz9z7uyj1v.js +18 -0
- package/dist/chunks/valueToPercent-djk2mqnihth2uvf6.js +7 -0
- package/dist/chunks/vendor-floating-ui-fqblx3wa0r71mjoo.js +1458 -0
- package/dist/chunks/vendor-styling-gs32v7xt5znc8kg0.js +1167 -0
- package/dist/chunks/vendor-utils-io8z5lsfxq8m2dcc.js +660 -0
- package/dist/chunks/visuallyHidden-kzzs9hbe93is3rci.js +25 -0
- package/dist/code/server.d.ts +11 -0
- package/dist/code/server.js +18 -0
- package/dist/code.d.ts +65 -0
- package/dist/code.js +232 -0
- package/dist/command-line/cli.js +1705 -0
- package/dist/command-line/commands/add.js +282 -0
- package/dist/command-line/commands/ai.js +22 -0
- package/dist/command-line/commands/blocks.js +61 -0
- package/dist/command-line/commands/doc.js +167 -0
- package/dist/command-line/commands/init.js +95 -0
- package/dist/command-line/commands/ls.js +53 -0
- package/dist/command-line/commands/theme.js +850 -0
- package/dist/components/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete.js +3 -0
- package/dist/components/badge.d.ts +2 -0
- package/dist/components/badge.js +3 -0
- package/dist/components/banner.d.ts +2 -0
- package/dist/components/banner.js +3 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +3 -0
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.js +3 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +3 -0
- package/dist/components/chart.d.ts +2 -0
- package/dist/components/chart.js +3 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +3 -0
- package/dist/components/clipboard-text.d.ts +2 -0
- package/dist/components/clipboard-text.js +3 -0
- package/dist/components/cloudflare-logo.d.ts +2 -0
- package/dist/components/cloudflare-logo.js +3 -0
- package/dist/components/code.d.ts +2 -0
- package/dist/components/code.js +3 -0
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +3 -0
- package/dist/components/command-palette.d.ts +2 -0
- package/dist/components/command-palette.js +3 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +3 -0
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +3 -0
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +3 -0
- package/dist/components/dropdown.d.ts +2 -0
- package/dist/components/dropdown.js +3 -0
- package/dist/components/empty.d.ts +2 -0
- package/dist/components/empty.js +3 -0
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +3 -0
- package/dist/components/flow.d.ts +2 -0
- package/dist/components/flow.js +3 -0
- package/dist/components/grid.d.ts +2 -0
- package/dist/components/grid.js +3 -0
- package/dist/components/inline-copy-text.d.ts +2 -0
- package/dist/components/inline-copy-text.js +3 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +3 -0
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.js +5 -0
- package/dist/components/label.d.ts +2 -0
- package/dist/components/label.js +3 -0
- package/dist/components/layer-card.d.ts +2 -0
- package/dist/components/layer-card.js +3 -0
- package/dist/components/layer-dialog.d.ts +2 -0
- package/dist/components/layer-dialog.js +3 -0
- package/dist/components/link.d.ts +67 -0
- package/dist/components/link.js +3 -0
- package/dist/components/loader.d.ts +2 -0
- package/dist/components/loader.js +4 -0
- package/dist/components/menubar.d.ts +2 -0
- package/dist/components/menubar.js +3 -0
- package/dist/components/meter.d.ts +2 -0
- package/dist/components/meter.js +3 -0
- package/dist/components/pagination.d.ts +2 -0
- package/dist/components/pagination.js +3 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/radio.d.ts +2 -0
- package/dist/components/radio.js +3 -0
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +3 -0
- package/dist/components/sensitive-input.d.ts +2 -0
- package/dist/components/sensitive-input.js +3 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +3 -0
- package/dist/components/slider.d.ts +2 -0
- package/dist/components/slider.js +3 -0
- package/dist/components/surface.d.ts +2 -0
- package/dist/components/surface.js +3 -0
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +3 -0
- package/dist/components/table-of-contents.d.ts +2 -0
- package/dist/components/table-of-contents.js +3 -0
- package/dist/components/table.d.ts +2 -0
- package/dist/components/table.js +3 -0
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +3 -0
- package/dist/components/tag-input.d.ts +2 -0
- package/dist/components/tag-input.js +3 -0
- package/dist/components/text.d.ts +2 -0
- package/dist/components/text.js +3 -0
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +4 -0
- package/dist/components/toolbar.d.ts +2 -0
- package/dist/components/toolbar.js +3 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +3 -0
- package/dist/config-BKj6nyHa.d.ts +620 -0
- package/dist/field-DIjlHM8W.d.ts +91 -0
- package/dist/highlighter-BT3TakhJ.d.ts +13 -0
- package/dist/index-2jvVmJ8P.d.ts +46 -0
- package/dist/index-5PpauI_2.d.ts +85 -0
- package/dist/index-AMEc1MEg.d.ts +180 -0
- package/dist/index-AUC5xRcO.d.ts +236 -0
- package/dist/index-B7epkoHc.d.ts +72 -0
- package/dist/index-B9-RdY6D.d.ts +75 -0
- package/dist/index-BD-gTiEv.d.ts +71 -0
- package/dist/index-BK1tZgmP.d.ts +426 -0
- package/dist/index-BVgXnR1V.d.ts +137 -0
- package/dist/index-BW1HVU7T.d.ts +119 -0
- package/dist/index-BWe6haHU.d.ts +64 -0
- package/dist/index-BkTAB4wj.d.ts +673 -0
- package/dist/index-Bwhwpw_j.d.ts +189 -0
- package/dist/index-BzE0aNpx.d.ts +143 -0
- package/dist/index-C7RoG_CH.d.ts +57 -0
- package/dist/index-CE09bLNb.d.ts +72 -0
- package/dist/index-CJRe-8P-.d.ts +174 -0
- package/dist/index-CNL6VDYZ.d.ts +138 -0
- package/dist/index-CReGk3Dc.d.ts +91 -0
- package/dist/index-CU_lnxg7.d.ts +287 -0
- package/dist/index-CYoiniZ4.d.ts +135 -0
- package/dist/index-ClS-eFxE.d.ts +104 -0
- package/dist/index-CzIWigmH.d.ts +62 -0
- package/dist/index-CzTgKPh-.d.ts +105 -0
- package/dist/index-D2Gvly0i.d.ts +96 -0
- package/dist/index-DIV3riUd.d.ts +148 -0
- package/dist/index-DL1-uSuH.d.ts +1 -0
- package/dist/index-DYYiDxZs.d.ts +243 -0
- package/dist/index-DjSGDESy.d.ts +222 -0
- package/dist/index-Dmbgjww7.d.ts +157 -0
- package/dist/index-DwNMa4LN.d.ts +166 -0
- package/dist/index-Dx7hOWUc.d.ts +93 -0
- package/dist/index-DxOyYZaJ.d.ts +251 -0
- package/dist/index-NnHba-T1.d.ts +136 -0
- package/dist/index-RP_rt8vB.d.ts +140 -0
- package/dist/index-T1sSoiWG.d.ts +184 -0
- package/dist/index-aahL-0Zw.d.ts +60 -0
- package/dist/index-bBPKMepR.d.ts +73 -0
- package/dist/index-g-eFm1Bq.d.ts +877 -0
- package/dist/index-gYC6cQVO.d.ts +105 -0
- package/dist/index-lOWfpkxK.d.ts +118 -0
- package/dist/index-pjdgauIH.d.ts +170 -0
- package/dist/index-yK3Hayg_.d.ts +40 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +207 -0
- package/dist/input-BeWEb-jD.d.ts +122 -0
- package/dist/input-group-8gEtPiKw.d.ts +100 -0
- package/dist/layer-card-BNIn9pqy.d.ts +56 -0
- package/dist/link-provider-tz-NJp9x.d.ts +67 -0
- package/dist/locale-provider-CHMCQ0-J.d.ts +40 -0
- package/dist/panda.d.ts +25 -0
- package/dist/panda.js +32 -0
- package/dist/portal-provider-BAqPpq_a.d.ts +55 -0
- package/dist/primitives/accordion.d.ts +1 -0
- package/dist/primitives/accordion.js +3 -0
- package/dist/primitives/alert-dialog.d.ts +1 -0
- package/dist/primitives/alert-dialog.js +8 -0
- package/dist/primitives/autocomplete.d.ts +1 -0
- package/dist/primitives/autocomplete.js +6 -0
- package/dist/primitives/avatar.d.ts +1 -0
- package/dist/primitives/avatar.js +3 -0
- package/dist/primitives/button.d.ts +1 -0
- package/dist/primitives/button.js +3 -0
- package/dist/primitives/checkbox-group.d.ts +1 -0
- package/dist/primitives/checkbox-group.js +4 -0
- package/dist/primitives/checkbox.d.ts +1 -0
- package/dist/primitives/checkbox.js +4 -0
- package/dist/primitives/collapsible.d.ts +1 -0
- package/dist/primitives/collapsible.js +5 -0
- package/dist/primitives/combobox.d.ts +1 -0
- package/dist/primitives/combobox.js +6 -0
- package/dist/primitives/context-menu.d.ts +1 -0
- package/dist/primitives/context-menu.js +6 -0
- package/dist/primitives/csp-provider.d.ts +1 -0
- package/dist/primitives/csp-provider.js +3 -0
- package/dist/primitives/dialog.d.ts +1 -0
- package/dist/primitives/dialog.js +9 -0
- package/dist/primitives/direction-provider.d.ts +1 -0
- package/dist/primitives/direction-provider.js +4 -0
- package/dist/primitives/drawer.d.ts +1 -0
- package/dist/primitives/drawer.js +6 -0
- package/dist/primitives/field.d.ts +1 -0
- package/dist/primitives/field.js +4 -0
- package/dist/primitives/fieldset.d.ts +1 -0
- package/dist/primitives/fieldset.js +3 -0
- package/dist/primitives/form.d.ts +1 -0
- package/dist/primitives/form.js +3 -0
- package/dist/primitives/input.d.ts +1 -0
- package/dist/primitives/input.js +4 -0
- package/dist/primitives/menu.d.ts +1 -0
- package/dist/primitives/menu.js +6 -0
- package/dist/primitives/menubar.d.ts +1 -0
- package/dist/primitives/menubar.js +3 -0
- package/dist/primitives/meter.d.ts +1 -0
- package/dist/primitives/meter.js +3 -0
- package/dist/primitives/navigation-menu.d.ts +1 -0
- package/dist/primitives/navigation-menu.js +3 -0
- package/dist/primitives/number-field.d.ts +1 -0
- package/dist/primitives/number-field.js +3 -0
- package/dist/primitives/otp-field.d.ts +3 -0
- package/dist/primitives/otp-field.js +4 -0
- package/dist/primitives/popover.d.ts +1 -0
- package/dist/primitives/popover.js +3 -0
- package/dist/primitives/preview-card.d.ts +1 -0
- package/dist/primitives/preview-card.js +3 -0
- package/dist/primitives/progress.d.ts +1 -0
- package/dist/primitives/progress.js +3 -0
- package/dist/primitives/radio-group.d.ts +1 -0
- package/dist/primitives/radio-group.js +4 -0
- package/dist/primitives/radio.d.ts +1 -0
- package/dist/primitives/radio.js +4 -0
- package/dist/primitives/scroll-area.d.ts +1 -0
- package/dist/primitives/scroll-area.js +4 -0
- package/dist/primitives/select.d.ts +1 -0
- package/dist/primitives/select.js +5 -0
- package/dist/primitives/separator.d.ts +1 -0
- package/dist/primitives/separator.js +4 -0
- package/dist/primitives/slider.d.ts +1 -0
- package/dist/primitives/slider.js +4 -0
- package/dist/primitives/switch.d.ts +1 -0
- package/dist/primitives/switch.js +4 -0
- package/dist/primitives/tabs.d.ts +1 -0
- package/dist/primitives/tabs.js +4 -0
- package/dist/primitives/toast.d.ts +1 -0
- package/dist/primitives/toast.js +5 -0
- package/dist/primitives/toggle-group.d.ts +1 -0
- package/dist/primitives/toggle-group.js +3 -0
- package/dist/primitives/toggle.d.ts +1 -0
- package/dist/primitives/toggle.js +3 -0
- package/dist/primitives/toolbar.d.ts +1 -0
- package/dist/primitives/toolbar.js +3 -0
- package/dist/primitives/tooltip.d.ts +1 -0
- package/dist/primitives/tooltip.js +4 -0
- package/dist/primitives.d.ts +42 -0
- package/dist/primitives.js +71 -0
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +1 -0
- package/dist/scripts/theme-generator/config.d.ts +2 -0
- package/dist/scripts/theme-generator/config.js +487 -0
- package/dist/scripts/theme-generator/types.d.ts +2 -0
- package/dist/scripts/theme-generator/types.js +1 -0
- package/dist/styles/kumo-binding.css +491 -0
- package/dist/styles/kumo-standalone.css +2 -0
- package/dist/styles/kumo.css +135 -0
- package/dist/styles/theme-code.css +142 -0
- package/dist/styles/theme-fedramp.css +31 -0
- package/dist/styles/theme-fldr.css +481 -0
- package/dist/styles/theme-kumo.css +464 -0
- package/dist/text-CRRU2g-u.d.ts +183 -0
- package/dist/theming.d.ts +224 -0
- package/dist/theming.js +386 -0
- package/dist/tooltip-D_vhi1PN.d.ts +105 -0
- package/dist/types-CdzJnnIl.d.ts +193 -0
- package/dist/types-Cl4HuOrB.d.ts +84 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +7 -0
- package/package.json +481 -3
- package/scripts/component-registry/cache.ts +123 -0
- package/scripts/component-registry/discovery.ts +560 -0
- package/scripts/component-registry/example-cleanup.ts +168 -0
- package/scripts/component-registry/index.test.ts +1075 -0
- package/scripts/component-registry/index.ts +1065 -0
- package/scripts/component-registry/markdown-generator.ts +222 -0
- package/scripts/component-registry/metadata.ts +1030 -0
- package/scripts/component-registry/props-filter.ts +312 -0
- package/scripts/component-registry/schema-generator.ts +333 -0
- package/scripts/component-registry/sub-components.ts +393 -0
- package/scripts/component-registry/types.ts +158 -0
- package/scripts/component-registry/utils.ts +280 -0
- package/scripts/component-registry/variant-parser.ts +262 -0
- package/scripts/css-build.ts +107 -0
- package/scripts/format-generated.ts +12 -0
- package/scripts/generate-globe-land-mask.mjs +80 -0
- package/scripts/generate-primitives.ts +196 -0
- package/scripts/publish-fldr.ts +120 -0
- package/scripts/theme-generator/config.ts +666 -0
- package/scripts/theme-generator/generate-css.test.ts +30 -0
- package/scripts/theme-generator/generate-css.ts +352 -0
- package/scripts/theme-generator/index.ts +175 -0
- package/scripts/theme-generator/migrate.ts +560 -0
- package/scripts/theme-generator/types.ts +92 -0
|
@@ -0,0 +1,1632 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
+
import { c as NOOP, f as useMergedRefs, i as mergeProps, n as useRenderElement, o as EMPTY_ARRAY, p as useRefWithInit, s as EMPTY_OBJECT } from "./useRenderElement-nkklxbq1rp7h2kw0.js";
|
|
4
|
+
import { a as FloatingPortal, f as DROPDOWN_COLLISION_AVOIDANCE, n as ReactStore } from "./FloatingRootStore-men6ufp3a2b296fh.js";
|
|
5
|
+
import { n as useIsoLayoutEffect } from "./safeReact-ek77ilng4ekk7mgz.js";
|
|
6
|
+
import { n as useTimeout } from "./useTimeout-f0ayn2l2l9aop4l8.js";
|
|
7
|
+
import { H as transitionStatusMapping, M as triggerOpenStateMapping, N as popupOpen$1, P as pressed$1, Q as contains, j as pressableTriggerOpenStateMapping, k as popupStateMapping, rt as isVirtualClick, v as ownerDocument, y as getFloatingFocusElement } from "./vendor-utils-io8z5lsfxq8m2dcc.js";
|
|
8
|
+
import { n as webkit } from "./engine-hzmefiqm63hu0c7i.js";
|
|
9
|
+
import { c as platform, v as rectToClientRect, w as getWindow } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
10
|
+
import { t as createChangeEventDetails } from "./createBaseUIEventDetails-nvee6bghv2reeqdb.js";
|
|
11
|
+
import { I as windowResize, d as imperativeAction, t as cancelOpen, w as none, y as itemPress } from "./reason-parts-hssx64rmlxyn6gw5.js";
|
|
12
|
+
import { t as addEventListener } from "./addEventListener-ku3x23446prmd1kz.js";
|
|
13
|
+
import { t as useValueAsRef } from "./useValueAsRef-dv0tmfr1xlpzdlru.js";
|
|
14
|
+
import { t as useStableCallback } from "./useStableCallback-le5qgj6p9l04729n.js";
|
|
15
|
+
import { n as useAnimationFrame } from "./useAnimationFrame-k9lqdj9quln3sd85.js";
|
|
16
|
+
import { n as visuallyHiddenInput, t as visuallyHidden } from "./visuallyHidden-kzzs9hbe93is3rci.js";
|
|
17
|
+
import { g as useDismiss, i as attachPreventUnmountOnClose, m as useUnmountAfterClose, t as FOCUSABLE_POPUP_PROPS } from "./popupStoreUtils-czfnxn051xakask5.js";
|
|
18
|
+
import { n as InternalBackdrop, o as FloatingFocusManager, r as useOpenInteractionType } from "./useScrollLock-le7ajwlt7oh6fzxi.js";
|
|
19
|
+
import { t as useOpenChangeComplete } from "./useOpenChangeComplete-edtabjwqmechsyv6.js";
|
|
20
|
+
import { t as useClick } from "./useClick-pcbkcc7r620v1smu.js";
|
|
21
|
+
import { t as useFloatingRootContext } from "./useFloatingRootContext-k676b6m7f80bdapd.js";
|
|
22
|
+
import { a as useListNavigation } from "./useListNavigation-hpddbd0cc9pvt461.js";
|
|
23
|
+
import { t as useTypeahead } from "./useTypeahead-kfdsw1ksl5bgvvzl.js";
|
|
24
|
+
import { t as useBaseUiId } from "./useBaseUiId-nk4k7nj9h1cy76ny.js";
|
|
25
|
+
import { n as getDisabledMountTransitionStyles, r as useAnchorPositioning, t as usePositioner } from "./usePositioner-mzvgnazldqvy44z2.js";
|
|
26
|
+
import { n as useDirection } from "./DirectionContext-kpby968j030psajn.js";
|
|
27
|
+
import { t as inertValue } from "./inertValue-n09gkjvwwa1kddov.js";
|
|
28
|
+
import { t as usePreviousValue } from "./usePreviousValue-o6swt5tb7xhpdu4e.js";
|
|
29
|
+
import { a as useFieldRootContext, c as fieldValidityMapping, n as useLabelableContext } from "./LabelableContext-dz4wz3lu3lgqusu7.js";
|
|
30
|
+
import { n as useFormContext } from "./FormContext-jv19engyccpf6xcl.js";
|
|
31
|
+
import { t as useLabelableId } from "./useLabelableId-bjeh6q3pgrqjb7er.js";
|
|
32
|
+
import { r as useLabel } from "./useLabel-me6zzfvkypo458pi.js";
|
|
33
|
+
import { t as useSetFieldFocused } from "./useSetFieldFocused-fbvj7gcv67dqfkp0.js";
|
|
34
|
+
import { t as useRegisterFieldControl } from "./useRegisterFieldControl-m1stc9l9y4cndf0k.js";
|
|
35
|
+
import { t as useValueChanged } from "./useValueChanged-fjssa2v6d4w8y332.js";
|
|
36
|
+
import { t as useControlled } from "./useControlled-i3srnkxy598s0au9.js";
|
|
37
|
+
import { t as useButton } from "./useButton-lklvdzuhvj22bx07.js";
|
|
38
|
+
import { t as clamp } from "./clamp-rcpupxvhqrn8uuyf.js";
|
|
39
|
+
import { a as isSelectedValueDirty, i as findSelectionIndex, l as useOnFirstRender, n as defaultItemEquality, o as removeItem, r as findItemIndex, s as resolveSelectedIndex, t as compareItemEquality } from "./itemEquality-ki3x4tzdhjlqjey6.js";
|
|
40
|
+
import { a as resolveSelectedLabel, i as resolveMultipleLabels, n as hasNullItemLabel, o as stringifyAsLabel, s as stringifyAsValue } from "./resolveValueLabel-ntacnb58mhka5gg0.js";
|
|
41
|
+
import { n as resolveAriaLabelledBy, t as getDefaultLabelId } from "./resolveAriaLabelledBy-knaucrjrjwnk7tvs.js";
|
|
42
|
+
import { t as isMouseWithinBounds } from "./getPseudoElementBounds-csuw8kwsoeyxd5tv.js";
|
|
43
|
+
import { t as CompositeList } from "./CompositeList-gwuaf6d14s4da0j0.js";
|
|
44
|
+
import { t as useAnchoredPopupScrollLock } from "./useAnchoredPopupScrollLock-msm8tzkewysnunut.js";
|
|
45
|
+
import { t as useCompositeListItem } from "./useCompositeListItem-ekwo2j2rjkggg7xj.js";
|
|
46
|
+
import { t as ItemIndicator } from "./ItemIndicator-cvf8cw5fv5l3cd8j.js";
|
|
47
|
+
import { t as ListboxSeparator } from "./ListboxSeparator-skazx18vzzj7i9zp.js";
|
|
48
|
+
import { n as useToolbarRootContext } from "./ToolbarRootContext-difqbj720teyt8lu.js";
|
|
49
|
+
import { t as isElementDisabled } from "./isElementDisabled-dyqutxpzdfppbohx.js";
|
|
50
|
+
import { a as COMPOSITE_KEYS } from "./composite-c11t1ok72s3cggjc.js";
|
|
51
|
+
import { n as getMaxScrollOffset, r as normalizeScrollOffset, t as styleDisableScrollbar } from "./styles-eb8bvypmayf578jf.js";
|
|
52
|
+
import { n as useCSPContext } from "./CSPContext-iv67i0qqhihg8mur.js";
|
|
53
|
+
import * as React$1 from "react";
|
|
54
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
55
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/root/SelectRootContext.mjs
|
|
56
|
+
const SelectRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
57
|
+
SelectRootContext.displayName = "SelectRootContext";
|
|
58
|
+
const SelectFloatingContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
59
|
+
SelectFloatingContext.displayName = "SelectFloatingContext";
|
|
60
|
+
function useSelectRootContext() {
|
|
61
|
+
const store = React$1.useContext(SelectRootContext);
|
|
62
|
+
if (store === void 0) throw new Error("Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
63
|
+
return store;
|
|
64
|
+
}
|
|
65
|
+
function useSelectFloatingContext() {
|
|
66
|
+
const context = React$1.useContext(SelectFloatingContext);
|
|
67
|
+
if (context === void 0) throw new Error("Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
68
|
+
return context;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/store.mjs
|
|
72
|
+
/**
|
|
73
|
+
* Non-reactive values shared with the select parts. Nothing here is observable through
|
|
74
|
+
* `selectors`, so writing to a ref never notifies subscribers.
|
|
75
|
+
*/
|
|
76
|
+
const selectors = {
|
|
77
|
+
id: (state) => state.id,
|
|
78
|
+
labelId: (state) => state.labelId,
|
|
79
|
+
modal: (state) => state.modal,
|
|
80
|
+
multiple: (state) => state.multiple,
|
|
81
|
+
disabled: (state) => state.disabled,
|
|
82
|
+
readOnly: (state) => state.readOnly,
|
|
83
|
+
required: (state) => state.required,
|
|
84
|
+
highlightItemOnHover: (state) => state.highlightItemOnHover,
|
|
85
|
+
items: (state) => state.items,
|
|
86
|
+
itemToStringLabel: (state) => state.itemToStringLabel,
|
|
87
|
+
isItemEqualToValue: (state) => state.isItemEqualToValue,
|
|
88
|
+
value: (state) => state.value,
|
|
89
|
+
hasSelectedValue: (state) => {
|
|
90
|
+
const { value, multiple, itemToStringValue } = state;
|
|
91
|
+
if (value == null) return false;
|
|
92
|
+
if (multiple && Array.isArray(value)) return value.length > 0;
|
|
93
|
+
return stringifyAsValue(value, itemToStringValue) !== "";
|
|
94
|
+
},
|
|
95
|
+
hasNullItemLabel: (state, enabled) => {
|
|
96
|
+
return enabled ? hasNullItemLabel(state.items) : false;
|
|
97
|
+
},
|
|
98
|
+
open: (state) => state.open,
|
|
99
|
+
mounted: (state) => state.mounted,
|
|
100
|
+
forceMount: (state) => state.forceMount,
|
|
101
|
+
transitionStatus: (state) => state.transitionStatus,
|
|
102
|
+
openMethod: (state) => state.openMethod,
|
|
103
|
+
activeIndex: (state) => state.activeIndex,
|
|
104
|
+
selectedIndex: (state) => state.selectedIndex,
|
|
105
|
+
isActive: (state, index) => state.activeIndex === index,
|
|
106
|
+
isSelected: (state, itemValue) => {
|
|
107
|
+
const comparer = state.isItemEqualToValue;
|
|
108
|
+
const storeValue = state.value;
|
|
109
|
+
if (state.multiple) return Array.isArray(storeValue) && storeValue.some((selectedItem) => compareItemEquality(itemValue, selectedItem, comparer));
|
|
110
|
+
return compareItemEquality(itemValue, storeValue, comparer);
|
|
111
|
+
},
|
|
112
|
+
isSelectedByFocus: (state, index) => {
|
|
113
|
+
return state.selectedIndex === index;
|
|
114
|
+
},
|
|
115
|
+
popupProps: (state) => state.popupProps,
|
|
116
|
+
triggerProps: (state) => state.triggerProps,
|
|
117
|
+
itemRoot: (state) => state.itemRoot,
|
|
118
|
+
triggerElement: (state) => state.triggerElement,
|
|
119
|
+
positionerElement: (state) => state.positionerElement,
|
|
120
|
+
listElement: (state) => state.listElement,
|
|
121
|
+
popupSide: (state) => state.popupSide,
|
|
122
|
+
scrollUpArrowVisible: (state) => state.scrollUpArrowVisible,
|
|
123
|
+
scrollDownArrowVisible: (state) => state.scrollDownArrowVisible,
|
|
124
|
+
hasScrollArrows: (state) => state.hasScrollArrows
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/root/SelectRoot.mjs
|
|
128
|
+
/**
|
|
129
|
+
* Groups all parts of the select.
|
|
130
|
+
* Doesn't render its own HTML element.
|
|
131
|
+
*
|
|
132
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
133
|
+
*/
|
|
134
|
+
function SelectRoot(props) {
|
|
135
|
+
const { id, value: valueProp, defaultValue = null, onValueChange, open: openProp, defaultOpen = false, onOpenChange, name: nameProp, form, autoComplete, disabled: disabledProp = false, readOnly = false, required = false, modal = true, actionsRef, inputRef, onOpenChangeComplete, items, multiple = false, itemToStringLabel, itemToStringValue, isItemEqualToValue = defaultItemEquality, highlightItemOnHover = true, children } = props;
|
|
136
|
+
const { clearErrors } = useFormContext();
|
|
137
|
+
const { setDirty, setTouched, setFocused, validityData, setFilled, name: fieldName, disabled: fieldDisabled, validation, validationMode } = useFieldRootContext();
|
|
138
|
+
const generatedId = useLabelableId({ id });
|
|
139
|
+
const disabled = fieldDisabled || disabledProp;
|
|
140
|
+
const name = fieldName ?? nameProp;
|
|
141
|
+
const [value, setValueUnwrapped] = useControlled({
|
|
142
|
+
controlled: valueProp,
|
|
143
|
+
default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue,
|
|
144
|
+
name: "Select",
|
|
145
|
+
state: "value"
|
|
146
|
+
});
|
|
147
|
+
const [open, setOpenUnwrapped] = useControlled({
|
|
148
|
+
controlled: openProp,
|
|
149
|
+
default: defaultOpen,
|
|
150
|
+
name: "Select",
|
|
151
|
+
state: "open"
|
|
152
|
+
});
|
|
153
|
+
const listRef = React$1.useRef([]);
|
|
154
|
+
const labelsRef = React$1.useRef([]);
|
|
155
|
+
const popupRef = React$1.useRef(null);
|
|
156
|
+
const scrollHandlerRef = React$1.useRef(null);
|
|
157
|
+
const scrollArrowsMountedCountRef = React$1.useRef(0);
|
|
158
|
+
const valueRef = React$1.useRef(null);
|
|
159
|
+
const valuesRef = React$1.useRef([]);
|
|
160
|
+
const typingRef = React$1.useRef(false);
|
|
161
|
+
const firstItemTextRef = React$1.useRef(null);
|
|
162
|
+
const selectedItemTextRef = React$1.useRef(null);
|
|
163
|
+
const selectionRef = React$1.useRef({
|
|
164
|
+
allowSelectedMouseUp: false,
|
|
165
|
+
allowUnselectedMouseUp: false,
|
|
166
|
+
dragY: 0
|
|
167
|
+
});
|
|
168
|
+
const alignItemWithTriggerActiveRef = React$1.useRef(false);
|
|
169
|
+
const initialValueRef = React$1.useRef(value);
|
|
170
|
+
const { openMethod, triggerProps: interactionTypeProps } = useOpenInteractionType(open);
|
|
171
|
+
const store = useRefWithInit(() => new ReactStore({
|
|
172
|
+
id: generatedId,
|
|
173
|
+
labelId: void 0,
|
|
174
|
+
modal,
|
|
175
|
+
multiple,
|
|
176
|
+
disabled,
|
|
177
|
+
readOnly,
|
|
178
|
+
required,
|
|
179
|
+
highlightItemOnHover,
|
|
180
|
+
itemToStringLabel,
|
|
181
|
+
itemToStringValue,
|
|
182
|
+
isItemEqualToValue,
|
|
183
|
+
value,
|
|
184
|
+
open,
|
|
185
|
+
mounted: open,
|
|
186
|
+
transitionStatus: void 0,
|
|
187
|
+
items,
|
|
188
|
+
forceMount: false,
|
|
189
|
+
openMethod: null,
|
|
190
|
+
activeIndex: null,
|
|
191
|
+
selectedIndex: null,
|
|
192
|
+
popupProps: EMPTY_OBJECT,
|
|
193
|
+
triggerProps: EMPTY_OBJECT,
|
|
194
|
+
itemRoot: {
|
|
195
|
+
props: EMPTY_OBJECT,
|
|
196
|
+
multiple,
|
|
197
|
+
disabled,
|
|
198
|
+
readOnly,
|
|
199
|
+
isItemEqualToValue
|
|
200
|
+
},
|
|
201
|
+
triggerElement: null,
|
|
202
|
+
positionerElement: null,
|
|
203
|
+
listElement: null,
|
|
204
|
+
popupSide: null,
|
|
205
|
+
scrollUpArrowVisible: false,
|
|
206
|
+
scrollDownArrowVisible: false,
|
|
207
|
+
hasScrollArrows: false
|
|
208
|
+
}, {
|
|
209
|
+
setValue: NOOP,
|
|
210
|
+
setOpen: NOOP,
|
|
211
|
+
handleScrollArrowVisibility: NOOP,
|
|
212
|
+
onOpenChangeComplete: NOOP,
|
|
213
|
+
listRef,
|
|
214
|
+
popupRef,
|
|
215
|
+
scrollHandlerRef,
|
|
216
|
+
scrollArrowsMountedCountRef,
|
|
217
|
+
valueRef,
|
|
218
|
+
valuesRef,
|
|
219
|
+
labelsRef,
|
|
220
|
+
typingRef,
|
|
221
|
+
selectionRef,
|
|
222
|
+
firstItemTextRef,
|
|
223
|
+
selectedItemTextRef,
|
|
224
|
+
alignItemWithTriggerActiveRef,
|
|
225
|
+
initialValueRef
|
|
226
|
+
}, selectors)).current;
|
|
227
|
+
const [preventUnmountOnClose, setPreventUnmountOnClose] = React$1.useState(false);
|
|
228
|
+
const { mounted, transitionStatus, forceUnmount: handleUnmount } = useUnmountAfterClose({
|
|
229
|
+
open,
|
|
230
|
+
ref: popupRef,
|
|
231
|
+
preventUnmountOnClose,
|
|
232
|
+
setPreventUnmountOnClose,
|
|
233
|
+
onUnmount() {
|
|
234
|
+
store.update({
|
|
235
|
+
activeIndex: null,
|
|
236
|
+
openMethod: null,
|
|
237
|
+
scrollUpArrowVisible: false,
|
|
238
|
+
scrollDownArrowVisible: false
|
|
239
|
+
});
|
|
240
|
+
onOpenChangeComplete?.(false);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
const activeIndex = store.useState("activeIndex");
|
|
244
|
+
const selectedIndex = store.useState("selectedIndex");
|
|
245
|
+
const triggerElement = store.useState("triggerElement");
|
|
246
|
+
const positionerElement = store.useState("positionerElement");
|
|
247
|
+
const previousOpenMethod = usePreviousValue(openMethod);
|
|
248
|
+
const renderedOpenMethod = openMethod ?? previousOpenMethod;
|
|
249
|
+
const serializedValue = React$1.useMemo(() => {
|
|
250
|
+
if (multiple) return "";
|
|
251
|
+
return stringifyAsValue(value, itemToStringValue);
|
|
252
|
+
}, [
|
|
253
|
+
multiple,
|
|
254
|
+
value,
|
|
255
|
+
itemToStringValue
|
|
256
|
+
]);
|
|
257
|
+
const fieldStringValue = React$1.useMemo(() => {
|
|
258
|
+
if (multiple && Array.isArray(value)) return value.map((currentValue) => stringifyAsValue(currentValue, itemToStringValue));
|
|
259
|
+
return stringifyAsValue(value, itemToStringValue);
|
|
260
|
+
}, [
|
|
261
|
+
multiple,
|
|
262
|
+
value,
|
|
263
|
+
itemToStringValue
|
|
264
|
+
]);
|
|
265
|
+
const controlRef = useValueAsRef(triggerElement);
|
|
266
|
+
const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);
|
|
267
|
+
useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);
|
|
268
|
+
const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== "";
|
|
269
|
+
useIsoLayoutEffect(() => {
|
|
270
|
+
setFilled(hasSelectedValue);
|
|
271
|
+
}, [hasSelectedValue, setFilled]);
|
|
272
|
+
useIsoLayoutEffect(function syncSelectedIndex() {
|
|
273
|
+
const nextIndex = findSelectionIndex(valuesRef.current, value, isItemEqualToValue, multiple);
|
|
274
|
+
if (nextIndex === null) selectedItemTextRef.current = null;
|
|
275
|
+
if (open) return;
|
|
276
|
+
store.set("selectedIndex", nextIndex);
|
|
277
|
+
}, [
|
|
278
|
+
multiple,
|
|
279
|
+
open,
|
|
280
|
+
value,
|
|
281
|
+
isItemEqualToValue,
|
|
282
|
+
store
|
|
283
|
+
]);
|
|
284
|
+
useValueChanged(value, () => {
|
|
285
|
+
clearErrors(name);
|
|
286
|
+
setDirty(isSelectedValueDirty(value, validityData.initialValue, isItemEqualToValue));
|
|
287
|
+
validation.change(value);
|
|
288
|
+
});
|
|
289
|
+
const setOpen = useStableCallback((nextOpen, eventDetails) => {
|
|
290
|
+
const openEventDetails = eventDetails;
|
|
291
|
+
const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(openEventDetails);
|
|
292
|
+
onOpenChange?.(nextOpen, openEventDetails);
|
|
293
|
+
if (eventDetails.isCanceled) return;
|
|
294
|
+
if (!nextOpen) setPreventUnmountOnClose(shouldPreventUnmountOnClose());
|
|
295
|
+
setOpenUnwrapped(nextOpen);
|
|
296
|
+
if (!nextOpen && (eventDetails.reason === "focus-out" || eventDetails.reason === "outside-press")) {
|
|
297
|
+
setTouched(true);
|
|
298
|
+
setFocused(false);
|
|
299
|
+
if (validationMode === "onBlur") validation.commit(value);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
React$1.useImperativeHandle(actionsRef, () => ({
|
|
303
|
+
unmount: handleUnmount,
|
|
304
|
+
close: () => {
|
|
305
|
+
if (store.state.open) setOpen(false, createChangeEventDetails(imperativeAction));
|
|
306
|
+
}
|
|
307
|
+
}), [
|
|
308
|
+
handleUnmount,
|
|
309
|
+
setOpen,
|
|
310
|
+
store
|
|
311
|
+
]);
|
|
312
|
+
const setValue = useStableCallback((nextValue, eventDetails) => {
|
|
313
|
+
onValueChange?.(nextValue, eventDetails);
|
|
314
|
+
if (eventDetails.isCanceled) return;
|
|
315
|
+
setValueUnwrapped(nextValue);
|
|
316
|
+
});
|
|
317
|
+
const handleScrollArrowVisibility = useStableCallback((scroller) => {
|
|
318
|
+
const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);
|
|
319
|
+
const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);
|
|
320
|
+
const shouldShowUp = scrollTop > 0;
|
|
321
|
+
const shouldShowDown = scrollTop < maxScrollTop;
|
|
322
|
+
store.set("scrollUpArrowVisible", shouldShowUp);
|
|
323
|
+
store.set("scrollDownArrowVisible", shouldShowDown);
|
|
324
|
+
});
|
|
325
|
+
const floatingContext = useFloatingRootContext({
|
|
326
|
+
open,
|
|
327
|
+
onOpenChange: setOpen,
|
|
328
|
+
elements: {
|
|
329
|
+
reference: triggerElement,
|
|
330
|
+
floating: positionerElement
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
const click = useClick(floatingContext, {
|
|
334
|
+
enabled: !disabled,
|
|
335
|
+
event: "mousedown"
|
|
336
|
+
});
|
|
337
|
+
const dismiss = useDismiss(floatingContext);
|
|
338
|
+
const listNavigation = useListNavigation(floatingContext, {
|
|
339
|
+
enabled: !disabled,
|
|
340
|
+
listRef,
|
|
341
|
+
activeIndex,
|
|
342
|
+
selectedIndex,
|
|
343
|
+
disabledIndices: EMPTY_ARRAY,
|
|
344
|
+
onNavigate(nextActiveIndex) {
|
|
345
|
+
if (nextActiveIndex === null && !open) return;
|
|
346
|
+
store.set("activeIndex", nextActiveIndex);
|
|
347
|
+
},
|
|
348
|
+
focusItemOnHover: highlightItemOnHover
|
|
349
|
+
});
|
|
350
|
+
const typeahead = useTypeahead(floatingContext, {
|
|
351
|
+
enabled: !disabled && (open || !readOnly && !multiple),
|
|
352
|
+
listRef: labelsRef,
|
|
353
|
+
activeIndex,
|
|
354
|
+
selectedIndex,
|
|
355
|
+
disabledIndices: (index) => isElementDisabled(listRef.current[index]),
|
|
356
|
+
onMatch(index) {
|
|
357
|
+
if (open) store.set("activeIndex", index);
|
|
358
|
+
else setValue(valuesRef.current[index], createChangeEventDetails(none));
|
|
359
|
+
},
|
|
360
|
+
onTyping(typing) {
|
|
361
|
+
typingRef.current = typing;
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
const mergedTriggerProps = React$1.useMemo(() => mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps), [
|
|
365
|
+
click.reference,
|
|
366
|
+
typeahead.reference,
|
|
367
|
+
listNavigation.reference,
|
|
368
|
+
dismiss.reference,
|
|
369
|
+
interactionTypeProps
|
|
370
|
+
]);
|
|
371
|
+
const popupProps = React$1.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [
|
|
372
|
+
typeahead.floating,
|
|
373
|
+
listNavigation.floating,
|
|
374
|
+
dismiss.floating
|
|
375
|
+
]);
|
|
376
|
+
const itemProps = listNavigation.item ?? EMPTY_OBJECT;
|
|
377
|
+
const itemRoot = React$1.useMemo(() => ({
|
|
378
|
+
props: itemProps,
|
|
379
|
+
multiple,
|
|
380
|
+
disabled,
|
|
381
|
+
readOnly,
|
|
382
|
+
isItemEqualToValue
|
|
383
|
+
}), [
|
|
384
|
+
itemProps,
|
|
385
|
+
multiple,
|
|
386
|
+
disabled,
|
|
387
|
+
readOnly,
|
|
388
|
+
isItemEqualToValue
|
|
389
|
+
]);
|
|
390
|
+
store.useContextCallback("setValue", setValue);
|
|
391
|
+
store.useContextCallback("setOpen", setOpen);
|
|
392
|
+
store.useContextCallback("handleScrollArrowVisibility", handleScrollArrowVisibility);
|
|
393
|
+
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
394
|
+
useOnFirstRender(() => {
|
|
395
|
+
store.update({
|
|
396
|
+
popupProps,
|
|
397
|
+
triggerProps: mergedTriggerProps,
|
|
398
|
+
itemRoot
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
store.useSyncedValues({
|
|
402
|
+
id: generatedId,
|
|
403
|
+
modal,
|
|
404
|
+
multiple,
|
|
405
|
+
disabled,
|
|
406
|
+
readOnly,
|
|
407
|
+
required,
|
|
408
|
+
highlightItemOnHover,
|
|
409
|
+
value,
|
|
410
|
+
open,
|
|
411
|
+
mounted,
|
|
412
|
+
transitionStatus,
|
|
413
|
+
popupProps,
|
|
414
|
+
triggerProps: mergedTriggerProps,
|
|
415
|
+
itemRoot,
|
|
416
|
+
items,
|
|
417
|
+
itemToStringLabel,
|
|
418
|
+
itemToStringValue,
|
|
419
|
+
isItemEqualToValue,
|
|
420
|
+
openMethod: renderedOpenMethod
|
|
421
|
+
});
|
|
422
|
+
const ref = useMergedRefs(inputRef, validation.inputRef);
|
|
423
|
+
const hiddenInputName = multiple ? void 0 : name;
|
|
424
|
+
const hiddenInputs = React$1.useMemo(() => {
|
|
425
|
+
if (!multiple || !Array.isArray(value) || !name) return null;
|
|
426
|
+
return value.map((v) => {
|
|
427
|
+
const currentSerializedValue = stringifyAsValue(v, itemToStringValue);
|
|
428
|
+
return /*#__PURE__*/ jsx("input", {
|
|
429
|
+
type: "hidden",
|
|
430
|
+
form,
|
|
431
|
+
name,
|
|
432
|
+
value: currentSerializedValue,
|
|
433
|
+
disabled
|
|
434
|
+
}, currentSerializedValue);
|
|
435
|
+
});
|
|
436
|
+
}, [
|
|
437
|
+
multiple,
|
|
438
|
+
value,
|
|
439
|
+
form,
|
|
440
|
+
name,
|
|
441
|
+
itemToStringValue,
|
|
442
|
+
disabled
|
|
443
|
+
]);
|
|
444
|
+
return /*#__PURE__*/ jsxs(SelectRootContext.Provider, {
|
|
445
|
+
value: store,
|
|
446
|
+
children: [
|
|
447
|
+
/*#__PURE__*/ jsx(SelectFloatingContext.Provider, {
|
|
448
|
+
value: floatingContext,
|
|
449
|
+
children
|
|
450
|
+
}),
|
|
451
|
+
/*#__PURE__*/ jsx("input", {
|
|
452
|
+
...validation.getValidationProps(disabled, {
|
|
453
|
+
onFocus() {
|
|
454
|
+
store.state.triggerElement?.focus({ focusVisible: true });
|
|
455
|
+
},
|
|
456
|
+
onChange(event) {
|
|
457
|
+
if (event.nativeEvent.defaultPrevented || disabled || readOnly) return;
|
|
458
|
+
const nextValue = event.currentTarget.value;
|
|
459
|
+
const details = createChangeEventDetails(none, event.nativeEvent);
|
|
460
|
+
function handleChange() {
|
|
461
|
+
if (multiple) return;
|
|
462
|
+
const nextValueLower = nextValue.toLowerCase();
|
|
463
|
+
let matchingIndex = valuesRef.current.findIndex((candidate) => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);
|
|
464
|
+
if (matchingIndex === -1) matchingIndex = valuesRef.current.findIndex((_, index) => {
|
|
465
|
+
const renderedLabel = labelsRef.current[index];
|
|
466
|
+
return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;
|
|
467
|
+
});
|
|
468
|
+
const matchingValue = valuesRef.current[matchingIndex];
|
|
469
|
+
if (matchingValue != null) setValue(matchingValue, details);
|
|
470
|
+
}
|
|
471
|
+
store.set("forceMount", true);
|
|
472
|
+
queueMicrotask(handleChange);
|
|
473
|
+
}
|
|
474
|
+
}),
|
|
475
|
+
id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : void 0,
|
|
476
|
+
form,
|
|
477
|
+
name: hiddenInputName,
|
|
478
|
+
autoComplete,
|
|
479
|
+
value: serializedValue,
|
|
480
|
+
disabled,
|
|
481
|
+
required: required && !(multiple && hasSelectedValue),
|
|
482
|
+
readOnly,
|
|
483
|
+
ref,
|
|
484
|
+
style: name ? visuallyHiddenInput : visuallyHidden,
|
|
485
|
+
tabIndex: -1,
|
|
486
|
+
"aria-hidden": true,
|
|
487
|
+
suppressHydrationWarning: true
|
|
488
|
+
}),
|
|
489
|
+
hiddenInputs
|
|
490
|
+
]
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/label/SelectLabel.mjs
|
|
495
|
+
/**
|
|
496
|
+
* An accessible label that is automatically associated with the select trigger.
|
|
497
|
+
* Renders a `<div>` element.
|
|
498
|
+
*
|
|
499
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
500
|
+
*/
|
|
501
|
+
const SelectLabel = /*#__PURE__*/ React$1.forwardRef(function SelectLabel(componentProps, forwardedRef) {
|
|
502
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
503
|
+
const elementPropsWithoutId = elementProps;
|
|
504
|
+
delete elementPropsWithoutId.id;
|
|
505
|
+
const fieldRootContext = useFieldRootContext();
|
|
506
|
+
const store = useSelectRootContext();
|
|
507
|
+
const triggerElement = store.useState("triggerElement");
|
|
508
|
+
const rootId = store.useState("id");
|
|
509
|
+
const defaultLabelId = getDefaultLabelId(rootId);
|
|
510
|
+
const labelProps = useLabel({
|
|
511
|
+
id: defaultLabelId,
|
|
512
|
+
fallbackControlId: triggerElement?.id ?? rootId,
|
|
513
|
+
setLabelId(nextLabelId) {
|
|
514
|
+
const resolvedLabelId = typeof nextLabelId === "function" ? nextLabelId(store.state.labelId) : nextLabelId;
|
|
515
|
+
store.set("labelId", resolvedLabelId);
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
return useRenderElement("div", componentProps, {
|
|
519
|
+
ref: forwardedRef,
|
|
520
|
+
state: fieldRootContext.state,
|
|
521
|
+
props: [labelProps, elementProps],
|
|
522
|
+
stateAttributesMapping: fieldValidityMapping
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
SelectLabel.displayName = "SelectLabel";
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/trigger/SelectTriggerDataAttributes.mjs
|
|
528
|
+
var SelectTriggerDataAttributes_exports = /* @__PURE__ */ __exportAll({
|
|
529
|
+
dirty: () => dirty,
|
|
530
|
+
disabled: () => disabled,
|
|
531
|
+
filled: () => filled,
|
|
532
|
+
focused: () => focused,
|
|
533
|
+
invalid: () => invalid,
|
|
534
|
+
placeholder: () => placeholder,
|
|
535
|
+
popupOpen: () => popupOpen,
|
|
536
|
+
popupSide: () => popupSide,
|
|
537
|
+
pressed: () => pressed,
|
|
538
|
+
readonly: () => readonly,
|
|
539
|
+
required: () => required,
|
|
540
|
+
touched: () => touched,
|
|
541
|
+
valid: () => valid
|
|
542
|
+
});
|
|
543
|
+
/**
|
|
544
|
+
* Present when the corresponding select is open.
|
|
545
|
+
*/
|
|
546
|
+
const popupOpen = popupOpen$1;
|
|
547
|
+
/**
|
|
548
|
+
* Present when the trigger is pressed.
|
|
549
|
+
*/
|
|
550
|
+
const pressed = pressed$1;
|
|
551
|
+
/**
|
|
552
|
+
* Present when the select is disabled.
|
|
553
|
+
*/
|
|
554
|
+
const disabled = "data-disabled";
|
|
555
|
+
/**
|
|
556
|
+
* Present when the select is readonly.
|
|
557
|
+
*/
|
|
558
|
+
const readonly = "data-readonly";
|
|
559
|
+
/**
|
|
560
|
+
* Indicates which side the corresponding popup is positioned relative to its anchor.
|
|
561
|
+
* @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start' | null}
|
|
562
|
+
*/
|
|
563
|
+
const popupSide = "data-popup-side";
|
|
564
|
+
/**
|
|
565
|
+
* Present when the select is required.
|
|
566
|
+
*/
|
|
567
|
+
const required = "data-required";
|
|
568
|
+
/**
|
|
569
|
+
* Present when the select is in a valid state (when wrapped in Field.Root).
|
|
570
|
+
*/
|
|
571
|
+
const valid = "data-valid";
|
|
572
|
+
/**
|
|
573
|
+
* Present when the select is in an invalid state (when wrapped in Field.Root).
|
|
574
|
+
*/
|
|
575
|
+
const invalid = "data-invalid";
|
|
576
|
+
/**
|
|
577
|
+
* Present when the select has been touched (when wrapped in Field.Root).
|
|
578
|
+
*/
|
|
579
|
+
const touched = "data-touched";
|
|
580
|
+
/**
|
|
581
|
+
* Present when the select's value has changed (when wrapped in Field.Root).
|
|
582
|
+
*/
|
|
583
|
+
const dirty = "data-dirty";
|
|
584
|
+
/**
|
|
585
|
+
* Present when the select has a value (when wrapped in Field.Root).
|
|
586
|
+
*/
|
|
587
|
+
const filled = "data-filled";
|
|
588
|
+
/**
|
|
589
|
+
* Present when the select trigger is focused (when wrapped in Field.Root).
|
|
590
|
+
*/
|
|
591
|
+
const focused = "data-focused";
|
|
592
|
+
/**
|
|
593
|
+
* Present when the select doesn't have a value.
|
|
594
|
+
*/
|
|
595
|
+
const placeholder = "data-placeholder";
|
|
596
|
+
//#endregion
|
|
597
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
|
|
598
|
+
const SELECTED_DELAY = 400;
|
|
599
|
+
const stateAttributesMapping$2 = {
|
|
600
|
+
...pressableTriggerOpenStateMapping,
|
|
601
|
+
...fieldValidityMapping,
|
|
602
|
+
popupSide: (side) => side ? { [popupSide]: side } : null,
|
|
603
|
+
value: () => null
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* A button that opens the select popup.
|
|
607
|
+
* Renders a `<button>` element.
|
|
608
|
+
*
|
|
609
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
610
|
+
*/
|
|
611
|
+
const SelectTrigger = /*#__PURE__*/ React$1.forwardRef(function SelectTrigger(componentProps, forwardedRef) {
|
|
612
|
+
const { render, className, id: idProp, disabled: disabledProp = false, nativeButton = true, style, ...elementProps } = componentProps;
|
|
613
|
+
const { setTouched, validationMode, validation, state: fieldState, disabled: fieldDisabled } = useFieldRootContext();
|
|
614
|
+
const { labelId: fieldLabelId } = useLabelableContext();
|
|
615
|
+
const store = useSelectRootContext();
|
|
616
|
+
const readOnly = store.useState("readOnly");
|
|
617
|
+
const required = store.useState("required");
|
|
618
|
+
const selectDisabled = store.useState("disabled");
|
|
619
|
+
const disabled = fieldDisabled || selectDisabled || disabledProp;
|
|
620
|
+
const open = store.useState("open");
|
|
621
|
+
const mounted = store.useState("mounted");
|
|
622
|
+
const value = store.useState("value");
|
|
623
|
+
const triggerProps = store.useState("triggerProps");
|
|
624
|
+
const positionerElement = store.useState("positionerElement");
|
|
625
|
+
const listElement = store.useState("listElement");
|
|
626
|
+
const popupSideValue = store.useState("popupSide");
|
|
627
|
+
const rootId = store.useState("id");
|
|
628
|
+
const selectLabelId = store.useState("labelId");
|
|
629
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
630
|
+
const popupSide = mounted && positionerElement ? popupSideValue : null;
|
|
631
|
+
const id = idProp ?? rootId;
|
|
632
|
+
const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);
|
|
633
|
+
useLabelableId({ id: idProp });
|
|
634
|
+
const positionerRef = useValueAsRef(positionerElement);
|
|
635
|
+
const triggerRef = React$1.useRef(null);
|
|
636
|
+
const setFocused = useSetFieldFocused(disabled, triggerRef);
|
|
637
|
+
const { getButtonProps, buttonRef } = useButton({
|
|
638
|
+
disabled,
|
|
639
|
+
native: nativeButton
|
|
640
|
+
});
|
|
641
|
+
const setTriggerElement = store.useStateSetter("triggerElement");
|
|
642
|
+
const timeoutFocus = useTimeout();
|
|
643
|
+
const timeoutMouseDown = useTimeout();
|
|
644
|
+
const selectedDelayTimeout = useTimeout();
|
|
645
|
+
React$1.useEffect(() => {
|
|
646
|
+
if (open) {
|
|
647
|
+
selectedDelayTimeout.start(SELECTED_DELAY, () => {
|
|
648
|
+
store.context.selectionRef.current.allowUnselectedMouseUp = true;
|
|
649
|
+
store.context.selectionRef.current.allowSelectedMouseUp = true;
|
|
650
|
+
});
|
|
651
|
+
return () => {
|
|
652
|
+
selectedDelayTimeout.clear();
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
store.context.selectionRef.current = {
|
|
656
|
+
allowSelectedMouseUp: false,
|
|
657
|
+
allowUnselectedMouseUp: false,
|
|
658
|
+
dragY: 0
|
|
659
|
+
};
|
|
660
|
+
timeoutMouseDown.clear();
|
|
661
|
+
}, [
|
|
662
|
+
open,
|
|
663
|
+
store,
|
|
664
|
+
timeoutMouseDown,
|
|
665
|
+
selectedDelayTimeout
|
|
666
|
+
]);
|
|
667
|
+
const mergedProps = mergeProps(triggerProps, {
|
|
668
|
+
id,
|
|
669
|
+
role: "combobox",
|
|
670
|
+
"aria-expanded": open,
|
|
671
|
+
"aria-haspopup": "listbox",
|
|
672
|
+
"aria-controls": open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : void 0,
|
|
673
|
+
"aria-labelledby": ariaLabelledBy,
|
|
674
|
+
"aria-readonly": readOnly || void 0,
|
|
675
|
+
"aria-required": required || void 0,
|
|
676
|
+
tabIndex: disabled ? -1 : 0,
|
|
677
|
+
onFocus(event) {
|
|
678
|
+
setFocused(true);
|
|
679
|
+
if (open && store.context.alignItemWithTriggerActiveRef.current) store.context.setOpen(false, createChangeEventDetails(none, event.nativeEvent));
|
|
680
|
+
timeoutFocus.start(0, () => {
|
|
681
|
+
store.set("forceMount", true);
|
|
682
|
+
});
|
|
683
|
+
},
|
|
684
|
+
onBlur(event) {
|
|
685
|
+
if (contains(positionerElement, event.relatedTarget)) return;
|
|
686
|
+
setTouched(true);
|
|
687
|
+
setFocused(false);
|
|
688
|
+
if (validationMode === "onBlur") validation.commit(value);
|
|
689
|
+
},
|
|
690
|
+
onMouseDown(event) {
|
|
691
|
+
if (open) return;
|
|
692
|
+
const doc = ownerDocument(event.currentTarget);
|
|
693
|
+
function handleMouseUp(mouseEvent) {
|
|
694
|
+
if (!triggerRef.current) return;
|
|
695
|
+
const mouseUpTarget = mouseEvent.target;
|
|
696
|
+
if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) return;
|
|
697
|
+
if (isMouseWithinBounds(mouseEvent, triggerRef.current)) return;
|
|
698
|
+
store.context.setOpen(false, createChangeEventDetails(cancelOpen, mouseEvent));
|
|
699
|
+
}
|
|
700
|
+
timeoutMouseDown.start(0, () => {
|
|
701
|
+
doc.addEventListener("mouseup", handleMouseUp, { once: true });
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
}, elementProps, getButtonProps);
|
|
705
|
+
const props = validation.getValidationProps(disabled, mergedProps);
|
|
706
|
+
props.role = "combobox";
|
|
707
|
+
const state = {
|
|
708
|
+
...fieldState,
|
|
709
|
+
open,
|
|
710
|
+
disabled,
|
|
711
|
+
value,
|
|
712
|
+
readOnly,
|
|
713
|
+
popupSide,
|
|
714
|
+
placeholder: !hasSelectedValue
|
|
715
|
+
};
|
|
716
|
+
return useRenderElement("button", componentProps, {
|
|
717
|
+
ref: [
|
|
718
|
+
forwardedRef,
|
|
719
|
+
triggerRef,
|
|
720
|
+
buttonRef,
|
|
721
|
+
setTriggerElement
|
|
722
|
+
],
|
|
723
|
+
state,
|
|
724
|
+
stateAttributesMapping: stateAttributesMapping$2,
|
|
725
|
+
props
|
|
726
|
+
});
|
|
727
|
+
});
|
|
728
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
729
|
+
//#endregion
|
|
730
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/value/SelectValue.mjs
|
|
731
|
+
const stateAttributesMapping$1 = { value: () => null };
|
|
732
|
+
/**
|
|
733
|
+
* A text label of the currently selected item.
|
|
734
|
+
* Renders a `<span>` element.
|
|
735
|
+
*
|
|
736
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
737
|
+
*/
|
|
738
|
+
const SelectValue = /*#__PURE__*/ React$1.forwardRef(function SelectValue(componentProps, forwardedRef) {
|
|
739
|
+
const { className, render, children: childrenProp, placeholder, style, ...elementProps } = componentProps;
|
|
740
|
+
const store = useSelectRootContext();
|
|
741
|
+
const value = store.useState("value");
|
|
742
|
+
const items = store.useState("items");
|
|
743
|
+
const itemToStringLabel = store.useState("itemToStringLabel");
|
|
744
|
+
const hasSelectedValue = store.useState("hasSelectedValue");
|
|
745
|
+
const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;
|
|
746
|
+
const hasNullLabel = store.useState("hasNullItemLabel", shouldCheckNullItemLabel);
|
|
747
|
+
const state = {
|
|
748
|
+
value,
|
|
749
|
+
placeholder: !hasSelectedValue
|
|
750
|
+
};
|
|
751
|
+
let children = null;
|
|
752
|
+
if (typeof childrenProp === "function") children = childrenProp(value);
|
|
753
|
+
else if (childrenProp != null) children = childrenProp;
|
|
754
|
+
else if (shouldCheckNullItemLabel && !hasNullLabel) children = placeholder;
|
|
755
|
+
else if (Array.isArray(value)) children = resolveMultipleLabels(value, items, itemToStringLabel);
|
|
756
|
+
else children = resolveSelectedLabel(value, items, itemToStringLabel);
|
|
757
|
+
return useRenderElement("span", componentProps, {
|
|
758
|
+
state,
|
|
759
|
+
ref: [forwardedRef, store.context.valueRef],
|
|
760
|
+
props: [{ children }, elementProps],
|
|
761
|
+
stateAttributesMapping: stateAttributesMapping$1
|
|
762
|
+
});
|
|
763
|
+
});
|
|
764
|
+
SelectValue.displayName = "SelectValue";
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/icon/SelectIcon.mjs
|
|
767
|
+
/**
|
|
768
|
+
* An icon that indicates that the trigger button opens a select popup.
|
|
769
|
+
* Renders a `<span>` element.
|
|
770
|
+
*
|
|
771
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
772
|
+
*/
|
|
773
|
+
const SelectIcon = /*#__PURE__*/ React$1.forwardRef(function SelectIcon(componentProps, forwardedRef) {
|
|
774
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
775
|
+
const state = { open: useSelectRootContext().useState("open") };
|
|
776
|
+
return useRenderElement("span", componentProps, {
|
|
777
|
+
state,
|
|
778
|
+
ref: forwardedRef,
|
|
779
|
+
props: [{
|
|
780
|
+
"aria-hidden": true,
|
|
781
|
+
children: "▼"
|
|
782
|
+
}, elementProps],
|
|
783
|
+
stateAttributesMapping: triggerOpenStateMapping
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
SelectIcon.displayName = "SelectIcon";
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
789
|
+
/**
|
|
790
|
+
* A portal element that moves the popup to a different part of the DOM.
|
|
791
|
+
* By default, the portal element is appended to `<body>`.
|
|
792
|
+
* Renders a `<div>` element.
|
|
793
|
+
*
|
|
794
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
795
|
+
*/
|
|
796
|
+
const SelectPortal = /*#__PURE__*/ React$1.forwardRef(function SelectPortal(portalProps, forwardedRef) {
|
|
797
|
+
const store = useSelectRootContext();
|
|
798
|
+
const mounted = store.useState("mounted");
|
|
799
|
+
const forceMount = store.useState("forceMount");
|
|
800
|
+
if (!(mounted || forceMount)) return null;
|
|
801
|
+
return /*#__PURE__*/ jsx(FloatingPortal, {
|
|
802
|
+
ref: forwardedRef,
|
|
803
|
+
...portalProps
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
SelectPortal.displayName = "SelectPortal";
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
|
|
809
|
+
const SelectPositionerContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
810
|
+
SelectPositionerContext.displayName = "SelectPositionerContext";
|
|
811
|
+
function useSelectPositionerContext() {
|
|
812
|
+
const context = React$1.useContext(SelectPositionerContext);
|
|
813
|
+
if (!context) throw new Error("Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
814
|
+
return context;
|
|
815
|
+
}
|
|
816
|
+
//#endregion
|
|
817
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/popup/utils.mjs
|
|
818
|
+
function clearStyles(element, originalStyles) {
|
|
819
|
+
if (element) Object.assign(element.style, originalStyles);
|
|
820
|
+
}
|
|
821
|
+
const LIST_FUNCTIONAL_STYLES = {
|
|
822
|
+
position: "relative",
|
|
823
|
+
maxHeight: "100%",
|
|
824
|
+
overflowX: "hidden",
|
|
825
|
+
overflowY: "auto"
|
|
826
|
+
};
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs
|
|
829
|
+
const FIXED = { position: "fixed" };
|
|
830
|
+
/**
|
|
831
|
+
* Positions the select popup.
|
|
832
|
+
* Renders a `<div>` element.
|
|
833
|
+
*
|
|
834
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
835
|
+
*/
|
|
836
|
+
const SelectPositioner = /*#__PURE__*/ React$1.forwardRef(function SelectPositioner(componentProps, forwardedRef) {
|
|
837
|
+
const { anchor, className, render, positionMethod, side, align, sideOffset, alignOffset, collisionBoundary = "clipping-ancestors", collisionPadding, arrowPadding, sticky, disableAnchorTracking, alignItemWithTrigger = true, collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE, style, ...elementProps } = componentProps;
|
|
838
|
+
const store = useSelectRootContext();
|
|
839
|
+
const floatingRootContext = useSelectFloatingContext();
|
|
840
|
+
const open = store.useState("open");
|
|
841
|
+
const mounted = store.useState("mounted");
|
|
842
|
+
const modal = store.useState("modal");
|
|
843
|
+
const value = store.useState("value");
|
|
844
|
+
const openMethod = store.useState("openMethod");
|
|
845
|
+
const positionerElement = store.useState("positionerElement");
|
|
846
|
+
const triggerElement = store.useState("triggerElement");
|
|
847
|
+
const isItemEqualToValue = store.useState("isItemEqualToValue");
|
|
848
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
849
|
+
const scrollUpArrowRef = React$1.useRef(null);
|
|
850
|
+
const scrollDownArrowRef = React$1.useRef(null);
|
|
851
|
+
const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React$1.useState(alignItemWithTrigger);
|
|
852
|
+
const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== "touch";
|
|
853
|
+
if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) setControlledAlignItemWithTrigger(alignItemWithTrigger);
|
|
854
|
+
React$1.useImperativeHandle(store.context.alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);
|
|
855
|
+
useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open, openMethod === "touch", positionerElement, triggerElement);
|
|
856
|
+
const positioning = useAnchorPositioning({
|
|
857
|
+
anchor,
|
|
858
|
+
floatingRootContext,
|
|
859
|
+
positionMethod,
|
|
860
|
+
mounted,
|
|
861
|
+
side,
|
|
862
|
+
sideOffset,
|
|
863
|
+
align,
|
|
864
|
+
alignOffset,
|
|
865
|
+
arrowPadding,
|
|
866
|
+
collisionBoundary,
|
|
867
|
+
collisionPadding,
|
|
868
|
+
sticky,
|
|
869
|
+
disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive,
|
|
870
|
+
collisionAvoidance,
|
|
871
|
+
keepMounted: true
|
|
872
|
+
});
|
|
873
|
+
const renderedSide = alignItemWithTriggerActive ? "none" : positioning.side;
|
|
874
|
+
const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles;
|
|
875
|
+
const state = {
|
|
876
|
+
open,
|
|
877
|
+
side: renderedSide,
|
|
878
|
+
align: positioning.align,
|
|
879
|
+
anchorHidden: positioning.anchorHidden
|
|
880
|
+
};
|
|
881
|
+
useIsoLayoutEffect(() => {
|
|
882
|
+
store.set("popupSide", positioning.side);
|
|
883
|
+
}, [store, positioning.side]);
|
|
884
|
+
const setPositionerElement = store.useStateSetter("positionerElement");
|
|
885
|
+
const element = usePositioner(componentProps, state, {
|
|
886
|
+
styles: positionerStyles,
|
|
887
|
+
transitionStatus,
|
|
888
|
+
props: elementProps,
|
|
889
|
+
refs: [forwardedRef, setPositionerElement],
|
|
890
|
+
hidden: !mounted,
|
|
891
|
+
inert: !open
|
|
892
|
+
});
|
|
893
|
+
const prevMapSizeRef = React$1.useRef(0);
|
|
894
|
+
const onMapChange = useStableCallback((map) => {
|
|
895
|
+
if (store.context.valuesRef.current.length === 0) return;
|
|
896
|
+
const prevSize = prevMapSizeRef.current;
|
|
897
|
+
prevMapSizeRef.current = map.size;
|
|
898
|
+
const eventDetails = createChangeEventDetails(none);
|
|
899
|
+
if (prevSize !== 0 && !store.state.multiple && value !== null) {
|
|
900
|
+
if (findItemIndex(store.context.valuesRef.current, value, isItemEqualToValue) === -1) {
|
|
901
|
+
const initialSelectedValue = store.context.initialValueRef.current;
|
|
902
|
+
const nextValue = initialSelectedValue != null && findItemIndex(store.context.valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1 ? initialSelectedValue : null;
|
|
903
|
+
store.context.setValue(nextValue, eventDetails);
|
|
904
|
+
if (nextValue === null) {
|
|
905
|
+
store.set("selectedIndex", null);
|
|
906
|
+
store.context.selectedItemTextRef.current = null;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {
|
|
911
|
+
const nextValue = value.filter((selectedItemValue) => findItemIndex(store.context.valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);
|
|
912
|
+
if (nextValue.length !== value.length) {
|
|
913
|
+
store.context.setValue(nextValue, eventDetails);
|
|
914
|
+
if (nextValue.length === 0) {
|
|
915
|
+
store.set("selectedIndex", null);
|
|
916
|
+
store.context.selectedItemTextRef.current = null;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
if (open && alignItemWithTriggerActive) {
|
|
921
|
+
store.update({
|
|
922
|
+
scrollUpArrowVisible: false,
|
|
923
|
+
scrollDownArrowVisible: false
|
|
924
|
+
});
|
|
925
|
+
const stylesToClear = { height: "" };
|
|
926
|
+
clearStyles(positionerElement, stylesToClear);
|
|
927
|
+
clearStyles(store.context.popupRef.current, stylesToClear);
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
const contextValue = React$1.useMemo(() => ({
|
|
931
|
+
...positioning,
|
|
932
|
+
side: renderedSide,
|
|
933
|
+
alignItemWithTriggerActive,
|
|
934
|
+
setControlledAlignItemWithTrigger,
|
|
935
|
+
scrollUpArrowRef,
|
|
936
|
+
scrollDownArrowRef
|
|
937
|
+
}), [
|
|
938
|
+
positioning,
|
|
939
|
+
renderedSide,
|
|
940
|
+
alignItemWithTriggerActive,
|
|
941
|
+
setControlledAlignItemWithTrigger
|
|
942
|
+
]);
|
|
943
|
+
return /*#__PURE__*/ jsx(CompositeList, {
|
|
944
|
+
elementsRef: store.context.listRef,
|
|
945
|
+
labelsRef: store.context.labelsRef,
|
|
946
|
+
onMapChange,
|
|
947
|
+
children: /*#__PURE__*/ jsxs(SelectPositionerContext.Provider, {
|
|
948
|
+
value: contextValue,
|
|
949
|
+
children: [mounted && modal && /*#__PURE__*/ jsx(InternalBackdrop, {
|
|
950
|
+
inert: inertValue(!open),
|
|
951
|
+
cutout: triggerElement
|
|
952
|
+
}), element]
|
|
953
|
+
})
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
SelectPositioner.displayName = "SelectPositioner";
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/positioner/SelectPositionerCssVars.mjs
|
|
959
|
+
var SelectPositionerCssVars_exports = /* @__PURE__ */ __exportAll({
|
|
960
|
+
anchorHeight: () => anchorHeight,
|
|
961
|
+
anchorWidth: () => anchorWidth,
|
|
962
|
+
availableHeight: () => availableHeight,
|
|
963
|
+
availableWidth: () => availableWidth,
|
|
964
|
+
transformOrigin: () => transformOrigin
|
|
965
|
+
});
|
|
966
|
+
/**
|
|
967
|
+
* The available width between the trigger and the edge of the viewport.
|
|
968
|
+
* @type {number}
|
|
969
|
+
*/
|
|
970
|
+
const availableWidth = "--available-width";
|
|
971
|
+
/**
|
|
972
|
+
* The available height between the trigger and the edge of the viewport.
|
|
973
|
+
* @type {number}
|
|
974
|
+
*/
|
|
975
|
+
const availableHeight = "--available-height";
|
|
976
|
+
/**
|
|
977
|
+
* The anchor's width.
|
|
978
|
+
* @type {number}
|
|
979
|
+
*/
|
|
980
|
+
const anchorWidth = "--anchor-width";
|
|
981
|
+
/**
|
|
982
|
+
* The anchor's height.
|
|
983
|
+
* @type {number}
|
|
984
|
+
*/
|
|
985
|
+
const anchorHeight = "--anchor-height";
|
|
986
|
+
/**
|
|
987
|
+
* The coordinates that this element is anchored to. Used for animations and transitions.
|
|
988
|
+
* @type {string}
|
|
989
|
+
*/
|
|
990
|
+
const transformOrigin = "--transform-origin";
|
|
991
|
+
//#endregion
|
|
992
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/popup/SelectPopup.mjs
|
|
993
|
+
const stateAttributesMapping = {
|
|
994
|
+
...popupStateMapping,
|
|
995
|
+
...transitionStatusMapping
|
|
996
|
+
};
|
|
997
|
+
/**
|
|
998
|
+
* A container for the select list.
|
|
999
|
+
* Renders a `<div>` element.
|
|
1000
|
+
*
|
|
1001
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1002
|
+
*/
|
|
1003
|
+
const SelectPopup = /*#__PURE__*/ React$1.forwardRef(function SelectPopup(componentProps, forwardedRef) {
|
|
1004
|
+
const { render, className, style, finalFocus, ...elementProps } = componentProps;
|
|
1005
|
+
const store = useSelectRootContext();
|
|
1006
|
+
const multiple = store.useState("multiple");
|
|
1007
|
+
const readOnly = store.useState("readOnly");
|
|
1008
|
+
const highlightItemOnHover = store.useState("highlightItemOnHover");
|
|
1009
|
+
const floatingRootContext = useSelectFloatingContext();
|
|
1010
|
+
const { side, align, alignItemWithTriggerActive, isPositioned, setControlledAlignItemWithTrigger } = useSelectPositionerContext();
|
|
1011
|
+
const insideToolbar = useToolbarRootContext(true) != null;
|
|
1012
|
+
const direction = useDirection();
|
|
1013
|
+
const { nonce, disableStyleElements } = useCSPContext();
|
|
1014
|
+
const id = store.useState("id");
|
|
1015
|
+
const open = store.useState("open");
|
|
1016
|
+
const openMethod = store.useState("openMethod");
|
|
1017
|
+
const mounted = store.useState("mounted");
|
|
1018
|
+
const popupProps = store.useState("popupProps");
|
|
1019
|
+
const transitionStatus = store.useState("transitionStatus");
|
|
1020
|
+
const triggerElement = store.useState("triggerElement");
|
|
1021
|
+
const positionerElement = store.useState("positionerElement");
|
|
1022
|
+
const listElement = store.useState("listElement");
|
|
1023
|
+
const reachedMaxHeightRef = React$1.useRef(false);
|
|
1024
|
+
const initialPlacedRef = React$1.useRef(false);
|
|
1025
|
+
const originalPositionerStylesRef = React$1.useRef({});
|
|
1026
|
+
const scrollArrowFrame = useAnimationFrame();
|
|
1027
|
+
const handleScroll = useStableCallback((scroller) => {
|
|
1028
|
+
if (!positionerElement || !store.context.popupRef.current || !initialPlacedRef.current) return;
|
|
1029
|
+
const isTopPositioned = positionerElement.style.top === "0px";
|
|
1030
|
+
const isBottomPositioned = positionerElement.style.bottom === "0px";
|
|
1031
|
+
if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) {
|
|
1032
|
+
store.context.handleScrollArrowVisibility(scroller);
|
|
1033
|
+
return;
|
|
1034
|
+
}
|
|
1035
|
+
const scale = getScale(positionerElement);
|
|
1036
|
+
const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, "y", scale);
|
|
1037
|
+
const doc = ownerDocument(positionerElement);
|
|
1038
|
+
const win = getWindow(positionerElement);
|
|
1039
|
+
const positionerStyles = win.getComputedStyle(positionerElement);
|
|
1040
|
+
const marginTop = parseFloat(positionerStyles.marginTop);
|
|
1041
|
+
const marginBottom = parseFloat(positionerStyles.marginBottom);
|
|
1042
|
+
const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(store.context.popupRef.current));
|
|
1043
|
+
const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);
|
|
1044
|
+
const scrollTop = scroller.scrollTop;
|
|
1045
|
+
const maxScrollTop = getMaxScrollTop(scroller);
|
|
1046
|
+
let nextScrollTop = null;
|
|
1047
|
+
const setHeight = (height) => {
|
|
1048
|
+
positionerElement.style.height = `${height}px`;
|
|
1049
|
+
};
|
|
1050
|
+
const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;
|
|
1051
|
+
const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);
|
|
1052
|
+
if (diff <= 1) {
|
|
1053
|
+
const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);
|
|
1054
|
+
if (heightDelta > 0) setHeight(currentHeight + heightDelta);
|
|
1055
|
+
scroller.scrollTop = isTopPositioned ? maxScrollTop : 0;
|
|
1056
|
+
if (maxAvailableHeight - (currentHeight + heightDelta) <= 1) reachedMaxHeightRef.current = true;
|
|
1057
|
+
store.context.handleScrollArrowVisibility(scroller);
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
if (maxAvailableHeight - nextHeight > 1) nextScrollTop = isTopPositioned ? Infinity : 0;
|
|
1061
|
+
else if (isBottomPositioned && scrollTop < maxScrollTop) nextScrollTop = scrollTop - (diff - (currentHeight + diff - maxAvailableHeight));
|
|
1062
|
+
const nextPositionerHeight = Math.ceil(nextHeight);
|
|
1063
|
+
if (nextPositionerHeight !== 0) setHeight(nextPositionerHeight);
|
|
1064
|
+
if (nextScrollTop != null) {
|
|
1065
|
+
const target = clamp(nextScrollTop, 0, getMaxScrollTop(scroller));
|
|
1066
|
+
if (Math.abs(scroller.scrollTop - target) > 1) scroller.scrollTop = target;
|
|
1067
|
+
}
|
|
1068
|
+
if (nextPositionerHeight >= maxAvailableHeight - 1) reachedMaxHeightRef.current = true;
|
|
1069
|
+
store.context.handleScrollArrowVisibility(scroller);
|
|
1070
|
+
});
|
|
1071
|
+
React$1.useImperativeHandle(store.context.scrollHandlerRef, () => handleScroll, [handleScroll]);
|
|
1072
|
+
useOpenChangeComplete({
|
|
1073
|
+
open,
|
|
1074
|
+
ref: store.context.popupRef,
|
|
1075
|
+
onComplete() {
|
|
1076
|
+
if (open) store.context.onOpenChangeComplete(true);
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
const state = {
|
|
1080
|
+
open,
|
|
1081
|
+
transitionStatus,
|
|
1082
|
+
side,
|
|
1083
|
+
align
|
|
1084
|
+
};
|
|
1085
|
+
useIsoLayoutEffect(() => {
|
|
1086
|
+
if (!positionerElement || !store.context.popupRef.current || Object.keys(originalPositionerStylesRef.current).length) return;
|
|
1087
|
+
originalPositionerStylesRef.current = {
|
|
1088
|
+
top: positionerElement.style.top || "0",
|
|
1089
|
+
left: positionerElement.style.left || "0",
|
|
1090
|
+
right: positionerElement.style.right,
|
|
1091
|
+
height: positionerElement.style.height,
|
|
1092
|
+
bottom: positionerElement.style.bottom,
|
|
1093
|
+
minHeight: positionerElement.style.minHeight,
|
|
1094
|
+
maxHeight: positionerElement.style.maxHeight,
|
|
1095
|
+
marginTop: positionerElement.style.marginTop,
|
|
1096
|
+
marginBottom: positionerElement.style.marginBottom
|
|
1097
|
+
};
|
|
1098
|
+
}, [store, positionerElement]);
|
|
1099
|
+
useIsoLayoutEffect(() => {
|
|
1100
|
+
if (open || alignItemWithTriggerActive) return;
|
|
1101
|
+
initialPlacedRef.current = false;
|
|
1102
|
+
reachedMaxHeightRef.current = false;
|
|
1103
|
+
clearStyles(positionerElement, originalPositionerStylesRef.current);
|
|
1104
|
+
}, [
|
|
1105
|
+
open,
|
|
1106
|
+
alignItemWithTriggerActive,
|
|
1107
|
+
positionerElement
|
|
1108
|
+
]);
|
|
1109
|
+
useIsoLayoutEffect(() => {
|
|
1110
|
+
const popupElement = store.context.popupRef.current;
|
|
1111
|
+
if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === "ending") return;
|
|
1112
|
+
initialPlacedRef.current = true;
|
|
1113
|
+
popupElement.style.removeProperty(transformOrigin);
|
|
1114
|
+
if (!alignItemWithTriggerActive) {
|
|
1115
|
+
scrollArrowFrame.request(() => store.context.handleScrollArrowVisibility(listElement || popupElement));
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
const restoreTransformStyles = unsetTransformStyles(popupElement);
|
|
1119
|
+
try {
|
|
1120
|
+
let textElement = store.context.selectedItemTextRef.current;
|
|
1121
|
+
if (!textElement?.isConnected) textElement = !store.select("hasSelectedValue") && store.context.firstItemTextRef.current?.isConnected ? store.context.firstItemTextRef.current : null;
|
|
1122
|
+
const valueElement = store.context.valueRef.current;
|
|
1123
|
+
const win = getWindow(positionerElement);
|
|
1124
|
+
const positionerStyles = win.getComputedStyle(positionerElement);
|
|
1125
|
+
const popupStyles = win.getComputedStyle(popupElement);
|
|
1126
|
+
const doc = ownerDocument(triggerElement);
|
|
1127
|
+
const scale = getScale(triggerElement);
|
|
1128
|
+
const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);
|
|
1129
|
+
const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);
|
|
1130
|
+
const triggerHeight = triggerRect.height;
|
|
1131
|
+
const scroller = listElement || popupElement;
|
|
1132
|
+
const scrollHeight = scroller.scrollHeight;
|
|
1133
|
+
const borderBottom = parseFloat(popupStyles.borderBottomWidth);
|
|
1134
|
+
const marginTop = parseFloat(positionerStyles.marginTop) || 10;
|
|
1135
|
+
const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;
|
|
1136
|
+
const minHeight = parseFloat(positionerStyles.minHeight) || 100;
|
|
1137
|
+
const maxPopupHeight = getMaxPopupHeight(popupStyles);
|
|
1138
|
+
const paddingLeft = 5;
|
|
1139
|
+
const paddingRight = 5;
|
|
1140
|
+
const triggerCollisionThreshold = 20;
|
|
1141
|
+
const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;
|
|
1142
|
+
const viewportWidth = doc.documentElement.clientWidth;
|
|
1143
|
+
const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;
|
|
1144
|
+
let textRect;
|
|
1145
|
+
let alignedLeft = direction === "rtl" ? triggerRect.right - positionerRect.width : triggerRect.left;
|
|
1146
|
+
let offsetY = 0;
|
|
1147
|
+
if (textElement && valueElement) {
|
|
1148
|
+
const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);
|
|
1149
|
+
textRect = normalizeRect(textElement.getBoundingClientRect(), scale);
|
|
1150
|
+
alignedLeft = positionerRect.left + (direction === "rtl" ? valueRect.right - textRect.right : valueRect.left - textRect.left);
|
|
1151
|
+
const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;
|
|
1152
|
+
offsetY = textRect.top - positionerRect.top + textRect.height / 2 - valueCenterFromTriggerTop;
|
|
1153
|
+
}
|
|
1154
|
+
const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;
|
|
1155
|
+
let height = Math.min(viewportHeight, idealHeight);
|
|
1156
|
+
const maxHeight = viewportHeight - marginTop - marginBottom;
|
|
1157
|
+
const scrollTop = idealHeight - height;
|
|
1158
|
+
const maxRight = viewportWidth - paddingRight;
|
|
1159
|
+
positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;
|
|
1160
|
+
positionerElement.style.height = `${height}px`;
|
|
1161
|
+
positionerElement.style.maxHeight = "none";
|
|
1162
|
+
positionerElement.style.marginTop = `${marginTop}px`;
|
|
1163
|
+
positionerElement.style.marginBottom = `${marginBottom}px`;
|
|
1164
|
+
popupElement.style.height = "100%";
|
|
1165
|
+
const maxScrollTop = getMaxScrollTop(scroller);
|
|
1166
|
+
const isTopPositioned = scrollTop >= maxScrollTop - 1;
|
|
1167
|
+
if (isTopPositioned) height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);
|
|
1168
|
+
const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + 1 < Math.min(scrollHeight, minHeight);
|
|
1169
|
+
const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && webkit;
|
|
1170
|
+
if (fallbackToAlignPopupToTrigger || isPinchZoomed) {
|
|
1171
|
+
clearStyles(positionerElement, originalPositionerStylesRef.current);
|
|
1172
|
+
setControlledAlignItemWithTrigger(false);
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
const initialHeight = Math.max(minHeight, height);
|
|
1176
|
+
if (isTopPositioned) {
|
|
1177
|
+
const topOffset = Math.max(0, viewportHeight - idealHeight);
|
|
1178
|
+
positionerElement.style.top = positionerRect.height >= maxHeight ? "0" : `${topOffset}px`;
|
|
1179
|
+
positionerElement.style.height = `${height}px`;
|
|
1180
|
+
scroller.scrollTop = getMaxScrollTop(scroller);
|
|
1181
|
+
} else {
|
|
1182
|
+
positionerElement.style.bottom = "0";
|
|
1183
|
+
scroller.scrollTop = scrollTop;
|
|
1184
|
+
}
|
|
1185
|
+
if (textRect) {
|
|
1186
|
+
const popupTop = positionerRect.top;
|
|
1187
|
+
const popupHeight = positionerRect.height;
|
|
1188
|
+
const textCenterY = textRect.top + textRect.height / 2;
|
|
1189
|
+
const clampedY = clamp(popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50, 0, 100);
|
|
1190
|
+
popupElement.style.setProperty(transformOrigin, `50% ${clampedY}%`);
|
|
1191
|
+
}
|
|
1192
|
+
if (initialHeight === viewportHeight || height >= maxPopupHeight) reachedMaxHeightRef.current = true;
|
|
1193
|
+
store.context.handleScrollArrowVisibility(scroller);
|
|
1194
|
+
if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && store.context.listRef.current[0] != null) store.set("activeIndex", 0);
|
|
1195
|
+
} finally {
|
|
1196
|
+
restoreTransformStyles();
|
|
1197
|
+
}
|
|
1198
|
+
}, [
|
|
1199
|
+
store,
|
|
1200
|
+
open,
|
|
1201
|
+
positionerElement,
|
|
1202
|
+
triggerElement,
|
|
1203
|
+
alignItemWithTriggerActive,
|
|
1204
|
+
setControlledAlignItemWithTrigger,
|
|
1205
|
+
scrollArrowFrame,
|
|
1206
|
+
listElement,
|
|
1207
|
+
highlightItemOnHover,
|
|
1208
|
+
direction,
|
|
1209
|
+
isPositioned
|
|
1210
|
+
]);
|
|
1211
|
+
React$1.useEffect(() => {
|
|
1212
|
+
if (!alignItemWithTriggerActive || !positionerElement || !open) return;
|
|
1213
|
+
const win = getWindow(positionerElement);
|
|
1214
|
+
function handleResize(event) {
|
|
1215
|
+
store.context.setOpen(false, createChangeEventDetails(windowResize, event));
|
|
1216
|
+
}
|
|
1217
|
+
return addEventListener(win, "resize", handleResize);
|
|
1218
|
+
}, [
|
|
1219
|
+
store,
|
|
1220
|
+
alignItemWithTriggerActive,
|
|
1221
|
+
positionerElement,
|
|
1222
|
+
open
|
|
1223
|
+
]);
|
|
1224
|
+
const defaultProps = {
|
|
1225
|
+
...listElement ? { role: "presentation" } : {
|
|
1226
|
+
role: "listbox",
|
|
1227
|
+
"aria-multiselectable": multiple || void 0,
|
|
1228
|
+
"aria-readonly": readOnly || void 0,
|
|
1229
|
+
id: `${id}-list`
|
|
1230
|
+
},
|
|
1231
|
+
onKeyDown(event) {
|
|
1232
|
+
if (insideToolbar && COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
1233
|
+
},
|
|
1234
|
+
onScroll(event) {
|
|
1235
|
+
if (listElement) return;
|
|
1236
|
+
handleScroll(event.currentTarget);
|
|
1237
|
+
},
|
|
1238
|
+
...alignItemWithTriggerActive && { style: listElement ? { height: "100%" } : LIST_FUNCTIONAL_STYLES },
|
|
1239
|
+
className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : void 0
|
|
1240
|
+
};
|
|
1241
|
+
const element = useRenderElement("div", componentProps, {
|
|
1242
|
+
ref: [forwardedRef, store.context.popupRef],
|
|
1243
|
+
state,
|
|
1244
|
+
stateAttributesMapping,
|
|
1245
|
+
props: [
|
|
1246
|
+
popupProps,
|
|
1247
|
+
defaultProps,
|
|
1248
|
+
getDisabledMountTransitionStyles(transitionStatus),
|
|
1249
|
+
elementProps
|
|
1250
|
+
]
|
|
1251
|
+
});
|
|
1252
|
+
return /*#__PURE__*/ jsxs(React$1.Fragment, { children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/ jsx(FloatingFocusManager, {
|
|
1253
|
+
context: floatingRootContext,
|
|
1254
|
+
modal: false,
|
|
1255
|
+
disabled: !mounted,
|
|
1256
|
+
openInteractionType: openMethod,
|
|
1257
|
+
returnFocus: finalFocus,
|
|
1258
|
+
restoreFocus: true,
|
|
1259
|
+
children: element
|
|
1260
|
+
})] });
|
|
1261
|
+
});
|
|
1262
|
+
SelectPopup.displayName = "SelectPopup";
|
|
1263
|
+
function getMaxPopupHeight(popupStyles) {
|
|
1264
|
+
const maxHeightStyle = popupStyles.maxHeight;
|
|
1265
|
+
return maxHeightStyle.endsWith("px") ? parseFloat(maxHeightStyle) || Infinity : Infinity;
|
|
1266
|
+
}
|
|
1267
|
+
function getMaxScrollTop(scroller) {
|
|
1268
|
+
return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);
|
|
1269
|
+
}
|
|
1270
|
+
function getScale(element) {
|
|
1271
|
+
return platform.getScale(element);
|
|
1272
|
+
}
|
|
1273
|
+
function normalizeSize(size, axis, scale) {
|
|
1274
|
+
return size / scale[axis];
|
|
1275
|
+
}
|
|
1276
|
+
function normalizeRect(rect, scale) {
|
|
1277
|
+
return rectToClientRect({
|
|
1278
|
+
x: normalizeSize(rect.x, "x", scale),
|
|
1279
|
+
y: normalizeSize(rect.y, "y", scale),
|
|
1280
|
+
width: normalizeSize(rect.width, "x", scale),
|
|
1281
|
+
height: normalizeSize(rect.height, "y", scale)
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
const TRANSFORM_STYLE_RESETS = [
|
|
1285
|
+
["transform", "none"],
|
|
1286
|
+
["scale", "1"],
|
|
1287
|
+
["translate", "0 0"]
|
|
1288
|
+
];
|
|
1289
|
+
function unsetTransformStyles(popupElement) {
|
|
1290
|
+
const { style } = popupElement;
|
|
1291
|
+
const originalStyles = {};
|
|
1292
|
+
for (const [property, value] of TRANSFORM_STYLE_RESETS) {
|
|
1293
|
+
originalStyles[property] = style.getPropertyValue(property);
|
|
1294
|
+
style.setProperty(property, value, "important");
|
|
1295
|
+
}
|
|
1296
|
+
return () => {
|
|
1297
|
+
for (const [property] of TRANSFORM_STYLE_RESETS) {
|
|
1298
|
+
const originalValue = originalStyles[property];
|
|
1299
|
+
if (originalValue) style.setProperty(property, originalValue);
|
|
1300
|
+
else style.removeProperty(property);
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
//#endregion
|
|
1305
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/list/SelectList.mjs
|
|
1306
|
+
/**
|
|
1307
|
+
* A container for the select items.
|
|
1308
|
+
* Renders a `<div>` element.
|
|
1309
|
+
*
|
|
1310
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1311
|
+
*/
|
|
1312
|
+
const SelectList = /*#__PURE__*/ React$1.forwardRef(function SelectList(componentProps, forwardedRef) {
|
|
1313
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1314
|
+
const store = useSelectRootContext();
|
|
1315
|
+
const multiple = store.useState("multiple");
|
|
1316
|
+
const readOnly = store.useState("readOnly");
|
|
1317
|
+
const { alignItemWithTriggerActive } = useSelectPositionerContext();
|
|
1318
|
+
const hasScrollArrows = store.useState("hasScrollArrows");
|
|
1319
|
+
const openMethod = store.useState("openMethod");
|
|
1320
|
+
const defaultProps = {
|
|
1321
|
+
id: `${store.useState("id")}-list`,
|
|
1322
|
+
role: "listbox",
|
|
1323
|
+
"aria-multiselectable": multiple || void 0,
|
|
1324
|
+
"aria-readonly": readOnly || void 0,
|
|
1325
|
+
onScroll(event) {
|
|
1326
|
+
store.context.scrollHandlerRef.current?.(event.currentTarget);
|
|
1327
|
+
},
|
|
1328
|
+
...alignItemWithTriggerActive && { style: LIST_FUNCTIONAL_STYLES },
|
|
1329
|
+
className: hasScrollArrows && openMethod !== "touch" ? styleDisableScrollbar.className : void 0
|
|
1330
|
+
};
|
|
1331
|
+
const setListElement = store.useStateSetter("listElement");
|
|
1332
|
+
return useRenderElement("div", componentProps, {
|
|
1333
|
+
ref: [forwardedRef, setListElement],
|
|
1334
|
+
props: [defaultProps, elementProps]
|
|
1335
|
+
});
|
|
1336
|
+
});
|
|
1337
|
+
SelectList.displayName = "SelectList";
|
|
1338
|
+
//#endregion
|
|
1339
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/item/SelectItemContext.mjs
|
|
1340
|
+
const SelectItemContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1341
|
+
SelectItemContext.displayName = "SelectItemContext";
|
|
1342
|
+
function useSelectItemContext() {
|
|
1343
|
+
const context = React$1.useContext(SelectItemContext);
|
|
1344
|
+
if (!context) throw new Error("Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
|
|
1345
|
+
return context;
|
|
1346
|
+
}
|
|
1347
|
+
//#endregion
|
|
1348
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/item/SelectItem.mjs
|
|
1349
|
+
/**
|
|
1350
|
+
* An individual option in the select popup.
|
|
1351
|
+
* Renders a `<div>` element.
|
|
1352
|
+
*
|
|
1353
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1354
|
+
*/
|
|
1355
|
+
const SelectItem = /*#__PURE__*/ React$1.memo(/*#__PURE__*/ React$1.forwardRef(function SelectItem(componentProps, forwardedRef) {
|
|
1356
|
+
const { render, className, style, value: itemValue = null, label, disabled: disabledProp = false, nativeButton = false, ...elementProps } = componentProps;
|
|
1357
|
+
const textRef = React$1.useRef(null);
|
|
1358
|
+
const listItem = useCompositeListItem({
|
|
1359
|
+
guess: true,
|
|
1360
|
+
label,
|
|
1361
|
+
textRef
|
|
1362
|
+
});
|
|
1363
|
+
const store = useSelectRootContext();
|
|
1364
|
+
const { props: itemProps, multiple, disabled: selectDisabled, readOnly, isItemEqualToValue } = store.useState("itemRoot");
|
|
1365
|
+
const disabled = selectDisabled || disabledProp;
|
|
1366
|
+
const highlighted = store.useState("isActive", listItem.index);
|
|
1367
|
+
const open = store.useState("open");
|
|
1368
|
+
const selected = store.useState("isSelected", itemValue);
|
|
1369
|
+
const selectedByFocus = store.useState("isSelectedByFocus", listItem.index);
|
|
1370
|
+
const index = listItem.index;
|
|
1371
|
+
const itemRef = React$1.useRef(null);
|
|
1372
|
+
useIsoLayoutEffect(() => {
|
|
1373
|
+
const values = store.context.valuesRef.current;
|
|
1374
|
+
values[index] = itemValue;
|
|
1375
|
+
return () => {
|
|
1376
|
+
delete values[index];
|
|
1377
|
+
};
|
|
1378
|
+
}, [
|
|
1379
|
+
index,
|
|
1380
|
+
itemValue,
|
|
1381
|
+
store
|
|
1382
|
+
]);
|
|
1383
|
+
useIsoLayoutEffect(() => {
|
|
1384
|
+
const selectedValue = store.state.value;
|
|
1385
|
+
const currentIndex = store.state.selectedIndex;
|
|
1386
|
+
let nextIndex = currentIndex;
|
|
1387
|
+
let claims;
|
|
1388
|
+
if (multiple && Array.isArray(selectedValue)) {
|
|
1389
|
+
nextIndex = resolveSelectedIndex(index, itemValue, store.context.valuesRef.current, selectedValue, isItemEqualToValue, currentIndex);
|
|
1390
|
+
claims = nextIndex === index;
|
|
1391
|
+
if (index === currentIndex && !claims) store.context.selectedItemTextRef.current = null;
|
|
1392
|
+
} else {
|
|
1393
|
+
claims = selectedValue !== void 0 && compareItemEquality(itemValue, selectedValue, isItemEqualToValue);
|
|
1394
|
+
if (claims) nextIndex = index;
|
|
1395
|
+
}
|
|
1396
|
+
store.set("selectedIndex", nextIndex);
|
|
1397
|
+
if (claims && textRef.current) store.context.selectedItemTextRef.current = textRef.current;
|
|
1398
|
+
}, [
|
|
1399
|
+
index,
|
|
1400
|
+
multiple,
|
|
1401
|
+
isItemEqualToValue,
|
|
1402
|
+
store,
|
|
1403
|
+
itemValue
|
|
1404
|
+
]);
|
|
1405
|
+
const pointerTypeRef = React$1.useRef("mouse");
|
|
1406
|
+
const allowMouseSelectionRef = React$1.useRef(false);
|
|
1407
|
+
const { getButtonProps, buttonRef } = useButton({
|
|
1408
|
+
disabled,
|
|
1409
|
+
focusableWhenDisabled: true,
|
|
1410
|
+
native: nativeButton,
|
|
1411
|
+
composite: true
|
|
1412
|
+
});
|
|
1413
|
+
const state = {
|
|
1414
|
+
disabled,
|
|
1415
|
+
selected,
|
|
1416
|
+
highlighted
|
|
1417
|
+
};
|
|
1418
|
+
function commitSelection(event) {
|
|
1419
|
+
if (selectDisabled || readOnly) return;
|
|
1420
|
+
const selectedValue = store.state.value;
|
|
1421
|
+
if (multiple) {
|
|
1422
|
+
const currentValue = Array.isArray(selectedValue) ? selectedValue : [];
|
|
1423
|
+
const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];
|
|
1424
|
+
store.context.setValue(nextValue, createChangeEventDetails(itemPress, event));
|
|
1425
|
+
} else {
|
|
1426
|
+
store.context.setValue(itemValue, createChangeEventDetails(itemPress, event));
|
|
1427
|
+
store.context.setOpen(false, createChangeEventDetails(itemPress, event));
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
function resetDragMovement() {
|
|
1431
|
+
store.context.selectionRef.current.dragY = 0;
|
|
1432
|
+
}
|
|
1433
|
+
const defaultProps = {
|
|
1434
|
+
role: "option",
|
|
1435
|
+
"aria-selected": selected,
|
|
1436
|
+
tabIndex: open && highlighted ? 0 : -1,
|
|
1437
|
+
onKeyDown(event) {
|
|
1438
|
+
store.set("activeIndex", index);
|
|
1439
|
+
if (event.key === " " && store.context.typingRef.current) event.preventDefault();
|
|
1440
|
+
},
|
|
1441
|
+
onClick(event) {
|
|
1442
|
+
const isMouseClick = pointerTypeRef.current !== "touch";
|
|
1443
|
+
const clickPointerType = event.nativeEvent.pointerType;
|
|
1444
|
+
const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (clickPointerType !== void 0 || highlighted);
|
|
1445
|
+
const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;
|
|
1446
|
+
allowMouseSelectionRef.current = false;
|
|
1447
|
+
if (disabled || isInvalidMouseClick) return;
|
|
1448
|
+
commitSelection(event.nativeEvent);
|
|
1449
|
+
},
|
|
1450
|
+
onPointerEnter(event) {
|
|
1451
|
+
pointerTypeRef.current = event.pointerType;
|
|
1452
|
+
},
|
|
1453
|
+
onPointerMove(event) {
|
|
1454
|
+
if (event.pointerType === "mouse" && event.buttons === 1) {
|
|
1455
|
+
const selection = store.context.selectionRef.current;
|
|
1456
|
+
selection.dragY += event.movementY;
|
|
1457
|
+
if (selection.dragY ** 2 >= 64) selection.allowUnselectedMouseUp = true;
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
onPointerDown(event) {
|
|
1461
|
+
pointerTypeRef.current = event.pointerType;
|
|
1462
|
+
allowMouseSelectionRef.current = true;
|
|
1463
|
+
resetDragMovement();
|
|
1464
|
+
},
|
|
1465
|
+
onMouseUp() {
|
|
1466
|
+
resetDragMovement();
|
|
1467
|
+
if (disabled || pointerTypeRef.current === "touch") return;
|
|
1468
|
+
if (allowMouseSelectionRef.current) return;
|
|
1469
|
+
const disallowSelectedMouseUp = !store.context.selectionRef.current.allowSelectedMouseUp && selected;
|
|
1470
|
+
const disallowUnselectedMouseUp = !store.context.selectionRef.current.allowUnselectedMouseUp && !selected;
|
|
1471
|
+
if (disallowSelectedMouseUp || disallowUnselectedMouseUp) return;
|
|
1472
|
+
allowMouseSelectionRef.current = true;
|
|
1473
|
+
itemRef.current?.click();
|
|
1474
|
+
allowMouseSelectionRef.current = false;
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
const element = useRenderElement("div", componentProps, {
|
|
1478
|
+
ref: [
|
|
1479
|
+
buttonRef,
|
|
1480
|
+
forwardedRef,
|
|
1481
|
+
listItem.ref,
|
|
1482
|
+
itemRef
|
|
1483
|
+
],
|
|
1484
|
+
state,
|
|
1485
|
+
props: [
|
|
1486
|
+
itemProps,
|
|
1487
|
+
defaultProps,
|
|
1488
|
+
elementProps,
|
|
1489
|
+
getButtonProps
|
|
1490
|
+
]
|
|
1491
|
+
});
|
|
1492
|
+
const contextValue = React$1.useMemo(() => ({
|
|
1493
|
+
selected,
|
|
1494
|
+
index,
|
|
1495
|
+
textRef,
|
|
1496
|
+
selectedByFocus
|
|
1497
|
+
}), [
|
|
1498
|
+
selected,
|
|
1499
|
+
index,
|
|
1500
|
+
textRef,
|
|
1501
|
+
selectedByFocus
|
|
1502
|
+
]);
|
|
1503
|
+
return /*#__PURE__*/ jsx(SelectItemContext.Provider, {
|
|
1504
|
+
value: contextValue,
|
|
1505
|
+
children: element
|
|
1506
|
+
});
|
|
1507
|
+
}));
|
|
1508
|
+
SelectItem.displayName = "SelectItem";
|
|
1509
|
+
//#endregion
|
|
1510
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs
|
|
1511
|
+
/**
|
|
1512
|
+
* Indicates whether the select item is selected.
|
|
1513
|
+
* Renders a `<span>` element.
|
|
1514
|
+
*
|
|
1515
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1516
|
+
*/
|
|
1517
|
+
const SelectItemIndicator = /*#__PURE__*/ React$1.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {
|
|
1518
|
+
const { selected } = useSelectItemContext();
|
|
1519
|
+
if (!(componentProps.keepMounted || selected)) return null;
|
|
1520
|
+
return /*#__PURE__*/ jsx(ItemIndicator, {
|
|
1521
|
+
...componentProps,
|
|
1522
|
+
selected,
|
|
1523
|
+
ref: forwardedRef
|
|
1524
|
+
});
|
|
1525
|
+
});
|
|
1526
|
+
SelectItemIndicator.displayName = "SelectItemIndicator";
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
|
|
1529
|
+
/**
|
|
1530
|
+
* A text label of the select item.
|
|
1531
|
+
* Renders a `<div>` element.
|
|
1532
|
+
*
|
|
1533
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1534
|
+
*/
|
|
1535
|
+
const SelectItemText = /*#__PURE__*/ React$1.memo(/*#__PURE__*/ React$1.forwardRef(function SelectItemText(componentProps, forwardedRef) {
|
|
1536
|
+
const { index, textRef, selectedByFocus } = useSelectItemContext();
|
|
1537
|
+
const store = useSelectRootContext();
|
|
1538
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1539
|
+
const localRef = React$1.useCallback((node) => {
|
|
1540
|
+
if (!node) return;
|
|
1541
|
+
if (index === 0) store.context.firstItemTextRef.current = node;
|
|
1542
|
+
if (selectedByFocus) store.context.selectedItemTextRef.current = node;
|
|
1543
|
+
}, [
|
|
1544
|
+
store,
|
|
1545
|
+
index,
|
|
1546
|
+
selectedByFocus
|
|
1547
|
+
]);
|
|
1548
|
+
return useRenderElement("div", componentProps, {
|
|
1549
|
+
ref: [
|
|
1550
|
+
localRef,
|
|
1551
|
+
forwardedRef,
|
|
1552
|
+
textRef
|
|
1553
|
+
],
|
|
1554
|
+
props: elementProps
|
|
1555
|
+
});
|
|
1556
|
+
}));
|
|
1557
|
+
SelectItemText.displayName = "SelectItemText";
|
|
1558
|
+
//#endregion
|
|
1559
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/group/SelectGroupContext.mjs
|
|
1560
|
+
const SelectGroupContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1561
|
+
SelectGroupContext.displayName = "SelectGroupContext";
|
|
1562
|
+
function useSelectGroupContext() {
|
|
1563
|
+
const context = React$1.useContext(SelectGroupContext);
|
|
1564
|
+
if (context === void 0) throw new Error("Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
|
|
1565
|
+
return context;
|
|
1566
|
+
}
|
|
1567
|
+
//#endregion
|
|
1568
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/group/SelectGroup.mjs
|
|
1569
|
+
/**
|
|
1570
|
+
* Groups related select items with the corresponding label.
|
|
1571
|
+
* Renders a `<div>` element.
|
|
1572
|
+
*
|
|
1573
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1574
|
+
*/
|
|
1575
|
+
const SelectGroup = /*#__PURE__*/ React$1.forwardRef(function SelectGroup(componentProps, forwardedRef) {
|
|
1576
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1577
|
+
const [labelId, setLabelId] = React$1.useState();
|
|
1578
|
+
const contextValue = React$1.useMemo(() => ({
|
|
1579
|
+
labelId,
|
|
1580
|
+
setLabelId
|
|
1581
|
+
}), [labelId, setLabelId]);
|
|
1582
|
+
const element = useRenderElement("div", componentProps, {
|
|
1583
|
+
ref: forwardedRef,
|
|
1584
|
+
props: [{
|
|
1585
|
+
role: "group",
|
|
1586
|
+
"aria-labelledby": labelId
|
|
1587
|
+
}, elementProps]
|
|
1588
|
+
});
|
|
1589
|
+
return /*#__PURE__*/ jsx(SelectGroupContext.Provider, {
|
|
1590
|
+
value: contextValue,
|
|
1591
|
+
children: element
|
|
1592
|
+
});
|
|
1593
|
+
});
|
|
1594
|
+
SelectGroup.displayName = "SelectGroup";
|
|
1595
|
+
//#endregion
|
|
1596
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs
|
|
1597
|
+
/**
|
|
1598
|
+
* An accessible label that is automatically associated with its parent group.
|
|
1599
|
+
* Renders a `<div>` element.
|
|
1600
|
+
*
|
|
1601
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1602
|
+
*/
|
|
1603
|
+
const SelectGroupLabel = /*#__PURE__*/ React$1.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {
|
|
1604
|
+
const { render, className, style, id: idProp, ...elementProps } = componentProps;
|
|
1605
|
+
const { setLabelId } = useSelectGroupContext();
|
|
1606
|
+
const id = useBaseUiId(idProp);
|
|
1607
|
+
useIsoLayoutEffect(() => {
|
|
1608
|
+
setLabelId(id);
|
|
1609
|
+
return () => {
|
|
1610
|
+
setLabelId((currentId) => currentId === id ? void 0 : currentId);
|
|
1611
|
+
};
|
|
1612
|
+
}, [id, setLabelId]);
|
|
1613
|
+
return useRenderElement("div", componentProps, {
|
|
1614
|
+
ref: forwardedRef,
|
|
1615
|
+
props: [{
|
|
1616
|
+
id,
|
|
1617
|
+
"aria-hidden": true
|
|
1618
|
+
}, elementProps]
|
|
1619
|
+
});
|
|
1620
|
+
});
|
|
1621
|
+
SelectGroupLabel.displayName = "SelectGroupLabel";
|
|
1622
|
+
//#endregion
|
|
1623
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/select/separator/SelectSeparator.mjs
|
|
1624
|
+
/**
|
|
1625
|
+
* A visual separator between items or groups.
|
|
1626
|
+
* Renders a `<div>` element.
|
|
1627
|
+
*
|
|
1628
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1629
|
+
*/
|
|
1630
|
+
const SelectSeparator = ListboxSeparator;
|
|
1631
|
+
//#endregion
|
|
1632
|
+
export { SelectLabel as _, SelectItemIndicator as a, SelectPopup as c, useSelectPositionerContext as d, SelectPortal as f, SelectTriggerDataAttributes_exports as g, SelectTrigger as h, SelectItemText as i, SelectPositionerCssVars_exports as l, SelectValue as m, SelectGroupLabel as n, SelectItem as o, SelectIcon as p, SelectGroup as r, SelectList as s, SelectSeparator as t, SelectPositioner as u, SelectRoot as v, useSelectRootContext as y };
|