@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,840 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as NOOP, d as isReactVersionAtLeast, n as useRenderElement, p as useRefWithInit, s as EMPTY_OBJECT } from "./useRenderElement-nkklxbq1rp7h2kw0.js";
|
|
3
|
+
import { n as useIsoLayoutEffect } from "./safeReact-ek77ilng4ekk7mgz.js";
|
|
4
|
+
import { a as getPreviousTabbable, ct as apple, et as isClickLikeEvent, i as getNextTabbable, n as enableFocusInside, s as isOutsideEvent, t as disableFocusInside } from "./vendor-utils-io8z5lsfxq8m2dcc.js";
|
|
5
|
+
import { n as webkit } from "./engine-hzmefiqm63hu0c7i.js";
|
|
6
|
+
import { O as isNode } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
7
|
+
import { t as createChangeEventDetails } from "./createBaseUIEventDetails-nvee6bghv2reeqdb.js";
|
|
8
|
+
import "./reason-parts-hssx64rmlxyn6gw5.js";
|
|
9
|
+
import { t as addEventListener } from "./addEventListener-ku3x23446prmd1kz.js";
|
|
10
|
+
import { t as mergeCleanups } from "./mergeCleanups-nw73c6jfwl5tyhw4.js";
|
|
11
|
+
import { t as useStableCallback } from "./useStableCallback-le5qgj6p9l04729n.js";
|
|
12
|
+
import { t as visuallyHidden } from "./visuallyHidden-kzzs9hbe93is3rci.js";
|
|
13
|
+
import { t as useId$1 } from "./useId-82z8yqlmc1hy1c5t.js";
|
|
14
|
+
import { s as createEventEmitter } from "./FloatingTree-kiyzavvaum442o1s.js";
|
|
15
|
+
import * as React$1 from "react";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import * as ReactDOM from "react-dom";
|
|
18
|
+
import { useSyncExternalStore as useSyncExternalStore$1 } from "use-sync-external-store/shim";
|
|
19
|
+
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
|
|
20
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.5.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/fastHooks.mjs
|
|
21
|
+
const hooks = [];
|
|
22
|
+
let currentInstance = void 0;
|
|
23
|
+
function getInstance() {
|
|
24
|
+
return currentInstance;
|
|
25
|
+
}
|
|
26
|
+
function register(hook) {
|
|
27
|
+
hooks.push(hook);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Wraps a component function to enable performance optimizations for internal hooks.
|
|
31
|
+
*
|
|
32
|
+
* **Performance Optimization:**
|
|
33
|
+
* Components wrapped with `fastComponent` have access to a shared "instance" context that enables
|
|
34
|
+
* specialized hook implementations to batch operations and reduce overhead. The wrapper creates a
|
|
35
|
+
* stable instance object that persists across renders, sets it as the current context, calls
|
|
36
|
+
* registered hooks before and after rendering, then clears the context. The primary benefit is
|
|
37
|
+
* with `useStore`, where multiple store subscriptions within the same component are collapsed into
|
|
38
|
+
* a single `useSyncExternalStore` subscription per store, significantly reducing re-render overhead.
|
|
39
|
+
* This optimization is only active on React 19+; on earlier versions `useStore` falls back to a
|
|
40
|
+
* separate subscription per call.
|
|
41
|
+
*
|
|
42
|
+
* **Requirements:**
|
|
43
|
+
* - The component function should follow standard React component patterns
|
|
44
|
+
* - `useStore` calls must keep a stable order and count across renders, as batched hooks are
|
|
45
|
+
* matched by call index
|
|
46
|
+
* - Do not rely on the instance context outside of specialized hooks
|
|
47
|
+
*
|
|
48
|
+
* @param fn - The component function to wrap
|
|
49
|
+
* @returns A wrapped component with the same signature as the input function
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* // Wrapping a component to enable optimized useStore batching
|
|
54
|
+
* export const TooltipRoot = fastComponent(function TooltipRoot(props) {
|
|
55
|
+
* // These useStore calls share a single subscription
|
|
56
|
+
* const open = useStore(store, (state) => state.open);
|
|
57
|
+
* const disabled = useStore(store, (state) => state.disabled);
|
|
58
|
+
* const value = useStore(store, (state) => state.value);
|
|
59
|
+
* // ...
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
function fastComponent(fn) {
|
|
64
|
+
const FastComponent = (props, forwardedRef) => {
|
|
65
|
+
const instance = useRefWithInit(createInstance).current;
|
|
66
|
+
let result;
|
|
67
|
+
try {
|
|
68
|
+
currentInstance = instance;
|
|
69
|
+
for (const hook of hooks) hook.before(instance);
|
|
70
|
+
result = fn(props, forwardedRef);
|
|
71
|
+
for (const hook of hooks) hook.after(instance);
|
|
72
|
+
instance.didInitialize = true;
|
|
73
|
+
} finally {
|
|
74
|
+
currentInstance = void 0;
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
FastComponent.displayName = fn.displayName || fn.name;
|
|
79
|
+
return FastComponent;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Wraps a component function with ref forwarding to enable performance optimizations for internal hooks.
|
|
83
|
+
*
|
|
84
|
+
* This is a convenience wrapper that combines `fastComponent` with `React.forwardRef`, enabling
|
|
85
|
+
* both performance optimizations and proper ref forwarding. See `fastComponent` for details on
|
|
86
|
+
* the performance benefits.
|
|
87
|
+
*
|
|
88
|
+
* @param fn - The component function that accepts props and a forwarded ref
|
|
89
|
+
* @returns A wrapped component with ref forwarding enabled
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```tsx
|
|
93
|
+
* // Wrapping a component with ref forwarding and optimized hooks
|
|
94
|
+
* export const TooltipTrigger = fastComponentRef(function TooltipTrigger(
|
|
95
|
+
* props,
|
|
96
|
+
* forwardedRef
|
|
97
|
+
* ) {
|
|
98
|
+
* const store = useContext(TooltipContext);
|
|
99
|
+
* const open = useStore(store, (state) => state.open);
|
|
100
|
+
* // ... component logic with ref
|
|
101
|
+
* return <button ref={forwardedRef} {...props} />;
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
function fastComponentRef(fn) {
|
|
106
|
+
return /*#__PURE__*/ React$1.forwardRef(fastComponent(fn));
|
|
107
|
+
}
|
|
108
|
+
function createInstance() {
|
|
109
|
+
return { didInitialize: false };
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.5.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/platform/screen-reader.mjs
|
|
113
|
+
/**
|
|
114
|
+
* The user *may* be using VoiceOver — actual activation is not detectable.
|
|
115
|
+
* True on any Apple platform (macOS, iOS, iPadOS).
|
|
116
|
+
*/
|
|
117
|
+
const voiceOver = apple;
|
|
118
|
+
//#endregion
|
|
119
|
+
//#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/utils/FocusGuard.mjs
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
const FocusGuard = /*#__PURE__*/ React$1.forwardRef(function FocusGuard(props, ref) {
|
|
124
|
+
const [role, setRole] = React$1.useState();
|
|
125
|
+
useIsoLayoutEffect(() => {
|
|
126
|
+
if (voiceOver && webkit) setRole("button");
|
|
127
|
+
}, []);
|
|
128
|
+
const restProps = {
|
|
129
|
+
tabIndex: 0,
|
|
130
|
+
role
|
|
131
|
+
};
|
|
132
|
+
return /*#__PURE__*/ jsx("span", {
|
|
133
|
+
...props,
|
|
134
|
+
ref,
|
|
135
|
+
style: visuallyHidden,
|
|
136
|
+
"aria-hidden": role ? void 0 : true,
|
|
137
|
+
...restProps,
|
|
138
|
+
"data-base-ui-focus-guard": ""
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
FocusGuard.displayName = "FocusGuard";
|
|
142
|
+
//#endregion
|
|
143
|
+
//#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/floating-ui-react/utils/createAttribute.mjs
|
|
144
|
+
function createAttribute(name) {
|
|
145
|
+
return `data-base-ui-${name}`;
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#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/internals/constants.mjs
|
|
149
|
+
const DISABLED_TRANSITIONS_STYLE = { style: { transition: "none" } };
|
|
150
|
+
const CLICK_TRIGGER_IDENTIFIER = "data-base-ui-click-trigger";
|
|
151
|
+
const BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
|
|
152
|
+
const LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
|
|
153
|
+
const BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
|
|
154
|
+
const LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
|
|
155
|
+
/**
|
|
156
|
+
* Used for dropdowns that usually strictly prefer top/bottom placements and
|
|
157
|
+
* use `var(--available-height)` to limit their height.
|
|
158
|
+
*/
|
|
159
|
+
const DROPDOWN_COLLISION_AVOIDANCE = { fallbackAxisSide: "none" };
|
|
160
|
+
/**
|
|
161
|
+
* Used by regular popups that usually aren't scrollable and are allowed to
|
|
162
|
+
* freely flip to any axis of placement.
|
|
163
|
+
*/
|
|
164
|
+
const POPUP_COLLISION_AVOIDANCE = { fallbackAxisSide: "end" };
|
|
165
|
+
/**
|
|
166
|
+
* Special visually hidden styles for the aria-owns owner element to ensure owned element
|
|
167
|
+
* accessibility in iOS/Safari/VoiceControl.
|
|
168
|
+
* The owner element is an empty span, so most of the common visually hidden styles are not needed.
|
|
169
|
+
* @see https://github.com/floating-ui/floating-ui/issues/3403
|
|
170
|
+
*/
|
|
171
|
+
const ownerVisuallyHidden = {
|
|
172
|
+
clipPath: "inset(50%)",
|
|
173
|
+
position: "fixed",
|
|
174
|
+
top: 0,
|
|
175
|
+
left: 0
|
|
176
|
+
};
|
|
177
|
+
//#endregion
|
|
178
|
+
//#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/floating-ui-react/components/FloatingPortal.mjs
|
|
179
|
+
const PortalContext = /*#__PURE__*/ React$1.createContext(null);
|
|
180
|
+
PortalContext.displayName = "PortalContext";
|
|
181
|
+
const usePortalContext = () => React$1.useContext(PortalContext);
|
|
182
|
+
const attr = createAttribute("portal");
|
|
183
|
+
function useFloatingPortalNode(props = {}) {
|
|
184
|
+
const { ref, container: containerProp, componentProps = EMPTY_OBJECT, elementProps } = props;
|
|
185
|
+
const uniqueId = useId$1();
|
|
186
|
+
const parentPortalNode = usePortalContext()?.portalNode;
|
|
187
|
+
const [containerElement, setContainerElement] = React$1.useState(null);
|
|
188
|
+
const [portalNode, setPortalNode] = React$1.useState(null);
|
|
189
|
+
const setPortalNodeRef = useStableCallback((node) => {
|
|
190
|
+
if (node !== null) setPortalNode(node);
|
|
191
|
+
});
|
|
192
|
+
const containerRef = React$1.useRef(null);
|
|
193
|
+
useIsoLayoutEffect(() => {
|
|
194
|
+
if (containerProp === null) {
|
|
195
|
+
if (containerRef.current) {
|
|
196
|
+
containerRef.current = null;
|
|
197
|
+
setPortalNode(null);
|
|
198
|
+
setContainerElement(null);
|
|
199
|
+
}
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
|
|
203
|
+
if (resolvedContainer == null) {
|
|
204
|
+
if (containerRef.current) {
|
|
205
|
+
containerRef.current = null;
|
|
206
|
+
setPortalNode(null);
|
|
207
|
+
setContainerElement(null);
|
|
208
|
+
}
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (containerRef.current !== resolvedContainer) {
|
|
212
|
+
containerRef.current = resolvedContainer;
|
|
213
|
+
setPortalNode(null);
|
|
214
|
+
setContainerElement(resolvedContainer);
|
|
215
|
+
}
|
|
216
|
+
}, [containerProp, parentPortalNode]);
|
|
217
|
+
const portalElement = useRenderElement("div", componentProps, {
|
|
218
|
+
ref: [ref, setPortalNodeRef],
|
|
219
|
+
props: [{
|
|
220
|
+
id: uniqueId,
|
|
221
|
+
[attr]: ""
|
|
222
|
+
}, elementProps]
|
|
223
|
+
});
|
|
224
|
+
const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ ReactDOM.createPortal(portalElement, containerElement) : null;
|
|
225
|
+
return {
|
|
226
|
+
node: portalNode,
|
|
227
|
+
nodeId: /*#__PURE__*/ React$1.isValidElement(portalElement) ? portalElement.props.id : void 0,
|
|
228
|
+
subtree: portalSubtree
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Portals the floating element into a given container element — by default,
|
|
233
|
+
* outside of the app root and into the body.
|
|
234
|
+
* This is necessary to ensure the floating element can appear outside any
|
|
235
|
+
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
236
|
+
* while retaining its location in the React tree.
|
|
237
|
+
* @see https://floating-ui.com/docs/FloatingPortal
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
240
|
+
const FloatingPortal = /*#__PURE__*/ React$1.forwardRef(function FloatingPortal(componentProps, forwardedRef) {
|
|
241
|
+
const { render, className, style, children, container, portalOwnerRole, ...elementProps } = componentProps;
|
|
242
|
+
const { node: portalNode, nodeId: portalNodeId, subtree: portalSubtree } = useFloatingPortalNode({
|
|
243
|
+
container,
|
|
244
|
+
ref: forwardedRef,
|
|
245
|
+
componentProps,
|
|
246
|
+
elementProps
|
|
247
|
+
});
|
|
248
|
+
const beforeOutsideRef = React$1.useRef(null);
|
|
249
|
+
const afterOutsideRef = React$1.useRef(null);
|
|
250
|
+
const beforeInsideRef = React$1.useRef(null);
|
|
251
|
+
const afterInsideRef = React$1.useRef(null);
|
|
252
|
+
const [focusManagerState, setFocusManagerState] = React$1.useState(null);
|
|
253
|
+
const focusInsideDisabledRef = React$1.useRef(false);
|
|
254
|
+
const modal = focusManagerState?.modal;
|
|
255
|
+
const open = focusManagerState?.open;
|
|
256
|
+
const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
|
|
257
|
+
React$1.useEffect(() => {
|
|
258
|
+
if (!portalNode || modal) return;
|
|
259
|
+
function onFocus(event) {
|
|
260
|
+
if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
|
|
261
|
+
if (event.type === "focusin") {
|
|
262
|
+
if (focusInsideDisabledRef.current) {
|
|
263
|
+
enableFocusInside(portalNode);
|
|
264
|
+
focusInsideDisabledRef.current = false;
|
|
265
|
+
}
|
|
266
|
+
} else {
|
|
267
|
+
disableFocusInside(portalNode);
|
|
268
|
+
focusInsideDisabledRef.current = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
|
|
273
|
+
}, [portalNode, modal]);
|
|
274
|
+
useIsoLayoutEffect(() => {
|
|
275
|
+
if (!portalNode || open !== true || !focusInsideDisabledRef.current) return;
|
|
276
|
+
enableFocusInside(portalNode);
|
|
277
|
+
focusInsideDisabledRef.current = false;
|
|
278
|
+
}, [open, portalNode]);
|
|
279
|
+
const portalContextValue = React$1.useMemo(() => ({
|
|
280
|
+
beforeOutsideRef,
|
|
281
|
+
afterOutsideRef,
|
|
282
|
+
beforeInsideRef,
|
|
283
|
+
afterInsideRef,
|
|
284
|
+
portalNode,
|
|
285
|
+
setFocusManagerState
|
|
286
|
+
}), [portalNode]);
|
|
287
|
+
return /*#__PURE__*/ jsxs(React$1.Fragment, { children: [portalSubtree, /*#__PURE__*/ jsxs(PortalContext.Provider, {
|
|
288
|
+
value: portalContextValue,
|
|
289
|
+
children: [
|
|
290
|
+
shouldRenderGuards && portalNode && /*#__PURE__*/ jsx(FocusGuard, {
|
|
291
|
+
"data-type": "outside",
|
|
292
|
+
ref: beforeOutsideRef,
|
|
293
|
+
onFocus: (event) => {
|
|
294
|
+
if (isOutsideEvent(event, portalNode)) beforeInsideRef.current?.focus();
|
|
295
|
+
else {
|
|
296
|
+
const domReference = focusManagerState ? focusManagerState.domReference : null;
|
|
297
|
+
getPreviousTabbable(domReference)?.focus();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}),
|
|
301
|
+
shouldRenderGuards && portalNode && /*#__PURE__*/ jsx("span", {
|
|
302
|
+
role: portalOwnerRole,
|
|
303
|
+
"aria-owns": portalNodeId,
|
|
304
|
+
style: ownerVisuallyHidden
|
|
305
|
+
}),
|
|
306
|
+
portalNode && /*#__PURE__*/ ReactDOM.createPortal(children, portalNode),
|
|
307
|
+
shouldRenderGuards && portalNode && /*#__PURE__*/ jsx(FocusGuard, {
|
|
308
|
+
"data-type": "outside",
|
|
309
|
+
ref: afterOutsideRef,
|
|
310
|
+
onFocus: (event) => {
|
|
311
|
+
if (isOutsideEvent(event, portalNode)) afterInsideRef.current?.focus();
|
|
312
|
+
else {
|
|
313
|
+
const domReference = focusManagerState ? focusManagerState.domReference : null;
|
|
314
|
+
getNextTabbable(domReference)?.focus();
|
|
315
|
+
if (focusManagerState?.closeOnFocusOut) focusManagerState?.onOpenChange(false, createChangeEventDetails("focus-out", event.nativeEvent));
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
})
|
|
319
|
+
]
|
|
320
|
+
})] });
|
|
321
|
+
});
|
|
322
|
+
FloatingPortal.displayName = "FloatingPortal";
|
|
323
|
+
//#endregion
|
|
324
|
+
//#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/utils/popups/popupTriggerMap.mjs
|
|
325
|
+
/**
|
|
326
|
+
* Development-only reverse index of element to registered id, keyed by the owning map.
|
|
327
|
+
*
|
|
328
|
+
* Registration would otherwise have to scan every entry to detect an element claimed by two ids,
|
|
329
|
+
* making the mount of many triggers sharing one handle quadratic. Kept module-scoped, lazily
|
|
330
|
+
* initialized, and read only from `process.env.NODE_ENV` guards so production builds drop it along
|
|
331
|
+
* with the checks.
|
|
332
|
+
*/
|
|
333
|
+
let devElementIdsByMap;
|
|
334
|
+
function getDevElementIds(map) {
|
|
335
|
+
devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
|
|
336
|
+
let elementIds = devElementIdsByMap.get(map);
|
|
337
|
+
if (!elementIds) {
|
|
338
|
+
elementIds = /* @__PURE__ */ new WeakMap();
|
|
339
|
+
devElementIdsByMap.set(map, elementIds);
|
|
340
|
+
}
|
|
341
|
+
return elementIds;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Data structure to keep track of popup trigger elements by their IDs.
|
|
345
|
+
*
|
|
346
|
+
* Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
|
|
347
|
+
* while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
|
|
348
|
+
*/
|
|
349
|
+
var PopupTriggerMap = class {
|
|
350
|
+
idMap = /* @__PURE__ */ new Map();
|
|
351
|
+
/**
|
|
352
|
+
* Adds a trigger element with the given ID.
|
|
353
|
+
*
|
|
354
|
+
* Note: The provided element is assumed to not be registered under multiple IDs.
|
|
355
|
+
*/
|
|
356
|
+
add(id, element) {
|
|
357
|
+
{
|
|
358
|
+
const elementIds = getDevElementIds(this);
|
|
359
|
+
const existingId = elementIds.get(element);
|
|
360
|
+
if (existingId !== void 0 && existingId !== id) throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
361
|
+
const previousElement = this.idMap.get(id);
|
|
362
|
+
if (previousElement !== void 0 && previousElement !== element) elementIds.delete(previousElement);
|
|
363
|
+
elementIds.set(element, id);
|
|
364
|
+
}
|
|
365
|
+
this.idMap.set(id, element);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Removes the trigger element with the given ID.
|
|
369
|
+
*/
|
|
370
|
+
delete(id) {
|
|
371
|
+
{
|
|
372
|
+
const element = this.idMap.get(id);
|
|
373
|
+
if (element !== void 0) devElementIdsByMap?.get(this)?.delete(element);
|
|
374
|
+
}
|
|
375
|
+
this.idMap.delete(id);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Whether the given element is registered as a trigger.
|
|
379
|
+
*/
|
|
380
|
+
hasElement(element) {
|
|
381
|
+
for (const registered of this.idMap.values()) if (registered === element) return true;
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Whether there is a registered trigger element matching the given predicate.
|
|
386
|
+
*/
|
|
387
|
+
hasMatchingElement(predicate) {
|
|
388
|
+
for (const element of this.idMap.values()) if (predicate(element)) return true;
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Returns the trigger element associated with the given ID, or undefined if no such element exists.
|
|
393
|
+
*/
|
|
394
|
+
getById(id) {
|
|
395
|
+
return this.idMap.get(id);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
|
|
399
|
+
*/
|
|
400
|
+
entries() {
|
|
401
|
+
return this.idMap.entries();
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Returns an iterable of all registered trigger elements.
|
|
405
|
+
*/
|
|
406
|
+
elements() {
|
|
407
|
+
return this.idMap.values();
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Returns the number of registered trigger elements.
|
|
411
|
+
*/
|
|
412
|
+
get size() {
|
|
413
|
+
return this.idMap.size;
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.5.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/store/useStore.mjs
|
|
418
|
+
const useStoreImplementation = isReactVersionAtLeast(19) ? useStoreFast : useStoreLegacy;
|
|
419
|
+
function useStore(store, selector, a1, a2, a3) {
|
|
420
|
+
return useStoreImplementation(store, selector, a1, a2, a3);
|
|
421
|
+
}
|
|
422
|
+
function useStoreR19(store, selector, a1, a2, a3) {
|
|
423
|
+
const getSelection = React$1.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [
|
|
424
|
+
store,
|
|
425
|
+
selector,
|
|
426
|
+
a1,
|
|
427
|
+
a2,
|
|
428
|
+
a3
|
|
429
|
+
]);
|
|
430
|
+
return useSyncExternalStore$1(store.subscribe, getSelection, getSelection);
|
|
431
|
+
}
|
|
432
|
+
register({
|
|
433
|
+
before(instance) {
|
|
434
|
+
instance.syncIndex = 0;
|
|
435
|
+
if (!instance.didInitialize) {
|
|
436
|
+
instance.syncTick = 1;
|
|
437
|
+
instance.syncHooks = [];
|
|
438
|
+
instance.didChangeStore = true;
|
|
439
|
+
instance.getSnapshot = () => {
|
|
440
|
+
let didChange = false;
|
|
441
|
+
for (let i = 0; i < instance.syncHooks.length; i += 1) {
|
|
442
|
+
const hook = instance.syncHooks[i];
|
|
443
|
+
const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
|
|
444
|
+
if (!Object.is(hook.value, value)) {
|
|
445
|
+
didChange = true;
|
|
446
|
+
hook.value = value;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (didChange) instance.syncTick += 1;
|
|
450
|
+
return instance.syncTick;
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
after(instance) {
|
|
455
|
+
if (instance.syncHooks.length > 0) {
|
|
456
|
+
if (instance.didChangeStore) {
|
|
457
|
+
instance.didChangeStore = false;
|
|
458
|
+
instance.subscribe = (onStoreChange) => {
|
|
459
|
+
const stores = /* @__PURE__ */ new Set();
|
|
460
|
+
for (const hook of instance.syncHooks) stores.add(hook.store);
|
|
461
|
+
const unsubscribes = [];
|
|
462
|
+
for (const store of stores) unsubscribes.push(store.subscribe(onStoreChange));
|
|
463
|
+
return () => {
|
|
464
|
+
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
useSyncExternalStore$1(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
function useStoreFast(store, selector, a1, a2, a3) {
|
|
473
|
+
const instance = getInstance();
|
|
474
|
+
if (!instance) return useStoreR19(store, selector, a1, a2, a3);
|
|
475
|
+
const index = instance.syncIndex;
|
|
476
|
+
instance.syncIndex += 1;
|
|
477
|
+
let hook;
|
|
478
|
+
if (!instance.didInitialize) {
|
|
479
|
+
hook = {
|
|
480
|
+
store,
|
|
481
|
+
selector,
|
|
482
|
+
a1,
|
|
483
|
+
a2,
|
|
484
|
+
a3,
|
|
485
|
+
value: selector(store.getSnapshot(), a1, a2, a3)
|
|
486
|
+
};
|
|
487
|
+
instance.syncHooks.push(hook);
|
|
488
|
+
} else {
|
|
489
|
+
hook = instance.syncHooks[index];
|
|
490
|
+
if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
|
|
491
|
+
if (hook.store !== store) instance.didChangeStore = true;
|
|
492
|
+
hook.store = store;
|
|
493
|
+
hook.selector = selector;
|
|
494
|
+
hook.a1 = a1;
|
|
495
|
+
hook.a2 = a2;
|
|
496
|
+
hook.a3 = a3;
|
|
497
|
+
hook.value = selector(store.getSnapshot(), a1, a2, a3);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return hook.value;
|
|
501
|
+
}
|
|
502
|
+
function useStoreLegacy(store, selector, a1, a2, a3) {
|
|
503
|
+
return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.5.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/store/Store.mjs
|
|
507
|
+
/**
|
|
508
|
+
* A data store implementation that allows subscribing to state changes and updating the state.
|
|
509
|
+
* It uses an observer pattern to notify subscribers when the state changes.
|
|
510
|
+
*/
|
|
511
|
+
var Store = class {
|
|
512
|
+
/**
|
|
513
|
+
* Creates a store with the given initial state, constructing the class it is called on.
|
|
514
|
+
* Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
|
|
515
|
+
* class but degrades the inferred instance type to `Store`; use `new` there instead.
|
|
516
|
+
*/
|
|
517
|
+
static create(state) {
|
|
518
|
+
return new this(state);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* The current state of the store.
|
|
522
|
+
* This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
|
|
523
|
+
* To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
|
|
524
|
+
* The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
|
|
525
|
+
*
|
|
526
|
+
* Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
|
|
527
|
+
*/
|
|
528
|
+
constructor(state) {
|
|
529
|
+
this.state = state;
|
|
530
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
531
|
+
this.updateTick = 0;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Registers a listener that will be called whenever the store's state changes.
|
|
535
|
+
*
|
|
536
|
+
* @param fn The listener function to be called on state changes.
|
|
537
|
+
* @returns A function to unsubscribe the listener.
|
|
538
|
+
*/
|
|
539
|
+
subscribe = (fn) => {
|
|
540
|
+
this.listeners.add(fn);
|
|
541
|
+
return () => {
|
|
542
|
+
this.listeners.delete(fn);
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Returns the current state of the store.
|
|
547
|
+
*/
|
|
548
|
+
getSnapshot = () => {
|
|
549
|
+
return this.state;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* Updates the entire store's state and notifies all registered listeners.
|
|
553
|
+
*
|
|
554
|
+
* @param newState The new state to set for the store.
|
|
555
|
+
*/
|
|
556
|
+
setState(newState) {
|
|
557
|
+
if (this.state === newState) return;
|
|
558
|
+
this.state = newState;
|
|
559
|
+
this.updateTick += 1;
|
|
560
|
+
const currentTick = this.updateTick;
|
|
561
|
+
for (const listener of this.listeners) {
|
|
562
|
+
if (currentTick !== this.updateTick) return;
|
|
563
|
+
listener(newState);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Merges the provided changes into the current state and notifies listeners if there are changes.
|
|
568
|
+
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
569
|
+
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
570
|
+
*
|
|
571
|
+
* @param changes An object containing the changes to apply to the current state.
|
|
572
|
+
*/
|
|
573
|
+
update(changes) {
|
|
574
|
+
for (const key in changes) if (!Object.is(this.state[key], changes[key])) {
|
|
575
|
+
this.setState({
|
|
576
|
+
...this.state,
|
|
577
|
+
...changes
|
|
578
|
+
});
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
|
|
584
|
+
*
|
|
585
|
+
* @param key The key in the store's state to update.
|
|
586
|
+
* @param value The new value to set for the specified key.
|
|
587
|
+
*/
|
|
588
|
+
set(key, value) {
|
|
589
|
+
if (!Object.is(this.state[key], value)) this.setState({
|
|
590
|
+
...this.state,
|
|
591
|
+
[key]: value
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Gives the state a new reference and updates all registered listeners.
|
|
596
|
+
*/
|
|
597
|
+
notifyAll() {
|
|
598
|
+
const newState = { ...this.state };
|
|
599
|
+
this.setState(newState);
|
|
600
|
+
}
|
|
601
|
+
use(selector, a1, a2, a3) {
|
|
602
|
+
return useStore(this, selector, a1, a2, a3);
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
//#endregion
|
|
606
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.5.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/store/ReactStore.mjs
|
|
607
|
+
/**
|
|
608
|
+
* A Store that supports controlled state keys, non-reactive values and provides utility methods for React.
|
|
609
|
+
*/
|
|
610
|
+
var ReactStore = class extends Store {
|
|
611
|
+
/**
|
|
612
|
+
* Creates a new ReactStore instance.
|
|
613
|
+
*
|
|
614
|
+
* @param state Initial state of the store.
|
|
615
|
+
* @param context Non-reactive context values.
|
|
616
|
+
* @param selectors Optional selectors for use with `useState`.
|
|
617
|
+
*/
|
|
618
|
+
constructor(state, context = {}, selectors) {
|
|
619
|
+
super(state);
|
|
620
|
+
this.context = context;
|
|
621
|
+
this.selectors = selectors;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Non-reactive values such as refs, callbacks, etc.
|
|
625
|
+
*/
|
|
626
|
+
/**
|
|
627
|
+
* Synchronizes a single external value into the store.
|
|
628
|
+
*
|
|
629
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
630
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
631
|
+
*/
|
|
632
|
+
useSyncedValue(key, value) {
|
|
633
|
+
React$1.useDebugValue(key);
|
|
634
|
+
const store = this;
|
|
635
|
+
useIsoLayoutEffect(() => {
|
|
636
|
+
if (store.state[key] !== value) store.set(key, value);
|
|
637
|
+
}, [
|
|
638
|
+
store,
|
|
639
|
+
key,
|
|
640
|
+
value
|
|
641
|
+
]);
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Synchronizes a single external value into the store and
|
|
645
|
+
* cleans it up (sets to `undefined`) on unmount.
|
|
646
|
+
*
|
|
647
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
648
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
649
|
+
*/
|
|
650
|
+
useSyncedValueWithCleanup(key, value) {
|
|
651
|
+
const store = this;
|
|
652
|
+
useIsoLayoutEffect(() => {
|
|
653
|
+
if (store.state[key] !== value) store.set(key, value);
|
|
654
|
+
return () => {
|
|
655
|
+
store.set(key, void 0);
|
|
656
|
+
};
|
|
657
|
+
}, [
|
|
658
|
+
store,
|
|
659
|
+
key,
|
|
660
|
+
value
|
|
661
|
+
]);
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Synchronizes multiple external values into the store.
|
|
665
|
+
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
666
|
+
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
667
|
+
*
|
|
668
|
+
* Note that the while the values in `state` are updated immediately, the values returned
|
|
669
|
+
* by `useState` are updated before the next render (similarly to React's `useState`).
|
|
670
|
+
*
|
|
671
|
+
* @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
|
|
672
|
+
*/
|
|
673
|
+
useSyncedValues(statePart) {
|
|
674
|
+
const store = this;
|
|
675
|
+
{
|
|
676
|
+
React$1.useDebugValue(statePart, (p) => Object.keys(p));
|
|
677
|
+
const keys = React$1.useRef(Object.keys(statePart)).current;
|
|
678
|
+
const nextKeys = Object.keys(statePart);
|
|
679
|
+
if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
680
|
+
}
|
|
681
|
+
const dependencies = Object.values(statePart);
|
|
682
|
+
useIsoLayoutEffect(() => {
|
|
683
|
+
store.update(statePart);
|
|
684
|
+
}, [store, ...dependencies]);
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
|
|
688
|
+
* is non-undefined, the store's state at `key` is updated to match `controlled`.
|
|
689
|
+
*/
|
|
690
|
+
useControlledProp(key, controlled) {
|
|
691
|
+
React$1.useDebugValue(key);
|
|
692
|
+
const store = this;
|
|
693
|
+
const isControlled = controlled !== void 0;
|
|
694
|
+
useIsoLayoutEffect(() => {
|
|
695
|
+
if (isControlled && !Object.is(store.state[key], controlled)) store.setState({
|
|
696
|
+
...store.state,
|
|
697
|
+
[key]: controlled
|
|
698
|
+
});
|
|
699
|
+
}, [
|
|
700
|
+
store,
|
|
701
|
+
key,
|
|
702
|
+
controlled,
|
|
703
|
+
isControlled
|
|
704
|
+
]);
|
|
705
|
+
{
|
|
706
|
+
const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
707
|
+
if (!cache.has(key)) cache.set(key, isControlled);
|
|
708
|
+
const previouslyControlled = cache.get(key);
|
|
709
|
+
if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) console.error(`A component is changing the ${previouslyControlled ? "" : "un"}controlled state of ${key.toString()} to be ${previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
/** Gets the current value from the store using a selector with the provided key.
|
|
713
|
+
*
|
|
714
|
+
* @param key Key of the selector to use.
|
|
715
|
+
*/
|
|
716
|
+
select(key, a1, a2, a3) {
|
|
717
|
+
const selector = this.selectors[key];
|
|
718
|
+
return selector(this.state, a1, a2, a3);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Returns a value from the store's state using a selector function.
|
|
722
|
+
* Used to subscribe to specific parts of the state.
|
|
723
|
+
* This methods causes a rerender whenever the selected state changes.
|
|
724
|
+
*
|
|
725
|
+
* @param key Key of the selector to use.
|
|
726
|
+
*/
|
|
727
|
+
useState(key, a1, a2, a3) {
|
|
728
|
+
React$1.useDebugValue(key);
|
|
729
|
+
return useStore(this, this.selectors[key], a1, a2, a3);
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Wraps a function with `useStableCallback` to ensure it has a stable reference
|
|
733
|
+
* and assigns it to the context.
|
|
734
|
+
*
|
|
735
|
+
* @param key Key of the event callback. Must be a function in the context.
|
|
736
|
+
* @param fn Function to assign.
|
|
737
|
+
*/
|
|
738
|
+
useContextCallback(key, fn) {
|
|
739
|
+
React$1.useDebugValue(key);
|
|
740
|
+
const stableFunction = useStableCallback(fn ?? NOOP);
|
|
741
|
+
this.context[key] = stableFunction;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Returns a stable setter function for a specific key in the store's state.
|
|
745
|
+
* It's commonly used to pass as a ref callback to React elements.
|
|
746
|
+
*
|
|
747
|
+
* @param key Key of the state to set.
|
|
748
|
+
*/
|
|
749
|
+
useStateSetter(key) {
|
|
750
|
+
const ref = React$1.useRef(void 0);
|
|
751
|
+
if (ref.current === void 0) ref.current = (value) => {
|
|
752
|
+
this.set(key, value);
|
|
753
|
+
};
|
|
754
|
+
return ref.current;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Observes changes derived from the store's selectors and calls the listener when the selected value changes.
|
|
758
|
+
*
|
|
759
|
+
* @param key Key of the selector to observe.
|
|
760
|
+
* @param listener Listener function called when the selector result changes.
|
|
761
|
+
*/
|
|
762
|
+
observe(selector, listener) {
|
|
763
|
+
let selectFn;
|
|
764
|
+
if (typeof selector === "function") selectFn = selector;
|
|
765
|
+
else selectFn = this.selectors[selector];
|
|
766
|
+
let prevValue = selectFn(this.state);
|
|
767
|
+
listener(prevValue, prevValue, this);
|
|
768
|
+
return this.subscribe((nextState) => {
|
|
769
|
+
const nextValue = selectFn(nextState);
|
|
770
|
+
if (!Object.is(prevValue, nextValue)) {
|
|
771
|
+
const oldValue = prevValue;
|
|
772
|
+
prevValue = nextValue;
|
|
773
|
+
listener(nextValue, oldValue, this);
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
//#endregion
|
|
779
|
+
//#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/floating-ui-react/components/FloatingRootStore.mjs
|
|
780
|
+
const selectors = {
|
|
781
|
+
open: (state) => state.open,
|
|
782
|
+
transitionStatus: (state) => state.transitionStatus,
|
|
783
|
+
domReferenceElement: (state) => state.domReferenceElement,
|
|
784
|
+
referenceElement: (state) => state.positionReference ?? state.referenceElement,
|
|
785
|
+
floatingElement: (state) => state.floatingElement,
|
|
786
|
+
floatingId: (state) => state.floatingId
|
|
787
|
+
};
|
|
788
|
+
var FloatingRootStore = class extends ReactStore {
|
|
789
|
+
constructor(options) {
|
|
790
|
+
const { syncOnly, nested, onOpenChange, triggerElements, ...initialState } = options;
|
|
791
|
+
super({
|
|
792
|
+
...initialState,
|
|
793
|
+
positionReference: initialState.referenceElement,
|
|
794
|
+
domReferenceElement: initialState.referenceElement
|
|
795
|
+
}, {
|
|
796
|
+
onOpenChange,
|
|
797
|
+
dataRef: { current: {} },
|
|
798
|
+
events: createEventEmitter(),
|
|
799
|
+
nested,
|
|
800
|
+
triggerElements
|
|
801
|
+
}, selectors);
|
|
802
|
+
this.syncOnly = syncOnly;
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
|
|
806
|
+
*/
|
|
807
|
+
syncOpenEvent = (newOpen, event) => {
|
|
808
|
+
if (!newOpen || !this.state.open || event != null && isClickLikeEvent(event)) this.context.dataRef.current.openEvent = newOpen ? event : void 0;
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* Runs the root-owned side effects for an open state change.
|
|
812
|
+
*/
|
|
813
|
+
dispatchOpenChange = (newOpen, eventDetails) => {
|
|
814
|
+
this.syncOpenEvent(newOpen, eventDetails.event);
|
|
815
|
+
const details = {
|
|
816
|
+
open: newOpen,
|
|
817
|
+
reason: eventDetails.reason,
|
|
818
|
+
nativeEvent: eventDetails.event,
|
|
819
|
+
nested: this.context.nested,
|
|
820
|
+
triggerElement: eventDetails.trigger
|
|
821
|
+
};
|
|
822
|
+
this.context.events.emit("openchange", details);
|
|
823
|
+
};
|
|
824
|
+
/**
|
|
825
|
+
* Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
|
|
826
|
+
*
|
|
827
|
+
* @param newOpen The new open state.
|
|
828
|
+
* @param eventDetails Details about the event that triggered the open state change.
|
|
829
|
+
*/
|
|
830
|
+
setOpen = (newOpen, eventDetails) => {
|
|
831
|
+
if (this.syncOnly) {
|
|
832
|
+
this.context.onOpenChange?.(newOpen, eventDetails);
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
this.dispatchOpenChange(newOpen, eventDetails);
|
|
836
|
+
this.context.onOpenChange?.(newOpen, eventDetails);
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
//#endregion
|
|
840
|
+
export { FocusGuard as _, FloatingPortal as a, fastComponentRef as b, BASE_UI_SWIPE_IGNORE_ATTRIBUTE as c, DISABLED_TRANSITIONS_STYLE as d, DROPDOWN_COLLISION_AVOIDANCE as f, createAttribute as g, ownerVisuallyHidden as h, PopupTriggerMap as i, BASE_UI_SWIPE_IGNORE_SELECTOR as l, POPUP_COLLISION_AVOIDANCE as m, ReactStore as n, useFloatingPortalNode as o, LEGACY_SWIPE_IGNORE_SELECTOR as p, useStore as r, usePortalContext as s, FloatingRootStore as t, CLICK_TRIGGER_IDENTIFIER as u, voiceOver as v, fastComponent as y };
|