@cloudflare/kumo 2.8.0 → 2.9.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 +88 -0
- package/README.md +3 -39
- package/ai/USAGE.md +89 -80
- package/ai/component-registry.json +165 -55
- package/ai/component-registry.md +484 -94
- package/ai/schemas.ts +4 -2
- package/bin/kumo.js +1 -1
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +1928 -1916
- package/dist/ai/schemas.js +5550 -4085
- package/dist/blocks-source/delete-resource/delete-resource.tsx +5 -5
- package/dist/blocks-source/resource-list/resource-list.test.tsx +1 -1
- package/dist/blocks-source/resource-list/resource-list.tsx +1 -4
- package/dist/button-Bbi7gFL7.d.ts +227 -0
- package/dist/catalog.d.ts +377 -0
- package/dist/catalog.js +347 -215
- package/dist/chunks/AlertDialogTrigger-fn9yjykev9h5l12q.js +24 -0
- package/dist/chunks/AutocompleteItem-clgm7u7zzgjy1hvb.js +82 -0
- package/dist/chunks/Button-oczevl8g75m85ew9.js +27 -0
- package/dist/chunks/CSPContext-guqghj8kxoukvlky.js +17 -0
- package/dist/chunks/CSPProvider-ogozggb4nr6evned.js +24 -0
- package/dist/chunks/CheckboxGroup-h9w1c6bo2nlcc4uj.js +177 -0
- package/dist/chunks/CheckboxGroupContext-f9wox07n2u5moq4h.js +12 -0
- package/dist/chunks/CheckboxIndicator-gz18hapnzraxyz9a.js +49 -0
- package/dist/chunks/CheckboxRoot-g6fb44xqgc0qxusf.js +361 -0
- package/dist/chunks/CollapsiblePanel-mnjlf99v79k3yabx.js +177 -0
- package/dist/chunks/ComboboxChipRemove-opf1zyu9yyp98dqd.js +302 -0
- package/dist/chunks/ComboboxClear-fi4op1n12c99ktca.js +302 -0
- package/dist/chunks/ComboboxEmpty-dr78bn7zilhqbkgc.js +1882 -0
- package/dist/chunks/ComboboxPopup-bugeajuqjattk1n7.js +205 -0
- package/dist/chunks/CompositeItem-l7zee38lq5m224d5.js +23 -0
- package/dist/chunks/CompositeList-bek8pmx9o8cu36ig.js +129 -0
- package/dist/chunks/CompositeListContext-oetjj2x8li8678as.js +18 -0
- package/dist/chunks/CompositeRoot-jm9n0rrea12rfny1.js +225 -0
- package/dist/chunks/CompositeRootContext-ofhzmevv7hadjhyy.js +12 -0
- package/dist/chunks/DialogHandle-o964gplvp59qqv23.js +139 -0
- package/dist/chunks/DialogPopup-cz73mkiyi9c33mhn.js +174 -0
- package/dist/chunks/DialogRoot-kfhbouiouenljp3q.js +15 -0
- package/dist/chunks/DialogTrigger-gzxvssie7e5e1iba.js +139 -0
- package/dist/chunks/DirectionContext-jc1g0w645603sd6p.js +13 -0
- package/dist/chunks/DirectionProvider-gdktkteyrlpnokak.js +21 -0
- package/dist/chunks/FieldControl-oz007qbkl6ejp7di.js +104 -0
- package/dist/chunks/FieldDescription-go88jdymmj9o0ugi.js +121 -0
- package/dist/chunks/FieldItemContext-j85dc0ihramj5ezs.js +10 -0
- package/dist/chunks/FieldLabel-junk2aczkvogpv5d.js +558 -0
- package/dist/chunks/FieldsetLegend-ch85hugankjah152.js +68 -0
- package/dist/chunks/FieldsetRootContext-b633e9uzilttuyfi.js +12 -0
- package/dist/chunks/FloatingPortalLite-ld4o97z16w23x6za.js +25 -0
- package/dist/chunks/FloatingTree-jdm71b3m43e34hk7.js +115 -0
- package/dist/chunks/Form-f1ibju5npd1qqowg.js +102 -0
- package/dist/chunks/FormContext-xz0b4h7ue30fkkn1.js +17 -0
- package/dist/chunks/Input-opaph7rt3w2vx3c0.js +20 -0
- package/dist/chunks/LabelableContext-hetas2e4y0kywfas.js +131 -0
- package/dist/chunks/MenuBackdrop-m0tfcr6sg50f9sn5.js +78 -0
- package/dist/chunks/MenuSubmenuTrigger-n281iqpstcnacsk6.js +1532 -0
- package/dist/chunks/MenuTrigger-dwh2ewyxp5j3ml02.js +266 -0
- package/dist/chunks/Menubar-m8euwx8biy1qpo44.js +117 -0
- package/dist/chunks/MenubarContext-ei2r6vu6lmsspozo.js +12 -0
- package/dist/chunks/MeterLabel-efe4koezlgg05cv8.js +151 -0
- package/dist/chunks/PopoverClose-inm8xliypc51murq.js +666 -0
- package/dist/chunks/RadioGroup-h25jrjmet0gxrvex.js +165 -0
- package/dist/chunks/RadioGroupContext-ft0nndmzqynjz8a2.js +10 -0
- package/dist/chunks/RadioIndicator-lvpixnzpkxpq7rp1.js +296 -0
- package/dist/chunks/ScrollAreaThumb-jydo7azxxwjn1cqf.js +944 -0
- package/dist/chunks/SelectGroupLabel-mug19qcz2k67qule.js +1600 -0
- package/dist/chunks/Separator-b8wf5rea6m1cei8k.js +24 -0
- package/dist/chunks/SwitchRoot-gumgk7356eqv7dve.js +237 -0
- package/dist/chunks/TabsList-obzldrvfzo50uqr4.js +617 -0
- package/dist/chunks/Toggle-hlf7recxsq6mxvax.js +89 -0
- package/dist/chunks/ToggleGroup-l8tfcwe33tlqqm8a.js +106 -0
- package/dist/chunks/ToggleGroupContext-cdk2zo6ciddpockn.js +12 -0
- package/dist/chunks/ToolbarGroupContext-nriz3632ymugfj6h.js +12 -0
- package/dist/chunks/ToolbarInput-oy7o682hhn2jdjen.js +152 -0
- package/dist/chunks/ToolbarRootContext-lvi96r1vvs93rhde.js +12 -0
- package/dist/chunks/TooltipPopup-ehusafczcky9jvae.js +868 -0
- package/dist/chunks/TooltipProvider-iq6hgymrn3b68h50.js +64 -0
- package/dist/chunks/addEventListener-lhqvk2ahlzjsanyg.js +13 -0
- package/dist/chunks/areArraysEqual-nlbeaqlzf4274zr3.js +7 -0
- package/dist/chunks/autocomplete-m8n1c775n0iilomf.js +152 -0
- package/dist/chunks/badge-e16yhhe9xibra5k7.js +148 -0
- package/dist/chunks/banner-cu2mip76zfx0gf27.js +258 -0
- package/dist/chunks/bash-jpzh6zbf5237424t.js +3 -0
- package/dist/chunks/breadcrumbs-hxibrxjtvudy0ir9.js +164 -0
- package/dist/chunks/button-eikucjpgqbsn5m5m.js +260 -0
- package/dist/chunks/chart-bxxlck50zlsbj3kl.js +3083 -0
- package/dist/chunks/checkbox-fovnhs7f1sekaxrh.js +158 -0
- package/dist/chunks/clamp-kvu4wtr1dw6b3pnd.js +7 -0
- package/dist/chunks/clipboard-text-fuyj4apm2xry4hkk.js +198 -0
- package/dist/chunks/cloudflare-logo-g0aimzpllornl0rc.js +186 -0
- package/dist/chunks/code-eu8kzwqnlhoyin24.js +96 -0
- package/dist/chunks/collapsible-lj0glxe1hezap65x.js +178 -0
- package/dist/chunks/combobox-m2nvbt0b1stb2syc.js +301 -0
- package/dist/chunks/command-palette-jjrbvylvvbj0qusg.js +507 -0
- package/dist/chunks/composite-o65hjzwwzb4kvl4w.js +102 -0
- package/dist/chunks/constants-j09lrtg73n4vlx5x.js +5 -0
- package/dist/chunks/core-kjfqbvgicl9i3abf.js +7163 -0
- package/dist/chunks/createBaseUIEventDetails-ddivuhl74gni72qn.js +86 -0
- package/dist/chunks/createToastManager-kjd838m8jog8pddj.js +1233 -0
- package/dist/chunks/css-d3t41yfupsmz7l1a.js +4 -0
- package/dist/chunks/date-picker-njfirc1m165k6yax.js +6786 -0
- package/dist/chunks/date-range-picker-g6sje1ua7n7jerkq.js +335 -0
- package/dist/chunks/dialog-b4r3dv8uvgl2pqem.js +170 -0
- package/dist/chunks/diff-g2re0kj6fh27rgg5.js +4 -0
- package/dist/chunks/dropdown-k0y5j6iuad7tvqgx.js +279 -0
- package/dist/chunks/empty-hmu7x39lnp0z2qm6.js +89 -0
- package/dist/chunks/engine-io35xsj9fgfxtihg.js +10 -0
- package/dist/chunks/engine-javascript-d795u677f1802oaf.js +3103 -0
- package/dist/chunks/engine-oniguruma-xjlw46ay321yj1av.js +388 -0
- package/dist/chunks/error-mm98alb8acdy93vq.js +15 -0
- package/dist/chunks/field-dxe9ne8fqy5whws2.js +70 -0
- package/dist/chunks/flow-fbsv3yek3w7v5a6p.js +10270 -0
- package/dist/chunks/formatNumber-hjijm58g645q6a0n.js +26 -0
- package/dist/chunks/getCssDimensions-mi941fe1jvztqm6b.js +21 -0
- package/dist/chunks/getEmptyRootContext-2utawetz04dqkzyn.js +18 -0
- package/dist/chunks/getPseudoElementBounds-jg72lmrlwgbqhmjh.js +28 -0
- package/dist/chunks/github-light-kb466scjoy42qxpu.js +5 -0
- package/dist/chunks/graphql-gtqr4wytdf0qjybo.js +16 -0
- package/dist/chunks/grid-d43q1qme6ffbbcl1.js +118 -0
- package/dist/chunks/hcl-ohpfnrffs96hzyj5.js +4 -0
- package/dist/chunks/html-ijyj3f9k0foag15c.js +12 -0
- package/dist/chunks/index.parts-9xtishx4m3j6sbg9.js +1429 -0
- package/dist/chunks/index.parts-bsarfaby0ttw67bb.js +206 -0
- package/dist/chunks/index.parts-buqjmx1pfsd225r7.js +30 -0
- package/dist/chunks/index.parts-bzlq2foymrigspiz.js +81 -0
- package/dist/chunks/index.parts-c4kz48uuogge3k9g.js +1462 -0
- package/dist/chunks/index.parts-cou5w8shwfwuk6wo.js +128 -0
- package/dist/chunks/index.parts-etb66t5m85rhhipe.js +11 -0
- package/dist/chunks/index.parts-f3xvfc67ai7txeru.js +127 -0
- package/dist/chunks/index.parts-g0wrrbkxyh0oo730.js +171 -0
- package/dist/chunks/index.parts-g27bw668q8dtcjz8.js +1229 -0
- package/dist/chunks/index.parts-gcwd6ds0od2n1i0p.js +10 -0
- package/dist/chunks/index.parts-ghwrm31fyo614381.js +23 -0
- package/dist/chunks/index.parts-giu46tgp0ypgfq6a.js +88 -0
- package/dist/chunks/index.parts-hi0bbzsnswj74v28.js +11 -0
- package/dist/chunks/index.parts-ixizrcasario34jo.js +213 -0
- package/dist/chunks/index.parts-j775zfdbhcd9ypeb.js +41 -0
- package/dist/chunks/index.parts-jmkwypigix07dit1.js +119 -0
- package/dist/chunks/index.parts-kdoulw17e9zk96yw.js +156 -0
- package/dist/chunks/index.parts-kh9waplhfwlszcyp.js +245 -0
- package/dist/chunks/index.parts-kwqb2nzc7u2zzxqs.js +2464 -0
- package/dist/chunks/index.parts-kwx43zlomuu96clc.js +46 -0
- package/dist/chunks/index.parts-lojnx790s6z0mi1f.js +388 -0
- package/dist/chunks/index.parts-n6t1aj932fytioz8.js +692 -0
- package/dist/chunks/index.parts-ngc39crwuz80oiij.js +13 -0
- package/dist/chunks/index.parts-nq06i1gji6fjnmln.js +192 -0
- package/dist/chunks/index.parts-omt7bu8mbte48ulb.js +73 -0
- package/dist/chunks/index.parts-pb65142mbin4hpc7.js +564 -0
- package/dist/chunks/index2.parts-k2au6nzued1wgy6t.js +95 -0
- package/dist/chunks/index2.parts-noiw2eweufmplfsp.js +10 -0
- package/dist/chunks/inertValue-f9pgp32jxnm88df3.js +9 -0
- package/dist/chunks/input-dwl9oy1f1ufah0bx.js +145 -0
- package/dist/chunks/input-group-otq3m9lach1jyxl0.js +452 -0
- package/dist/chunks/input-o3mtvvtqf69j5k10.js +85 -0
- package/dist/chunks/isElementDisabled-ffsy1y4adxocmexb.js +7 -0
- package/dist/chunks/javascript-b6fq9bl50fdj6813.js +4 -0
- package/dist/chunks/json-h2g0z143t3cs13d7.js +4 -0
- package/dist/chunks/jsonc-jxlzvingck161eej.js +4 -0
- package/dist/chunks/jsx-jp7a33937sef92sn.js +4 -0
- package/dist/chunks/label-opyibemromjwmd0s.js +72 -0
- package/dist/chunks/layer-card-nah241sxhj6i7i03.js +72 -0
- package/dist/chunks/link-1b3jda6cdzl4lkeo.js +112 -0
- package/dist/chunks/link-provider-l9ohtet4pj559eg0.js +60 -0
- package/dist/chunks/loader-j2v6fab8iucuxz1z.js +91 -0
- package/dist/chunks/markdown-eybeqjr58vfygtz1.js +4 -0
- package/dist/chunks/menubar-m0h31eymts6exeke.js +103 -0
- package/dist/chunks/mergeCleanups-pexn3wul6a4zn873.js +15 -0
- package/dist/chunks/meter-iauic8ww87xxqf74.js +35 -0
- package/dist/chunks/pagination-k0yll9ynbi8flc3b.js +290 -0
- package/dist/chunks/popover-l0xg7b854w7txyoz.js +152 -0
- package/dist/chunks/popupStateMapping-jpzw7eyzl8ghiv8s.js +868 -0
- package/dist/chunks/popupStoreUtils-fpjh6veok5pa2hd1.js +367 -0
- package/dist/chunks/portal-provider-langu3fqwfr9tlhm.js +59 -0
- package/dist/chunks/python-nrpnmxq4r6yp6fcd.js +4 -0
- package/dist/chunks/radio-igpo6t2t2tpe08d5.js +173 -0
- package/dist/chunks/resolve-variant-l6x5ksfrjtu4m66l.js +35 -0
- package/dist/chunks/resolveAriaLabelledBy-h9qwvo10ftlj6t9k.js +10 -0
- package/dist/chunks/resolveValueLabel-i36fqhi09ki67hx5.js +89 -0
- package/dist/chunks/rolldown-runtime-hi7ti5xiuxsegr96.js +18 -0
- package/dist/chunks/safePolygon-flrfpyc6fpidq4fb.js +659 -0
- package/dist/chunks/safeReact-bavzz23j5tex60z2.js +18 -0
- package/dist/chunks/select-ln6ibqbbs0n4tiig.js +262 -0
- package/dist/chunks/sensitive-input-karaei12un7z7nep.js +256 -0
- package/dist/chunks/serializeValue-ci3kihruew64i36f.js +13 -0
- package/dist/chunks/shellscript-i4m7lo8wi0f5bl8b.js +4 -0
- package/dist/chunks/sidebar-kvjzu0ya0b2z6eec.js +1297 -0
- package/dist/chunks/skeleton-line-f6sju1dxawm8h9tg.js +40 -0
- package/dist/chunks/sql-do9h6435gka97c4c.js +4 -0
- package/dist/chunks/store-i9l3lkcl6auhkpfl.js +88 -0
- package/dist/chunks/stringifyLocale-cl8et9xf6zon4qbs.js +9 -0
- package/dist/chunks/styles-dbhgpd8fm76fdfo3.js +35 -0
- package/dist/chunks/surface-jwwh5xl06kv9tp7b.js +30 -0
- package/dist/chunks/switch-cusffup6w3tan5ot.js +202 -0
- package/dist/chunks/table-ds3nzcffm3pu9o0l.js +238 -0
- package/dist/chunks/table-of-contents-l66abisn473qzd07.js +231 -0
- package/dist/chunks/tabs-dz3fsnkrznrggilz.js +255 -0
- package/dist/chunks/text-e1ko7r96hsoz2tor.js +109 -0
- package/dist/chunks/toast-itl6qo5oy1vy6d36.js +324 -0
- package/dist/chunks/toml-oyqrgosuct25x413.js +4 -0
- package/dist/chunks/toolbar-gwd1orc8yl7lzaou.js +127 -0
- package/dist/chunks/tooltip-maelyxs1y7a78vje.js +90 -0
- package/dist/chunks/tsx-pem8x69upvmibv6l.js +4 -0
- package/dist/chunks/typescript-pe5y016phdwbgws7.js +4 -0
- package/dist/chunks/useAnchoredPopupScrollLock-bx8vvwcdp25ix0kj.js +31 -0
- package/dist/chunks/useAnimationFrame-ssgc72hyq6sg3yit.js +86 -0
- package/dist/chunks/useAriaLabelledBy-bvw56m1d7czf0w3f.js +38 -0
- package/dist/chunks/useBaseUiId-gqkl5ep5pn6hd0rw.js +13 -0
- package/dist/chunks/useButton-cpo6u2idqcnou6vy.js +149 -0
- package/dist/chunks/useClick-fvwb39qgead2jyft.js +86 -0
- package/dist/chunks/useCollapsiblePanel-bw63vwvq9a3sj73q.js +379 -0
- package/dist/chunks/useCompositeItem-esr3n4pmlssiuxuy.js +31 -0
- package/dist/chunks/useCompositeListItem-0exfww37ospqz69b.js +75 -0
- package/dist/chunks/useControlled-nlx0kk1ksgk0auvi.js +52 -0
- package/dist/chunks/useDismiss-l2gbj4cain4zqtne.js +353 -0
- package/dist/chunks/useFilteredItems-ckor5h4rcmztfgt1.js +183 -0
- package/dist/chunks/useFloatingRootContext-jo582qzez5k9gbgk.js +51 -0
- package/dist/chunks/useFocus-e8drzpkl9flxq1o1.js +122 -0
- package/dist/chunks/useForcedRerendering-el1fbg3ib5yo0v7k.js +14 -0
- package/dist/chunks/useId-l9soitgw3e4jk5ie.js +32 -0
- package/dist/chunks/useIsHydrating-b6whcsimonagru6u.js +22 -0
- package/dist/chunks/useLabel-nh9hf8h7o6oquqn5.js +47 -0
- package/dist/chunks/useLabelableId-b1kwq9st3rjrtakn.js +60 -0
- package/dist/chunks/useListNavigation-iyo9r9vug2g1clmc.js +447 -0
- package/dist/chunks/useOnMount-j4wobeq47l3u9olo.js +12 -0
- package/dist/chunks/useOpenChangeComplete-dpkex2e23s1evpol.js +117 -0
- package/dist/chunks/usePopupViewport-at3zpph46apa78a3.js +343 -0
- package/dist/chunks/usePositioner-h1n5q86am1sjo5hn.js +602 -0
- package/dist/chunks/usePreviousValue-le0grv8f43vmunn1.js +21 -0
- package/dist/chunks/useRegisterFieldControl-m1rxsuvtpau2341n.js +34 -0
- package/dist/chunks/useRegisteredLabelId-dh83mybmzy75waje.js +16 -0
- package/dist/chunks/useRender-gtnbrp1ityffi4xf.js +13 -0
- package/dist/chunks/useRenderDialogRoot-ecyv072j7yj8q0w3.js +262 -0
- package/dist/chunks/useRenderElement-m8kc7jyuczp71mq8.js +433 -0
- package/dist/chunks/useScrollLock-lj0spjth12xjeap0.js +854 -0
- package/dist/chunks/useStableCallback-ninxmksdjvwl6ejj.js +38 -0
- package/dist/chunks/useSwipeDismiss-bpbyw2ihsw3fw6y9.js +818 -0
- package/dist/chunks/useTimeout-oqptmu2xmyv5ccic.js +43 -0
- package/dist/chunks/useTransitionStatus-ig4waxl2kervpyw4.js +66 -0
- package/dist/chunks/useTriggerFocusGuards-j8nano0pqu9dscrz.js +49 -0
- package/dist/chunks/useTypeahead-onenwjyhgw955ygx.js +114 -0
- package/dist/chunks/useValueAsRef-lrn42zari17368c9.js +27 -0
- package/dist/chunks/useValueChanged-kthmz4wk7ywnjwtx.js +18 -0
- package/dist/chunks/utils-0i7gujfv3f3e9dqh.js +19 -0
- package/dist/chunks/valueToPercent-henpkkj3juy3ukeu.js +7 -0
- package/dist/chunks/vendor-floating-ui-dsysdmve7iazaaes.js +1558 -0
- package/dist/chunks/vendor-styling-da1xibnxfkjmtglr.js +3631 -0
- package/dist/chunks/vendor-utils-luqsvbyuig727bnr.js +512 -0
- package/dist/chunks/vesper-ho3j3gt6ilwfuc1g.js +5 -0
- package/dist/chunks/visuallyHidden-n14xllazfozg55ox.js +24 -0
- package/dist/chunks/wasm-nfbosyhilcq70atf.js +8 -0
- package/dist/chunks/yaml-kzk5ddyekbyha04v.js +4 -0
- package/dist/cn-DCSItmT-.d.ts +5 -0
- package/dist/code/server.d.ts +97 -0
- package/dist/code/server.js +146 -84
- package/dist/code.d.ts +82 -0
- package/dist/code.js +348 -248
- package/dist/components/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete.js +2 -8
- package/dist/components/badge.d.ts +2 -0
- package/dist/components/badge.js +2 -6
- package/dist/components/banner.d.ts +2 -0
- package/dist/components/banner.js +2 -6
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +2 -8
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -8
- package/dist/components/chart.d.ts +2 -0
- package/dist/components/chart.js +2 -11
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -7
- package/dist/components/clipboard-text.d.ts +2 -0
- package/dist/components/clipboard-text.js +2 -5
- package/dist/components/cloudflare-logo.d.ts +2 -0
- package/dist/components/cloudflare-logo.js +2 -9
- package/dist/components/code.d.ts +2 -0
- package/dist/components/code.js +2 -6
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.js +2 -5
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +2 -5
- package/dist/components/command-palette.d.ts +2 -0
- package/dist/components/command-palette.js +2 -7
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -5
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +2 -5
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -10
- package/dist/components/dropdown.d.ts +2 -0
- package/dist/components/dropdown.js +2 -5
- package/dist/components/empty.d.ts +2 -0
- package/dist/components/empty.js +2 -8
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +2 -9
- package/dist/components/flow.d.ts +2 -0
- package/dist/components/flow.js +2 -5795
- package/dist/components/grid.d.ts +2 -0
- package/dist/components/grid.js +2 -10
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +2 -7
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.js +4 -13
- package/dist/components/label.d.ts +2 -0
- package/dist/components/label.js +2 -9
- package/dist/components/layer-card.d.ts +2 -0
- package/dist/components/layer-card.js +2 -5
- package/dist/components/link.d.ts +68 -0
- package/dist/components/link.js +2 -8
- package/dist/components/loader.d.ts +2 -0
- package/dist/components/loader.js +3 -7
- package/dist/components/menubar.d.ts +2 -0
- package/dist/components/menubar.js +2 -6
- package/dist/components/meter.d.ts +2 -0
- package/dist/components/meter.js +2 -5
- package/dist/components/pagination.d.ts +2 -0
- package/dist/components/pagination.js +2 -5
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +2 -13
- package/dist/components/radio.d.ts +2 -0
- package/dist/components/radio.js +2 -9
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +2 -5
- package/dist/components/sensitive-input.d.ts +2 -0
- package/dist/components/sensitive-input.js +2 -7
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -33
- package/dist/components/surface.d.ts +2 -0
- package/dist/components/surface.js +2 -5
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +2 -7
- package/dist/components/table-of-contents.d.ts +2 -0
- package/dist/components/table-of-contents.js +2 -7
- package/dist/components/table.d.ts +2 -0
- package/dist/components/table.js +2 -7
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +2 -5
- package/dist/components/text.d.ts +2 -0
- package/dist/components/text.js +2 -5
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +3 -10
- package/dist/components/toolbar.d.ts +2 -0
- package/dist/components/toolbar.js +2 -7
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -6
- package/dist/field-DIjlHM8W.d.ts +91 -0
- package/dist/index-AMEc1MEg2.d.ts +180 -0
- package/dist/index-B-hCpI5K.d.ts +1 -0
- package/dist/index-B6LJIy7_2.d.ts +52 -0
- package/dist/index-B9niVl3r.d.ts +140 -0
- package/dist/index-BAQwS4mL.d.ts +70 -0
- package/dist/index-BD-gTiEv.d.ts +71 -0
- package/dist/index-BVgXnR1V.d.ts +137 -0
- package/dist/index-Bgl_czT12.d.ts +140 -0
- package/dist/index-BkyMHk632.d.ts +110 -0
- package/dist/index-BlEUcijd.d.ts +795 -0
- package/dist/index-BoPqM1Ia2.d.ts +179 -0
- package/dist/index-BzE0aNpx.d.ts +143 -0
- package/dist/index-C3iraF8M2.d.ts +100 -0
- package/dist/index-CGbkysYW2.d.ts +161 -0
- package/dist/index-CLsBWiaS.d.ts +79 -0
- package/dist/index-CSWbPhke.d.ts +126 -0
- package/dist/index-CYoiniZ4.d.ts +135 -0
- package/dist/index-CeBzVJP8.d.ts +426 -0
- package/dist/index-ClS-eFxE.d.ts +104 -0
- package/dist/index-Cp0aQngm.d.ts +182 -0
- package/dist/index-CzIWigmH.d.ts +62 -0
- package/dist/index-CzTgKPh-.d.ts +105 -0
- package/dist/index-D-y1ktn-.d.ts +68 -0
- package/dist/index-D2Gvly0i2.d.ts +96 -0
- package/dist/index-DBlw3E9m.d.ts +166 -0
- package/dist/index-DCA5tjHa.d.ts +68 -0
- package/dist/index-DIV3riUd2.d.ts +148 -0
- package/dist/index-DJIRVD5B.d.ts +85 -0
- package/dist/index-DUCaDjfd.d.ts +240 -0
- package/dist/index-Di3sC6UF.d.ts +91 -0
- package/dist/index-DnbdiagK.d.ts +171 -0
- package/dist/index-DpzpArsi2.d.ts +614 -0
- package/dist/index-Dsn2VLZv.d.ts +238 -0
- package/dist/index-FZvrMcIo2.d.ts +158 -0
- package/dist/index-J1qdw9mL.d.ts +188 -0
- package/dist/index-Vj9ZzRh0.d.ts +66 -0
- package/dist/index-bAud6rG22.d.ts +278 -0
- package/dist/index-lOWfpkxK.d.ts +118 -0
- package/dist/index-yK3Hayg_.d.ts +40 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +195 -348
- package/dist/input-BeWEb-jD.d.ts +122 -0
- package/dist/input-group-DpGSsAZy.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/portal-provider-4AHCxYE6.d.ts +51 -0
- package/dist/primitives/accordion.d.ts +1 -0
- package/dist/primitives/accordion.js +2 -5
- package/dist/primitives/alert-dialog.d.ts +1 -0
- package/dist/primitives/alert-dialog.js +2 -5
- package/dist/primitives/autocomplete.d.ts +1 -0
- package/dist/primitives/autocomplete.js +2 -5
- package/dist/primitives/avatar.d.ts +1 -0
- package/dist/primitives/avatar.js +2 -5
- package/dist/primitives/button.d.ts +1 -0
- package/dist/primitives/button.js +2 -5
- package/dist/primitives/checkbox-group.d.ts +1 -0
- package/dist/primitives/checkbox-group.js +2 -5
- package/dist/primitives/checkbox.d.ts +1 -0
- package/dist/primitives/checkbox.js +2 -5
- package/dist/primitives/collapsible.d.ts +1 -0
- package/dist/primitives/collapsible.js +2 -5
- package/dist/primitives/combobox.d.ts +1 -0
- package/dist/primitives/combobox.js +2 -5
- package/dist/primitives/context-menu.d.ts +1 -0
- package/dist/primitives/context-menu.js +2 -5
- package/dist/primitives/csp-provider.d.ts +1 -0
- package/dist/primitives/csp-provider.js +2 -5
- package/dist/primitives/dialog.d.ts +1 -0
- package/dist/primitives/dialog.js +2 -5
- package/dist/primitives/direction-provider.d.ts +1 -0
- package/dist/primitives/direction-provider.js +3 -6
- package/dist/primitives/drawer.d.ts +1 -0
- package/dist/primitives/drawer.js +2 -5
- package/dist/primitives/field.d.ts +1 -0
- package/dist/primitives/field.js +2 -5
- package/dist/primitives/fieldset.d.ts +1 -0
- package/dist/primitives/fieldset.js +2 -5
- package/dist/primitives/form.d.ts +1 -0
- package/dist/primitives/form.js +2 -5
- package/dist/primitives/input.d.ts +1 -0
- package/dist/primitives/input.js +2 -5
- package/dist/primitives/menu.d.ts +1 -0
- package/dist/primitives/menu.js +2 -5
- package/dist/primitives/menubar.d.ts +1 -0
- package/dist/primitives/menubar.js +2 -5
- package/dist/primitives/meter.d.ts +1 -0
- package/dist/primitives/meter.js +2 -5
- package/dist/primitives/navigation-menu.d.ts +1 -0
- package/dist/primitives/navigation-menu.js +2 -5
- package/dist/primitives/number-field.d.ts +1 -0
- package/dist/primitives/number-field.js +2 -5
- package/dist/primitives/otp-field.d.ts +3 -0
- package/dist/primitives/otp-field.js +2 -6
- package/dist/primitives/popover.d.ts +1 -0
- package/dist/primitives/popover.js +2 -5
- package/dist/primitives/preview-card.d.ts +1 -0
- package/dist/primitives/preview-card.js +2 -5
- package/dist/primitives/progress.d.ts +1 -0
- package/dist/primitives/progress.js +2 -5
- package/dist/primitives/radio-group.d.ts +1 -0
- package/dist/primitives/radio-group.js +2 -5
- package/dist/primitives/radio.d.ts +1 -0
- package/dist/primitives/radio.js +2 -5
- package/dist/primitives/scroll-area.d.ts +1 -0
- package/dist/primitives/scroll-area.js +2 -5
- package/dist/primitives/select.d.ts +1 -0
- package/dist/primitives/select.js +2 -5
- package/dist/primitives/separator.d.ts +1 -0
- package/dist/primitives/separator.js +2 -5
- package/dist/primitives/slider.d.ts +1 -0
- package/dist/primitives/slider.js +2 -5
- package/dist/primitives/switch.d.ts +1 -0
- package/dist/primitives/switch.js +2 -5
- package/dist/primitives/tabs.d.ts +1 -0
- package/dist/primitives/tabs.js +2 -5
- package/dist/primitives/toast.d.ts +1 -0
- package/dist/primitives/toast.js +2 -5
- package/dist/primitives/toggle-group.d.ts +1 -0
- package/dist/primitives/toggle-group.js +2 -5
- package/dist/primitives/toggle.d.ts +1 -0
- package/dist/primitives/toggle.js +2 -5
- package/dist/primitives/toolbar.d.ts +1 -0
- package/dist/primitives/toolbar.js +2 -5
- package/dist/primitives/tooltip.d.ts +1 -0
- package/dist/primitives/tooltip.js +2 -5
- package/dist/primitives.d.ts +42 -0
- package/dist/primitives.js +42 -46
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +0 -1
- package/dist/scripts/theme-generator/config.d.ts +7 -5
- package/dist/scripts/theme-generator/config.js +475 -627
- package/dist/scripts/theme-generator/types.d.ts +51 -49
- package/dist/scripts/theme-generator/types.js +0 -1
- package/dist/styles/kumo-binding.css +35 -8
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +3 -5
- package/dist/styles/theme-fedramp.css +7 -15
- package/dist/styles/theme-kumo.css +101 -56
- package/dist/tooltip-BuCo6Ki4.d.ts +105 -0
- package/dist/types-C402rKiz.d.ts +132 -0
- package/dist/types-CdzJnnIl.d.ts +193 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +5 -12
- package/package.json +231 -232
- package/scripts/component-registry/index.test.ts +1 -1
- package/scripts/component-registry/metadata.ts +3 -4
- package/scripts/component-registry/props-filter.ts +3 -1
- package/scripts/component-registry/variant-parser.ts +1 -0
- package/scripts/theme-generator/config.ts +21 -22
- package/scripts/theme-generator/generate-css.test.ts +1 -1
- package/dist/ai/schemas.d.ts.map +0 -1
- package/dist/ai/schemas.js.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js +0 -2448
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js.map +0 -1
- package/dist/chunks/autocomplete-a4gvspveibfuod24.js +0 -193
- package/dist/chunks/autocomplete-a4gvspveibfuod24.js.map +0 -1
- package/dist/chunks/badge-dfc1r37osagi3rs4.js +0 -163
- package/dist/chunks/badge-dfc1r37osagi3rs4.js.map +0 -1
- package/dist/chunks/banner-j52y8l13puk7dybi.js +0 -120
- package/dist/chunks/banner-j52y8l13puk7dybi.js.map +0 -1
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js +0 -15
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js.map +0 -1
- package/dist/chunks/breadcrumbs-js59m7m57bdsveew.js +0 -169
- package/dist/chunks/breadcrumbs-js59m7m57bdsveew.js.map +0 -1
- package/dist/chunks/button-ebfdg9mkhojue36n.js +0 -237
- package/dist/chunks/button-ebfdg9mkhojue36n.js.map +0 -1
- package/dist/chunks/checkbox-k355pnfisqt0h4eg.js +0 -216
- package/dist/chunks/checkbox-k355pnfisqt0h4eg.js.map +0 -1
- package/dist/chunks/clipboard-text-isb05zkg2aox0tp6.js +0 -191
- package/dist/chunks/clipboard-text-isb05zkg2aox0tp6.js.map +0 -1
- package/dist/chunks/cloudflare-logo-fiuocxdxqrxawjfv.js +0 -175
- package/dist/chunks/cloudflare-logo-fiuocxdxqrxawjfv.js.map +0 -1
- package/dist/chunks/cn-bo7ya7641lkickbt.js +0 -22
- package/dist/chunks/cn-bo7ya7641lkickbt.js.map +0 -1
- package/dist/chunks/code-pbkfdfat0yilg6dx.js +0 -61
- package/dist/chunks/code-pbkfdfat0yilg6dx.js.map +0 -1
- package/dist/chunks/collapsible-f9hgtc1u6xvqrgt8.js +0 -76
- package/dist/chunks/collapsible-f9hgtc1u6xvqrgt8.js.map +0 -1
- package/dist/chunks/combobox-hc9wi9nwsyyli8ur.js +0 -408
- package/dist/chunks/combobox-hc9wi9nwsyyli8ur.js.map +0 -1
- package/dist/chunks/command-palette-c03zze4ayuytwxjg.js +0 -403
- package/dist/chunks/command-palette-c03zze4ayuytwxjg.js.map +0 -1
- package/dist/chunks/core-dyku7qctyc40nnhh.js +0 -5464
- package/dist/chunks/core-dyku7qctyc40nnhh.js.map +0 -1
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js +0 -8
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js.map +0 -1
- package/dist/chunks/date-picker-bffp889exjixmgz3.js +0 -2921
- package/dist/chunks/date-picker-bffp889exjixmgz3.js.map +0 -1
- package/dist/chunks/date-range-picker-oks2r14lbbukd545.js +0 -408
- package/dist/chunks/date-range-picker-oks2r14lbbukd545.js.map +0 -1
- package/dist/chunks/dialog-ovhmzfuppr5xix0e.js +0 -134
- package/dist/chunks/dialog-ovhmzfuppr5xix0e.js.map +0 -1
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js +0 -8
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js.map +0 -1
- package/dist/chunks/dropdown-iey8f344rd5dgahz.js +0 -321
- package/dist/chunks/dropdown-iey8f344rd5dgahz.js.map +0 -1
- package/dist/chunks/empty-k83r53jh5utqvv7w.js +0 -94
- package/dist/chunks/empty-k83r53jh5utqvv7w.js.map +0 -1
- package/dist/chunks/engine-javascript-hi1kqifa6nkcridk.js +0 -2638
- package/dist/chunks/engine-javascript-hi1kqifa6nkcridk.js.map +0 -1
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js +0 -295
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js.map +0 -1
- package/dist/chunks/field-bmglk138wa8bf3ei.js +0 -77
- package/dist/chunks/field-bmglk138wa8bf3ei.js.map +0 -1
- package/dist/chunks/github-light-ulev8flhimfg79ob.js +0 -6
- package/dist/chunks/github-light-ulev8flhimfg79ob.js.map +0 -1
- package/dist/chunks/graphql-ft2h47erta7isqn4.js +0 -16
- package/dist/chunks/graphql-ft2h47erta7isqn4.js.map +0 -1
- package/dist/chunks/grid-jze04557ljywg3uc.js +0 -128
- package/dist/chunks/grid-jze04557ljywg3uc.js.map +0 -1
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js +0 -8
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js.map +0 -1
- package/dist/chunks/html-kl304jmqj4jxj777.js +0 -12
- package/dist/chunks/html-kl304jmqj4jxj777.js.map +0 -1
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js +0 -144
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js.map +0 -1
- package/dist/chunks/input-ckl5misj0jd9cu5r.js +0 -130
- package/dist/chunks/input-ckl5misj0jd9cu5r.js.map +0 -1
- package/dist/chunks/input-group-bflx1m6ki55e99vf.js +0 -505
- package/dist/chunks/input-group-bflx1m6ki55e99vf.js.map +0 -1
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js +0 -8
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js.map +0 -1
- package/dist/chunks/json-jovp9qemdkp5cziz.js +0 -8
- package/dist/chunks/json-jovp9qemdkp5cziz.js.map +0 -1
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js +0 -8
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js.map +0 -1
- package/dist/chunks/jsx-ij885l2li2lzfoss.js +0 -8
- package/dist/chunks/jsx-ij885l2li2lzfoss.js.map +0 -1
- package/dist/chunks/label-i1xbmg8y1n0tbtkx.js +0 -68
- package/dist/chunks/label-i1xbmg8y1n0tbtkx.js.map +0 -1
- package/dist/chunks/layer-card-m6h85dpadvee39h2.js +0 -47
- package/dist/chunks/layer-card-m6h85dpadvee39h2.js.map +0 -1
- package/dist/chunks/link-j93fl5m8zrcfivsr.js +0 -95
- package/dist/chunks/link-j93fl5m8zrcfivsr.js.map +0 -1
- package/dist/chunks/link-provider-mn2voeohon7cj9o4.js +0 -22
- package/dist/chunks/link-provider-mn2voeohon7cj9o4.js.map +0 -1
- package/dist/chunks/loader-g8a6j76ue5nq0lr8.js +0 -109
- package/dist/chunks/loader-g8a6j76ue5nq0lr8.js.map +0 -1
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js +0 -8
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js.map +0 -1
- package/dist/chunks/menubar-opzxfzylaatfz4nv.js +0 -98
- package/dist/chunks/menubar-opzxfzylaatfz4nv.js.map +0 -1
- package/dist/chunks/meter-6br6z5ekw41trxeh.js +0 -51
- package/dist/chunks/meter-6br6z5ekw41trxeh.js.map +0 -1
- package/dist/chunks/pagination-j33ntwqmm9qskfgv.js +0 -266
- package/dist/chunks/pagination-j33ntwqmm9qskfgv.js.map +0 -1
- package/dist/chunks/popover-cqdmpp8i4hg8gzzx.js +0 -181
- package/dist/chunks/popover-cqdmpp8i4hg8gzzx.js.map +0 -1
- package/dist/chunks/portal-provider-hwmkdmkpvct0cb76.js +0 -18
- package/dist/chunks/portal-provider-hwmkdmkpvct0cb76.js.map +0 -1
- package/dist/chunks/python-gg755pb8oe9ra1d1.js +0 -8
- package/dist/chunks/python-gg755pb8oe9ra1d1.js.map +0 -1
- package/dist/chunks/radio-ejey7i6r4tq314av.js +0 -226
- package/dist/chunks/radio-ejey7i6r4tq314av.js.map +0 -1
- package/dist/chunks/resolve-variant-gw6eh7fa4st8ej7m.js +0 -11
- package/dist/chunks/resolve-variant-gw6eh7fa4st8ej7m.js.map +0 -1
- package/dist/chunks/select-p8adn2tnpom25hpl.js +0 -237
- package/dist/chunks/select-p8adn2tnpom25hpl.js.map +0 -1
- package/dist/chunks/sensitive-input-it1hsswlccq3u7g6.js +0 -273
- package/dist/chunks/sensitive-input-it1hsswlccq3u7g6.js.map +0 -1
- package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js +0 -1144
- package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js.map +0 -1
- package/dist/chunks/skeleton-line-omxgxia23vpav94x.js +0 -33
- package/dist/chunks/skeleton-line-omxgxia23vpav94x.js.map +0 -1
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js +0 -8
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js.map +0 -1
- package/dist/chunks/surface-gc2gblserrxcb1eg.js +0 -29
- package/dist/chunks/surface-gc2gblserrxcb1eg.js.map +0 -1
- package/dist/chunks/switch-ljsq915e0l1a5mjd.js +0 -256
- package/dist/chunks/switch-ljsq915e0l1a5mjd.js.map +0 -1
- package/dist/chunks/table-of-contents-cghjqyk43nj5zmlw.js +0 -106
- package/dist/chunks/table-of-contents-cghjqyk43nj5zmlw.js.map +0 -1
- package/dist/chunks/table-ojjjeqszmt9jgnug.js +0 -208
- package/dist/chunks/table-ojjjeqszmt9jgnug.js.map +0 -1
- package/dist/chunks/tabs-kemdy19kfesj2xjr.js +0 -177
- package/dist/chunks/tabs-kemdy19kfesj2xjr.js.map +0 -1
- package/dist/chunks/text-oqp48b9m5u6t62b4.js +0 -103
- package/dist/chunks/text-oqp48b9m5u6t62b4.js.map +0 -1
- package/dist/chunks/toast-ldj9zi940w83ub90.js +0 -386
- package/dist/chunks/toast-ldj9zi940w83ub90.js.map +0 -1
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js +0 -8
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js.map +0 -1
- package/dist/chunks/toolbar-lmylyrod70sn0q4i.js +0 -172
- package/dist/chunks/toolbar-lmylyrod70sn0q4i.js.map +0 -1
- package/dist/chunks/tooltip-mooldq78tg77ekvv.js +0 -103
- package/dist/chunks/tooltip-mooldq78tg77ekvv.js.map +0 -1
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js +0 -8
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js.map +0 -1
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js +0 -8
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js.map +0 -1
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js +0 -25027
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js.map +0 -1
- package/dist/chunks/vendor-floating-ui-k1zjlb8fkwtcw4k5.js +0 -1310
- package/dist/chunks/vendor-floating-ui-k1zjlb8fkwtcw4k5.js.map +0 -1
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js +0 -3252
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js.map +0 -1
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js +0 -217
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js.map +0 -1
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js +0 -6
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js.map +0 -1
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js +0 -9
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js.map +0 -1
- package/dist/chunks/yaml-e2v22lr79tss2brj.js +0 -8
- package/dist/chunks/yaml-e2v22lr79tss2brj.js.map +0 -1
- package/dist/code/server.js.map +0 -1
- package/dist/code.js.map +0 -1
- package/dist/components/autocomplete.js.map +0 -1
- package/dist/components/badge.js.map +0 -1
- package/dist/components/banner.js.map +0 -1
- package/dist/components/breadcrumbs.js.map +0 -1
- package/dist/components/button.js.map +0 -1
- package/dist/components/chart.js.map +0 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/clipboard-text.js.map +0 -1
- package/dist/components/cloudflare-logo.js.map +0 -1
- package/dist/components/code.js.map +0 -1
- package/dist/components/collapsible.js.map +0 -1
- package/dist/components/combobox.js.map +0 -1
- package/dist/components/command-palette.js.map +0 -1
- package/dist/components/date-picker.js.map +0 -1
- package/dist/components/date-range-picker.js.map +0 -1
- package/dist/components/dialog.js.map +0 -1
- package/dist/components/dropdown.js.map +0 -1
- package/dist/components/empty.js.map +0 -1
- package/dist/components/field.js.map +0 -1
- package/dist/components/flow.js.map +0 -1
- package/dist/components/grid.js.map +0 -1
- package/dist/components/input-group.js.map +0 -1
- package/dist/components/input.js.map +0 -1
- package/dist/components/label.js.map +0 -1
- package/dist/components/layer-card.js.map +0 -1
- package/dist/components/link.js.map +0 -1
- package/dist/components/loader.js.map +0 -1
- package/dist/components/menubar.js.map +0 -1
- package/dist/components/meter.js.map +0 -1
- package/dist/components/pagination.js.map +0 -1
- package/dist/components/popover.js.map +0 -1
- package/dist/components/radio.js.map +0 -1
- package/dist/components/select.js.map +0 -1
- package/dist/components/sensitive-input.js.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/surface.js.map +0 -1
- package/dist/components/switch.js.map +0 -1
- package/dist/components/table-of-contents.js.map +0 -1
- package/dist/components/table.js.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/text.js.map +0 -1
- package/dist/components/toast.js.map +0 -1
- package/dist/components/toolbar.js.map +0 -1
- package/dist/components/tooltip.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/primitives/accordion.js.map +0 -1
- package/dist/primitives/alert-dialog.js.map +0 -1
- package/dist/primitives/autocomplete.js.map +0 -1
- package/dist/primitives/avatar.js.map +0 -1
- package/dist/primitives/button.js.map +0 -1
- package/dist/primitives/checkbox-group.js.map +0 -1
- package/dist/primitives/checkbox.js.map +0 -1
- package/dist/primitives/collapsible.js.map +0 -1
- package/dist/primitives/combobox.js.map +0 -1
- package/dist/primitives/context-menu.js.map +0 -1
- package/dist/primitives/csp-provider.js.map +0 -1
- package/dist/primitives/dialog.js.map +0 -1
- package/dist/primitives/direction-provider.js.map +0 -1
- package/dist/primitives/drawer.js.map +0 -1
- package/dist/primitives/field.js.map +0 -1
- package/dist/primitives/fieldset.js.map +0 -1
- package/dist/primitives/form.js.map +0 -1
- package/dist/primitives/input.js.map +0 -1
- package/dist/primitives/menu.js.map +0 -1
- package/dist/primitives/menubar.js.map +0 -1
- package/dist/primitives/meter.js.map +0 -1
- package/dist/primitives/navigation-menu.js.map +0 -1
- package/dist/primitives/number-field.js.map +0 -1
- package/dist/primitives/otp-field.js.map +0 -1
- package/dist/primitives/popover.js.map +0 -1
- package/dist/primitives/preview-card.js.map +0 -1
- package/dist/primitives/progress.js.map +0 -1
- package/dist/primitives/radio-group.js.map +0 -1
- package/dist/primitives/radio.js.map +0 -1
- package/dist/primitives/scroll-area.js.map +0 -1
- package/dist/primitives/select.js.map +0 -1
- package/dist/primitives/separator.js.map +0 -1
- package/dist/primitives/slider.js.map +0 -1
- package/dist/primitives/switch.js.map +0 -1
- package/dist/primitives/tabs.js.map +0 -1
- package/dist/primitives/toast.js.map +0 -1
- package/dist/primitives/toggle-group.js.map +0 -1
- package/dist/primitives/toggle.js.map +0 -1
- package/dist/primitives/toolbar.js.map +0 -1
- package/dist/primitives/tooltip.js.map +0 -1
- package/dist/primitives.js.map +0 -1
- package/dist/registry.js.map +0 -1
- package/dist/scripts/theme-generator/config.d.ts.map +0 -1
- package/dist/scripts/theme-generator/config.js.map +0 -1
- package/dist/scripts/theme-generator/generate-css.d.ts +0 -31
- package/dist/scripts/theme-generator/generate-css.d.ts.map +0 -1
- package/dist/scripts/theme-generator/index.d.ts +0 -13
- package/dist/scripts/theme-generator/index.d.ts.map +0 -1
- package/dist/scripts/theme-generator/migrate.d.ts +0 -56
- package/dist/scripts/theme-generator/migrate.d.ts.map +0 -1
- package/dist/scripts/theme-generator/types.d.ts.map +0 -1
- package/dist/scripts/theme-generator/types.js.map +0 -1
- package/dist/src/blocks/delete-resource/delete-resource.d.ts +0 -46
- package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +0 -1
- package/dist/src/blocks/delete-resource/index.d.ts +0 -2
- package/dist/src/blocks/delete-resource/index.d.ts.map +0 -1
- package/dist/src/blocks/page-header/index.d.ts +0 -2
- package/dist/src/blocks/page-header/index.d.ts.map +0 -1
- package/dist/src/blocks/page-header/page-header.d.ts +0 -38
- package/dist/src/blocks/page-header/page-header.d.ts.map +0 -1
- package/dist/src/blocks/resource-list/index.d.ts +0 -2
- package/dist/src/blocks/resource-list/index.d.ts.map +0 -1
- package/dist/src/blocks/resource-list/resource-list.d.ts +0 -18
- package/dist/src/blocks/resource-list/resource-list.d.ts.map +0 -1
- package/dist/src/catalog/catalog.d.ts +0 -75
- package/dist/src/catalog/catalog.d.ts.map +0 -1
- package/dist/src/catalog/data.d.ts +0 -44
- package/dist/src/catalog/data.d.ts.map +0 -1
- package/dist/src/catalog/index.d.ts +0 -39
- package/dist/src/catalog/index.d.ts.map +0 -1
- package/dist/src/catalog/types.d.ts +0 -226
- package/dist/src/catalog/types.d.ts.map +0 -1
- package/dist/src/catalog/visibility.d.ts +0 -37
- package/dist/src/catalog/visibility.d.ts.map +0 -1
- package/dist/src/code/code-highlighted.d.ts +0 -32
- package/dist/src/code/code-highlighted.d.ts.map +0 -1
- package/dist/src/code/context.d.ts +0 -16
- package/dist/src/code/context.d.ts.map +0 -1
- package/dist/src/code/index.d.ts +0 -32
- package/dist/src/code/index.d.ts.map +0 -1
- package/dist/src/code/provider.d.ts +0 -13
- package/dist/src/code/provider.d.ts.map +0 -1
- package/dist/src/code/server.d.ts +0 -95
- package/dist/src/code/server.d.ts.map +0 -1
- package/dist/src/code/types.d.ts +0 -130
- package/dist/src/code/types.d.ts.map +0 -1
- package/dist/src/code/use-shiki-highlighter.d.ts +0 -36
- package/dist/src/code/use-shiki-highlighter.d.ts.map +0 -1
- package/dist/src/command-line/build-cli.d.ts +0 -7
- package/dist/src/command-line/build-cli.d.ts.map +0 -1
- package/dist/src/command-line/cli.d.ts +0 -13
- package/dist/src/command-line/cli.d.ts.map +0 -1
- package/dist/src/command-line/commands/add.d.ts +0 -10
- package/dist/src/command-line/commands/add.d.ts.map +0 -1
- package/dist/src/command-line/commands/ai.d.ts +0 -10
- package/dist/src/command-line/commands/ai.d.ts.map +0 -1
- package/dist/src/command-line/commands/blocks.d.ts +0 -10
- package/dist/src/command-line/commands/blocks.d.ts.map +0 -1
- package/dist/src/command-line/commands/doc.d.ts +0 -14
- package/dist/src/command-line/commands/doc.d.ts.map +0 -1
- package/dist/src/command-line/commands/init.d.ts +0 -18
- package/dist/src/command-line/commands/init.d.ts.map +0 -1
- package/dist/src/command-line/commands/ls.d.ts +0 -10
- package/dist/src/command-line/commands/ls.d.ts.map +0 -1
- package/dist/src/command-line/commands/migrate.d.ts +0 -10
- package/dist/src/command-line/commands/migrate.d.ts.map +0 -1
- package/dist/src/command-line/utils/config.d.ts +0 -42
- package/dist/src/command-line/utils/config.d.ts.map +0 -1
- package/dist/src/command-line/utils/transformer.d.ts +0 -21
- package/dist/src/command-line/utils/transformer.d.ts.map +0 -1
- package/dist/src/components/autocomplete/autocomplete.d.ts +0 -181
- package/dist/src/components/autocomplete/autocomplete.d.ts.map +0 -1
- package/dist/src/components/autocomplete/index.d.ts +0 -3
- package/dist/src/components/autocomplete/index.d.ts.map +0 -1
- package/dist/src/components/badge/badge.d.ts +0 -180
- package/dist/src/components/badge/badge.d.ts.map +0 -1
- package/dist/src/components/badge/index.d.ts +0 -2
- package/dist/src/components/badge/index.d.ts.map +0 -1
- package/dist/src/components/banner/banner.d.ts +0 -106
- package/dist/src/components/banner/banner.d.ts.map +0 -1
- package/dist/src/components/banner/index.d.ts +0 -2
- package/dist/src/components/banner/index.d.ts.map +0 -1
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +0 -78
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +0 -1
- package/dist/src/components/breadcrumbs/index.d.ts +0 -2
- package/dist/src/components/breadcrumbs/index.d.ts.map +0 -1
- package/dist/src/components/button/button.d.ts +0 -214
- package/dist/src/components/button/button.d.ts.map +0 -1
- package/dist/src/components/button/index.d.ts +0 -2
- package/dist/src/components/button/index.d.ts.map +0 -1
- package/dist/src/components/chart/Color.d.ts +0 -107
- package/dist/src/components/chart/Color.d.ts.map +0 -1
- package/dist/src/components/chart/EChart.d.ts +0 -166
- package/dist/src/components/chart/EChart.d.ts.map +0 -1
- package/dist/src/components/chart/Legend.d.ts +0 -51
- package/dist/src/components/chart/Legend.d.ts.map +0 -1
- package/dist/src/components/chart/Maps.d.ts +0 -211
- package/dist/src/components/chart/Maps.d.ts.map +0 -1
- package/dist/src/components/chart/SankeyChart.d.ts +0 -98
- package/dist/src/components/chart/SankeyChart.d.ts.map +0 -1
- package/dist/src/components/chart/TimeseriesChart.d.ts +0 -189
- package/dist/src/components/chart/TimeseriesChart.d.ts.map +0 -1
- package/dist/src/components/chart/index.d.ts +0 -7
- package/dist/src/components/chart/index.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-markers.d.ts +0 -107
- package/dist/src/components/chart/timeseries-markers.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-thresholds.d.ts +0 -61
- package/dist/src/components/chart/timeseries-thresholds.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-tooltip.d.ts +0 -28
- package/dist/src/components/chart/timeseries-tooltip.d.ts.map +0 -1
- package/dist/src/components/chart/tooltip-utils.d.ts +0 -4
- package/dist/src/components/chart/tooltip-utils.d.ts.map +0 -1
- package/dist/src/components/checkbox/checkbox.d.ts +0 -197
- package/dist/src/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/src/components/checkbox/index.d.ts +0 -2
- package/dist/src/components/checkbox/index.d.ts.map +0 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +0 -88
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +0 -1
- package/dist/src/components/clipboard-text/index.d.ts +0 -2
- package/dist/src/components/clipboard-text/index.d.ts.map +0 -1
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts +0 -133
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +0 -1
- package/dist/src/components/cloudflare-logo/index.d.ts +0 -2
- package/dist/src/components/cloudflare-logo/index.d.ts.map +0 -1
- package/dist/src/components/code/code.d.ts +0 -189
- package/dist/src/components/code/code.d.ts.map +0 -1
- package/dist/src/components/code/index.d.ts +0 -4
- package/dist/src/components/code/index.d.ts.map +0 -1
- package/dist/src/components/collapsible/collapsible.d.ts +0 -109
- package/dist/src/components/collapsible/collapsible.d.ts.map +0 -1
- package/dist/src/components/collapsible/index.d.ts +0 -2
- package/dist/src/components/collapsible/index.d.ts.map +0 -1
- package/dist/src/components/combobox/combobox.d.ts +0 -246
- package/dist/src/components/combobox/combobox.d.ts.map +0 -1
- package/dist/src/components/combobox/index.d.ts +0 -3
- package/dist/src/components/combobox/index.d.ts.map +0 -1
- package/dist/src/components/command-palette/command-palette.d.ts +0 -258
- package/dist/src/components/command-palette/command-palette.d.ts.map +0 -1
- package/dist/src/components/command-palette/index.d.ts +0 -3
- package/dist/src/components/command-palette/index.d.ts.map +0 -1
- package/dist/src/components/command-palette/types.d.ts +0 -168
- package/dist/src/components/command-palette/types.d.ts.map +0 -1
- package/dist/src/components/date-picker/date-picker.d.ts +0 -65
- package/dist/src/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/src/components/date-picker/index.d.ts +0 -4
- package/dist/src/components/date-picker/index.d.ts.map +0 -1
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +0 -125
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +0 -1
- package/dist/src/components/date-range-picker/index.d.ts +0 -5
- package/dist/src/components/date-range-picker/index.d.ts.map +0 -1
- package/dist/src/components/dialog/dialog.d.ts +0 -242
- package/dist/src/components/dialog/dialog.d.ts.map +0 -1
- package/dist/src/components/dialog/index.d.ts +0 -2
- package/dist/src/components/dialog/index.d.ts.map +0 -1
- package/dist/src/components/dropdown/dropdown.d.ts +0 -116
- package/dist/src/components/dropdown/dropdown.d.ts.map +0 -1
- package/dist/src/components/dropdown/index.d.ts +0 -2
- package/dist/src/components/dropdown/index.d.ts.map +0 -1
- package/dist/src/components/empty/empty.d.ts +0 -69
- package/dist/src/components/empty/empty.d.ts.map +0 -1
- package/dist/src/components/empty/index.d.ts +0 -2
- package/dist/src/components/empty/index.d.ts.map +0 -1
- package/dist/src/components/field/field.d.ts +0 -89
- package/dist/src/components/field/field.d.ts.map +0 -1
- package/dist/src/components/field/index.d.ts +0 -2
- package/dist/src/components/field/index.d.ts.map +0 -1
- package/dist/src/components/flow/connectors.d.ts +0 -59
- package/dist/src/components/flow/connectors.d.ts.map +0 -1
- package/dist/src/components/flow/diagram.d.ts +0 -105
- package/dist/src/components/flow/diagram.d.ts.map +0 -1
- package/dist/src/components/flow/flow-layout.d.ts +0 -77
- package/dist/src/components/flow/flow-layout.d.ts.map +0 -1
- package/dist/src/components/flow/index.d.ts +0 -26
- package/dist/src/components/flow/index.d.ts.map +0 -1
- package/dist/src/components/flow/node.d.ts +0 -61
- package/dist/src/components/flow/node.d.ts.map +0 -1
- package/dist/src/components/flow/parallel.d.ts +0 -9
- package/dist/src/components/flow/parallel.d.ts.map +0 -1
- package/dist/src/components/flow/use-children.d.ts +0 -27
- package/dist/src/components/flow/use-children.d.ts.map +0 -1
- package/dist/src/components/grid/grid.d.ts +0 -135
- package/dist/src/components/grid/grid.d.ts.map +0 -1
- package/dist/src/components/grid/index.d.ts +0 -2
- package/dist/src/components/grid/index.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts +0 -19
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/input/input-area.d.ts +0 -83
- package/dist/src/components/input/input-area.d.ts.map +0 -1
- package/dist/src/components/input/input.d.ts +0 -175
- package/dist/src/components/input/input.d.ts.map +0 -1
- package/dist/src/components/input-group/context.d.ts +0 -96
- package/dist/src/components/input-group/context.d.ts.map +0 -1
- package/dist/src/components/input-group/index.d.ts +0 -2
- package/dist/src/components/input-group/index.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-addon.d.ts +0 -15
- package/dist/src/components/input-group/input-group-addon.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-button.d.ts +0 -36
- package/dist/src/components/input-group/input-group-button.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-input.d.ts +0 -9
- package/dist/src/components/input-group/input-group-input.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-suffix.d.ts +0 -13
- package/dist/src/components/input-group/input-group-suffix.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group.d.ts +0 -43
- package/dist/src/components/input-group/input-group.d.ts.map +0 -1
- package/dist/src/components/label/index.d.ts +0 -2
- package/dist/src/components/label/index.d.ts.map +0 -1
- package/dist/src/components/label/label.d.ts +0 -67
- package/dist/src/components/label/label.d.ts.map +0 -1
- package/dist/src/components/layer-card/index.d.ts +0 -2
- package/dist/src/components/layer-card/index.d.ts.map +0 -1
- package/dist/src/components/layer-card/layer-card.d.ts +0 -60
- package/dist/src/components/layer-card/layer-card.d.ts.map +0 -1
- package/dist/src/components/link/index.d.ts +0 -2
- package/dist/src/components/link/index.d.ts.map +0 -1
- package/dist/src/components/link/link.d.ts +0 -66
- package/dist/src/components/link/link.d.ts.map +0 -1
- package/dist/src/components/loader/index.d.ts +0 -3
- package/dist/src/components/loader/index.d.ts.map +0 -1
- package/dist/src/components/loader/loader.d.ts +0 -70
- package/dist/src/components/loader/loader.d.ts.map +0 -1
- package/dist/src/components/loader/skeleton-line.d.ts +0 -11
- package/dist/src/components/loader/skeleton-line.d.ts.map +0 -1
- package/dist/src/components/menubar/index.d.ts +0 -3
- package/dist/src/components/menubar/index.d.ts.map +0 -1
- package/dist/src/components/menubar/menubar.d.ts +0 -66
- package/dist/src/components/menubar/menubar.d.ts.map +0 -1
- package/dist/src/components/menubar/use-menu-navigation.d.ts +0 -8
- package/dist/src/components/menubar/use-menu-navigation.d.ts.map +0 -1
- package/dist/src/components/meter/index.d.ts +0 -2
- package/dist/src/components/meter/index.d.ts.map +0 -1
- package/dist/src/components/meter/meter.d.ts +0 -44
- package/dist/src/components/meter/meter.d.ts.map +0 -1
- package/dist/src/components/pagination/index.d.ts +0 -2
- package/dist/src/components/pagination/index.d.ts.map +0 -1
- package/dist/src/components/pagination/pagination.d.ts +0 -241
- package/dist/src/components/pagination/pagination.d.ts.map +0 -1
- package/dist/src/components/popover/index.d.ts +0 -3
- package/dist/src/components/popover/index.d.ts.map +0 -1
- package/dist/src/components/popover/popover.d.ts +0 -178
- package/dist/src/components/popover/popover.d.ts.map +0 -1
- package/dist/src/components/radio/index.d.ts +0 -2
- package/dist/src/components/radio/index.d.ts.map +0 -1
- package/dist/src/components/radio/radio.d.ts +0 -277
- package/dist/src/components/radio/radio.d.ts.map +0 -1
- package/dist/src/components/radio/radio.type-spec.d.ts +0 -12
- package/dist/src/components/radio/radio.type-spec.d.ts.map +0 -1
- package/dist/src/components/select/index.d.ts +0 -2
- package/dist/src/components/select/index.d.ts.map +0 -1
- package/dist/src/components/select/select.d.ts +0 -288
- package/dist/src/components/select/select.d.ts.map +0 -1
- package/dist/src/components/sensitive-input/index.d.ts +0 -2
- package/dist/src/components/sensitive-input/index.d.ts.map +0 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +0 -94
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +0 -1
- package/dist/src/components/sidebar/index.d.ts +0 -2
- package/dist/src/components/sidebar/index.d.ts.map +0 -1
- package/dist/src/components/sidebar/sidebar.d.ts +0 -583
- package/dist/src/components/sidebar/sidebar.d.ts.map +0 -1
- package/dist/src/components/surface/index.d.ts +0 -5
- package/dist/src/components/surface/index.d.ts.map +0 -1
- package/dist/src/components/surface/surface.d.ts +0 -64
- package/dist/src/components/surface/surface.d.ts.map +0 -1
- package/dist/src/components/switch/index.d.ts +0 -2
- package/dist/src/components/switch/index.d.ts.map +0 -1
- package/dist/src/components/switch/switch.d.ts +0 -197
- package/dist/src/components/switch/switch.d.ts.map +0 -1
- package/dist/src/components/table/index.d.ts +0 -2
- package/dist/src/components/table/index.d.ts.map +0 -1
- package/dist/src/components/table/table.d.ts +0 -138
- package/dist/src/components/table/table.d.ts.map +0 -1
- package/dist/src/components/table-of-contents/index.d.ts +0 -2
- package/dist/src/components/table-of-contents/index.d.ts.map +0 -1
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +0 -72
- package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +0 -1
- package/dist/src/components/tabs/index.d.ts +0 -3
- package/dist/src/components/tabs/index.d.ts.map +0 -1
- package/dist/src/components/tabs/tabs.d.ts +0 -116
- package/dist/src/components/tabs/tabs.d.ts.map +0 -1
- package/dist/src/components/text/index.d.ts +0 -2
- package/dist/src/components/text/index.d.ts.map +0 -1
- package/dist/src/components/text/text.d.ts +0 -214
- package/dist/src/components/text/text.d.ts.map +0 -1
- package/dist/src/components/text/text.type-spec.d.ts +0 -44
- package/dist/src/components/text/text.type-spec.d.ts.map +0 -1
- package/dist/src/components/toast/index.d.ts +0 -5
- package/dist/src/components/toast/index.d.ts.map +0 -1
- package/dist/src/components/toast/toast.d.ts +0 -197
- package/dist/src/components/toast/toast.d.ts.map +0 -1
- package/dist/src/components/toolbar/index.d.ts +0 -2
- package/dist/src/components/toolbar/index.d.ts.map +0 -1
- package/dist/src/components/toolbar/toolbar.d.ts +0 -50
- package/dist/src/components/toolbar/toolbar.d.ts.map +0 -1
- package/dist/src/components/tooltip/index.d.ts +0 -2
- package/dist/src/components/tooltip/index.d.ts.map +0 -1
- package/dist/src/components/tooltip/tooltip.d.ts +0 -108
- package/dist/src/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -85
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/primitives/accordion.d.ts +0 -13
- package/dist/src/primitives/accordion.d.ts.map +0 -1
- package/dist/src/primitives/alert-dialog.d.ts +0 -13
- package/dist/src/primitives/alert-dialog.d.ts.map +0 -1
- package/dist/src/primitives/autocomplete.d.ts +0 -13
- package/dist/src/primitives/autocomplete.d.ts.map +0 -1
- package/dist/src/primitives/avatar.d.ts +0 -13
- package/dist/src/primitives/avatar.d.ts.map +0 -1
- package/dist/src/primitives/button.d.ts +0 -13
- package/dist/src/primitives/button.d.ts.map +0 -1
- package/dist/src/primitives/checkbox-group.d.ts +0 -13
- package/dist/src/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/src/primitives/checkbox.d.ts +0 -13
- package/dist/src/primitives/checkbox.d.ts.map +0 -1
- package/dist/src/primitives/collapsible.d.ts +0 -13
- package/dist/src/primitives/collapsible.d.ts.map +0 -1
- package/dist/src/primitives/combobox.d.ts +0 -13
- package/dist/src/primitives/combobox.d.ts.map +0 -1
- package/dist/src/primitives/context-menu.d.ts +0 -13
- package/dist/src/primitives/context-menu.d.ts.map +0 -1
- package/dist/src/primitives/csp-provider.d.ts +0 -13
- package/dist/src/primitives/csp-provider.d.ts.map +0 -1
- package/dist/src/primitives/dialog.d.ts +0 -13
- package/dist/src/primitives/dialog.d.ts.map +0 -1
- package/dist/src/primitives/direction-provider.d.ts +0 -13
- package/dist/src/primitives/direction-provider.d.ts.map +0 -1
- package/dist/src/primitives/drawer.d.ts +0 -13
- package/dist/src/primitives/drawer.d.ts.map +0 -1
- package/dist/src/primitives/field.d.ts +0 -13
- package/dist/src/primitives/field.d.ts.map +0 -1
- package/dist/src/primitives/fieldset.d.ts +0 -13
- package/dist/src/primitives/fieldset.d.ts.map +0 -1
- package/dist/src/primitives/form.d.ts +0 -13
- package/dist/src/primitives/form.d.ts.map +0 -1
- package/dist/src/primitives/index.d.ts +0 -56
- package/dist/src/primitives/index.d.ts.map +0 -1
- package/dist/src/primitives/input.d.ts +0 -13
- package/dist/src/primitives/input.d.ts.map +0 -1
- package/dist/src/primitives/menu.d.ts +0 -13
- package/dist/src/primitives/menu.d.ts.map +0 -1
- package/dist/src/primitives/menubar.d.ts +0 -13
- package/dist/src/primitives/menubar.d.ts.map +0 -1
- package/dist/src/primitives/meter.d.ts +0 -13
- package/dist/src/primitives/meter.d.ts.map +0 -1
- package/dist/src/primitives/navigation-menu.d.ts +0 -13
- package/dist/src/primitives/navigation-menu.d.ts.map +0 -1
- package/dist/src/primitives/number-field.d.ts +0 -13
- package/dist/src/primitives/number-field.d.ts.map +0 -1
- package/dist/src/primitives/otp-field.d.ts +0 -14
- package/dist/src/primitives/otp-field.d.ts.map +0 -1
- package/dist/src/primitives/popover.d.ts +0 -13
- package/dist/src/primitives/popover.d.ts.map +0 -1
- package/dist/src/primitives/preview-card.d.ts +0 -13
- package/dist/src/primitives/preview-card.d.ts.map +0 -1
- package/dist/src/primitives/progress.d.ts +0 -13
- package/dist/src/primitives/progress.d.ts.map +0 -1
- package/dist/src/primitives/radio-group.d.ts +0 -13
- package/dist/src/primitives/radio-group.d.ts.map +0 -1
- package/dist/src/primitives/radio.d.ts +0 -13
- package/dist/src/primitives/radio.d.ts.map +0 -1
- package/dist/src/primitives/scroll-area.d.ts +0 -13
- package/dist/src/primitives/scroll-area.d.ts.map +0 -1
- package/dist/src/primitives/select.d.ts +0 -13
- package/dist/src/primitives/select.d.ts.map +0 -1
- package/dist/src/primitives/separator.d.ts +0 -13
- package/dist/src/primitives/separator.d.ts.map +0 -1
- package/dist/src/primitives/slider.d.ts +0 -13
- package/dist/src/primitives/slider.d.ts.map +0 -1
- package/dist/src/primitives/switch.d.ts +0 -13
- package/dist/src/primitives/switch.d.ts.map +0 -1
- package/dist/src/primitives/tabs.d.ts +0 -13
- package/dist/src/primitives/tabs.d.ts.map +0 -1
- package/dist/src/primitives/toast.d.ts +0 -13
- package/dist/src/primitives/toast.d.ts.map +0 -1
- package/dist/src/primitives/toggle-group.d.ts +0 -13
- package/dist/src/primitives/toggle-group.d.ts.map +0 -1
- package/dist/src/primitives/toggle.d.ts +0 -13
- package/dist/src/primitives/toggle.d.ts.map +0 -1
- package/dist/src/primitives/toolbar.d.ts +0 -13
- package/dist/src/primitives/toolbar.d.ts.map +0 -1
- package/dist/src/primitives/tooltip.d.ts +0 -13
- package/dist/src/primitives/tooltip.d.ts.map +0 -1
- package/dist/src/registry/index.d.ts +0 -8
- package/dist/src/registry/index.d.ts.map +0 -1
- package/dist/src/registry/types.d.ts +0 -191
- package/dist/src/registry/types.d.ts.map +0 -1
- package/dist/src/utils/cn.d.ts +0 -3
- package/dist/src/utils/cn.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/link-provider.d.ts +0 -66
- package/dist/src/utils/link-provider.d.ts.map +0 -1
- package/dist/src/utils/portal-provider.d.ts +0 -56
- package/dist/src/utils/portal-provider.d.ts.map +0 -1
- package/dist/src/utils/prop-examples.d.ts +0 -36
- package/dist/src/utils/prop-examples.d.ts.map +0 -1
- package/dist/src/utils/resolve-variant.d.ts +0 -27
- package/dist/src/utils/resolve-variant.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,1462 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
+
import { a as EMPTY_ARRAY, o as EMPTY_OBJECT, r as mergeProps, t as useRenderElement } from "./useRenderElement-m8kc7jyuczp71mq8.js";
|
|
4
|
+
import { C as FocusGuard, a as triggerOpenStateMapping, b as POPUP_COLLISION_AVOIDANCE, f as FloatingPortal, i as pressableTriggerOpenStateMapping, r as popupStateMapping, v as DROPDOWN_COLLISION_AVOIDANCE, x as ownerVisuallyHidden } from "./popupStateMapping-jpzw7eyzl8ghiv8s.js";
|
|
5
|
+
import { n as useIsoLayoutEffect } from "./safeReact-bavzz23j5tex60z2.js";
|
|
6
|
+
import { n as useTimeout } from "./useTimeout-oqptmu2xmyv5ccic.js";
|
|
7
|
+
import { B as stopEvent, D as activeElement, O as contains, a as getPreviousTabbable, c as isOutsideEvent, i as getNextTabbable, k as getTarget, n as enableFocusInside, o as getTabbableAfterElement, t as disableFocusInside, v as ownerDocument } from "./vendor-utils-luqsvbyuig727bnr.js";
|
|
8
|
+
import { E as isHTMLElement, w as getWindow } from "./vendor-floating-ui-dsysdmve7iazaaes.js";
|
|
9
|
+
import { a as clearSafePolygonPointerEventsMutation, i as applySafePolygonPointerEventsMutation, n as useHoverReferenceInteraction, o as useHoverInteractionSharedState, r as useHoverFloatingInteraction, t as safePolygon } from "./safePolygon-flrfpyc6fpidq4fb.js";
|
|
10
|
+
import { C as linkPress, D as outsidePress, F as triggerPress, P as triggerHover, f as focusOut, t as createChangeEventDetails, w as listNavigation } from "./createBaseUIEventDetails-ddivuhl74gni72qn.js";
|
|
11
|
+
import { t as addEventListener } from "./addEventListener-lhqvk2ahlzjsanyg.js";
|
|
12
|
+
import { t as mergeCleanups } from "./mergeCleanups-pexn3wul6a4zn873.js";
|
|
13
|
+
import { t as useValueAsRef } from "./useValueAsRef-lrn42zari17368c9.js";
|
|
14
|
+
import { t as useStableCallback } from "./useStableCallback-ninxmksdjvwl6ejj.js";
|
|
15
|
+
import { n as useAnimationFrame } from "./useAnimationFrame-ssgc72hyq6sg3yit.js";
|
|
16
|
+
import { r as getNodeChildren, t as useDismiss } from "./useDismiss-l2gbj4cain4zqtne.js";
|
|
17
|
+
import { t as useId$1 } from "./useId-l9soitgw3e4jk5ie.js";
|
|
18
|
+
import { a as useFloatingTree, i as useFloatingParentNodeId, n as FloatingTree, r as useFloatingNodeId, t as FloatingNode } from "./FloatingTree-jdm71b3m43e34hk7.js";
|
|
19
|
+
import { i as transitionStatusMapping, n as useAnimationsFinished, r as TransitionStatusDataAttributes, t as useOpenChangeComplete } from "./useOpenChangeComplete-dpkex2e23s1evpol.js";
|
|
20
|
+
import { t as useClick } from "./useClick-fvwb39qgead2jyft.js";
|
|
21
|
+
import { t as useTransitionStatus } from "./useTransitionStatus-ig4waxl2kervpyw4.js";
|
|
22
|
+
import { t as getEmptyRootContext } from "./getEmptyRootContext-2utawetz04dqkzyn.js";
|
|
23
|
+
import { t as useFloatingRootContext } from "./useFloatingRootContext-jo582qzez5k9gbgk.js";
|
|
24
|
+
import { i as adaptiveOrigin, n as getDisabledMountTransitionStyles, r as useAnchorPositioning, t as usePositioner } from "./usePositioner-h1n5q86am1sjo5hn.js";
|
|
25
|
+
import { t as useBaseUiId } from "./useBaseUiId-gqkl5ep5pn6hd0rw.js";
|
|
26
|
+
import { n as useDirection } from "./DirectionContext-jc1g0w645603sd6p.js";
|
|
27
|
+
import { t as inertValue } from "./inertValue-f9pgp32jxnm88df3.js";
|
|
28
|
+
import { t as getCssDimensions } from "./getCssDimensions-mi941fe1jvztqm6b.js";
|
|
29
|
+
import { t as useControlled } from "./useControlled-nlx0kk1ksgk0auvi.js";
|
|
30
|
+
import { t as useButton } from "./useButton-cpo6u2idqcnou6vy.js";
|
|
31
|
+
import { t as CompositeRoot } from "./CompositeRoot-jm9n0rrea12rfny1.js";
|
|
32
|
+
import { t as CompositeItem } from "./CompositeItem-l7zee38lq5m224d5.js";
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
import * as React$1 from "react";
|
|
35
|
+
import * as ReactDOM from "react-dom";
|
|
36
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/root/NavigationMenuRootContext.mjs
|
|
37
|
+
const NavigationMenuRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
38
|
+
NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
|
|
39
|
+
NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
|
|
40
|
+
function useNavigationMenuRootContext(optional) {
|
|
41
|
+
const context = React$1.useContext(NavigationMenuRootContext);
|
|
42
|
+
if (context === void 0 && !optional) throw new Error("Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>.");
|
|
43
|
+
return context;
|
|
44
|
+
}
|
|
45
|
+
const NavigationMenuTreeContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
46
|
+
NavigationMenuTreeContext.displayName = "NavigationMenuTreeContext";
|
|
47
|
+
function useNavigationMenuTreeContext() {
|
|
48
|
+
return React$1.useContext(NavigationMenuTreeContext);
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/positioner/NavigationMenuPositionerCssVars.mjs
|
|
52
|
+
let NavigationMenuPositionerCssVars = /*#__PURE__*/ function(NavigationMenuPositionerCssVars) {
|
|
53
|
+
/**
|
|
54
|
+
* The available width between the trigger and the edge of the viewport.
|
|
55
|
+
* @type {number}
|
|
56
|
+
*/
|
|
57
|
+
NavigationMenuPositionerCssVars["availableWidth"] = "--available-width";
|
|
58
|
+
/**
|
|
59
|
+
* The available height between the trigger and the edge of the viewport.
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
NavigationMenuPositionerCssVars["availableHeight"] = "--available-height";
|
|
63
|
+
/**
|
|
64
|
+
* The anchor's width.
|
|
65
|
+
* @type {number}
|
|
66
|
+
*/
|
|
67
|
+
NavigationMenuPositionerCssVars["anchorWidth"] = "--anchor-width";
|
|
68
|
+
/**
|
|
69
|
+
* The anchor's height.
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
NavigationMenuPositionerCssVars["anchorHeight"] = "--anchor-height";
|
|
73
|
+
/**
|
|
74
|
+
* The coordinates that this element is anchored to. Used for animations and transitions.
|
|
75
|
+
* @type {string}
|
|
76
|
+
*/
|
|
77
|
+
NavigationMenuPositionerCssVars["transformOrigin"] = "--transform-origin";
|
|
78
|
+
/**
|
|
79
|
+
* The fixed width of the positioner element.
|
|
80
|
+
* @type {number}
|
|
81
|
+
*/
|
|
82
|
+
NavigationMenuPositionerCssVars["positionerWidth"] = "--positioner-width";
|
|
83
|
+
/**
|
|
84
|
+
* The fixed height of the positioner element.
|
|
85
|
+
* @type {number}
|
|
86
|
+
*/
|
|
87
|
+
NavigationMenuPositionerCssVars["positionerHeight"] = "--positioner-height";
|
|
88
|
+
return NavigationMenuPositionerCssVars;
|
|
89
|
+
}({});
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/popup/NavigationMenuPopupCssVars.mjs
|
|
92
|
+
let NavigationMenuPopupCssVars = /*#__PURE__*/ function(NavigationMenuPopupCssVars) {
|
|
93
|
+
/**
|
|
94
|
+
* The fixed width of the popup element.
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
NavigationMenuPopupCssVars["popupWidth"] = "--popup-width";
|
|
98
|
+
/**
|
|
99
|
+
* The fixed height of the popup element.
|
|
100
|
+
* @type {number}
|
|
101
|
+
*/
|
|
102
|
+
NavigationMenuPopupCssVars["popupHeight"] = "--popup-height";
|
|
103
|
+
return NavigationMenuPopupCssVars;
|
|
104
|
+
}({});
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/utils/setSharedFixedSize.mjs
|
|
107
|
+
function setSharedFixedSize(popupElement, positionerElement, width, height) {
|
|
108
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${width}px`);
|
|
109
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${height}px`);
|
|
110
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
|
|
111
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/root/NavigationMenuRoot.mjs
|
|
115
|
+
const blockedReturnFocusReasons = /* @__PURE__ */ new Set([
|
|
116
|
+
triggerHover,
|
|
117
|
+
outsidePress,
|
|
118
|
+
focusOut
|
|
119
|
+
]);
|
|
120
|
+
function getPositionerFixedSize(positionerElement) {
|
|
121
|
+
const width = parseFloat(positionerElement.style.getPropertyValue(NavigationMenuPositionerCssVars.positionerWidth)) || 0;
|
|
122
|
+
const height = parseFloat(positionerElement.style.getPropertyValue(NavigationMenuPositionerCssVars.positionerHeight)) || 0;
|
|
123
|
+
if (width <= 0 || height <= 0) return null;
|
|
124
|
+
return {
|
|
125
|
+
width,
|
|
126
|
+
height
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Groups all parts of the navigation menu.
|
|
131
|
+
* Renders a `<nav>` element at the root, or `<div>` element when nested.
|
|
132
|
+
*
|
|
133
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
134
|
+
*/
|
|
135
|
+
const NavigationMenuRoot = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuRoot(componentProps, forwardedRef) {
|
|
136
|
+
const { defaultValue = null, value: valueParam, onValueChange, actionsRef, delay = 50, closeDelay = 50, orientation = "horizontal", onOpenChangeComplete } = componentProps;
|
|
137
|
+
const nested = useFloatingParentNodeId() != null;
|
|
138
|
+
const parentRootContext = useNavigationMenuRootContext(true);
|
|
139
|
+
const [value, setValueUnwrapped] = useControlled({
|
|
140
|
+
controlled: valueParam,
|
|
141
|
+
default: defaultValue,
|
|
142
|
+
name: "NavigationMenu",
|
|
143
|
+
state: "value"
|
|
144
|
+
});
|
|
145
|
+
const open = value != null;
|
|
146
|
+
const closeReasonRef = React$1.useRef(void 0);
|
|
147
|
+
const rootRef = React$1.useRef(null);
|
|
148
|
+
const [positionerElement, setPositionerElement] = React$1.useState(null);
|
|
149
|
+
const [popupElement, setPopupElement] = React$1.useState(null);
|
|
150
|
+
const [viewportElement, setViewportElement] = React$1.useState(null);
|
|
151
|
+
const [viewportTargetElement, setViewportTargetElement] = React$1.useState(null);
|
|
152
|
+
const [activationDirection, setActivationDirection] = React$1.useState(null);
|
|
153
|
+
const [floatingRootContext, setFloatingRootContext] = React$1.useState(void 0);
|
|
154
|
+
const [viewportInert, setViewportInert] = React$1.useState(false);
|
|
155
|
+
const prevTriggerElementRef = React$1.useRef(null);
|
|
156
|
+
const currentContentRef = React$1.useRef(null);
|
|
157
|
+
const beforeInsideRef = React$1.useRef(null);
|
|
158
|
+
const afterInsideRef = React$1.useRef(null);
|
|
159
|
+
const beforeOutsideRef = React$1.useRef(null);
|
|
160
|
+
const afterOutsideRef = React$1.useRef(null);
|
|
161
|
+
const popupAutoSizeResetRef = React$1.useRef({
|
|
162
|
+
abortController: null,
|
|
163
|
+
owner: null
|
|
164
|
+
});
|
|
165
|
+
const { mounted, setMounted, transitionStatus } = useTransitionStatus(open);
|
|
166
|
+
useIsoLayoutEffect(() => {
|
|
167
|
+
if (open) return;
|
|
168
|
+
if (!positionerElement || !popupElement) return;
|
|
169
|
+
const closeTransitionSize = getPositionerFixedSize(positionerElement);
|
|
170
|
+
if (!closeTransitionSize) return;
|
|
171
|
+
setSharedFixedSize(popupElement, positionerElement, closeTransitionSize.width, closeTransitionSize.height);
|
|
172
|
+
}, [
|
|
173
|
+
open,
|
|
174
|
+
popupElement,
|
|
175
|
+
positionerElement
|
|
176
|
+
]);
|
|
177
|
+
React$1.useEffect(() => {
|
|
178
|
+
setViewportInert(false);
|
|
179
|
+
}, [value]);
|
|
180
|
+
const setValue = useStableCallback((nextValue, eventDetails) => {
|
|
181
|
+
if (nextValue == null) closeReasonRef.current = eventDetails.reason;
|
|
182
|
+
if (nextValue !== value) onValueChange?.(nextValue, eventDetails);
|
|
183
|
+
if (eventDetails.isCanceled) return;
|
|
184
|
+
if (nextValue == null) {
|
|
185
|
+
setActivationDirection(null);
|
|
186
|
+
setFloatingRootContext(void 0);
|
|
187
|
+
}
|
|
188
|
+
setValueUnwrapped(nextValue);
|
|
189
|
+
if (nested && nextValue == null && eventDetails.reason === "link-press" && parentRootContext) parentRootContext.setValue(null, eventDetails);
|
|
190
|
+
});
|
|
191
|
+
const handleUnmount = useStableCallback(() => {
|
|
192
|
+
const activeEl = activeElement(ownerDocument(rootRef.current));
|
|
193
|
+
if (!(closeReasonRef.current ? blockedReturnFocusReasons.has(closeReasonRef.current) : false) && isHTMLElement(prevTriggerElementRef.current) && (activeEl === ownerDocument(popupElement).body || contains(popupElement, activeEl)) && popupElement) {
|
|
194
|
+
prevTriggerElementRef.current.focus({ preventScroll: true });
|
|
195
|
+
prevTriggerElementRef.current = void 0;
|
|
196
|
+
}
|
|
197
|
+
setMounted(false);
|
|
198
|
+
onOpenChangeComplete?.(false);
|
|
199
|
+
setActivationDirection(null);
|
|
200
|
+
setFloatingRootContext(void 0);
|
|
201
|
+
currentContentRef.current = null;
|
|
202
|
+
closeReasonRef.current = void 0;
|
|
203
|
+
});
|
|
204
|
+
React$1.useImperativeHandle(actionsRef, () => ({ unmount: handleUnmount }), [handleUnmount]);
|
|
205
|
+
useOpenChangeComplete({
|
|
206
|
+
enabled: !actionsRef,
|
|
207
|
+
open,
|
|
208
|
+
ref: { current: popupElement },
|
|
209
|
+
onComplete() {
|
|
210
|
+
if (!open) handleUnmount();
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
useOpenChangeComplete({
|
|
214
|
+
enabled: !actionsRef,
|
|
215
|
+
open,
|
|
216
|
+
ref: { current: viewportTargetElement },
|
|
217
|
+
onComplete() {
|
|
218
|
+
if (!open) handleUnmount();
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
const contextActivationDirection = open ? activationDirection : null;
|
|
222
|
+
const contextValue = React$1.useMemo(() => ({
|
|
223
|
+
open,
|
|
224
|
+
value,
|
|
225
|
+
setValue,
|
|
226
|
+
mounted,
|
|
227
|
+
transitionStatus,
|
|
228
|
+
positionerElement,
|
|
229
|
+
setPositionerElement,
|
|
230
|
+
popupElement,
|
|
231
|
+
setPopupElement,
|
|
232
|
+
viewportElement,
|
|
233
|
+
setViewportElement,
|
|
234
|
+
viewportTargetElement,
|
|
235
|
+
setViewportTargetElement,
|
|
236
|
+
activationDirection: contextActivationDirection,
|
|
237
|
+
setActivationDirection,
|
|
238
|
+
floatingRootContext,
|
|
239
|
+
setFloatingRootContext,
|
|
240
|
+
currentContentRef,
|
|
241
|
+
nested,
|
|
242
|
+
rootRef,
|
|
243
|
+
beforeInsideRef,
|
|
244
|
+
afterInsideRef,
|
|
245
|
+
beforeOutsideRef,
|
|
246
|
+
afterOutsideRef,
|
|
247
|
+
prevTriggerElementRef,
|
|
248
|
+
popupAutoSizeResetRef,
|
|
249
|
+
delay,
|
|
250
|
+
closeDelay,
|
|
251
|
+
orientation,
|
|
252
|
+
viewportInert,
|
|
253
|
+
setViewportInert
|
|
254
|
+
}), [
|
|
255
|
+
open,
|
|
256
|
+
value,
|
|
257
|
+
setValue,
|
|
258
|
+
mounted,
|
|
259
|
+
transitionStatus,
|
|
260
|
+
positionerElement,
|
|
261
|
+
popupElement,
|
|
262
|
+
viewportElement,
|
|
263
|
+
viewportTargetElement,
|
|
264
|
+
contextActivationDirection,
|
|
265
|
+
floatingRootContext,
|
|
266
|
+
nested,
|
|
267
|
+
delay,
|
|
268
|
+
closeDelay,
|
|
269
|
+
orientation,
|
|
270
|
+
viewportInert
|
|
271
|
+
]);
|
|
272
|
+
const jsx$1 = /*#__PURE__*/ jsx(NavigationMenuRootContext.Provider, {
|
|
273
|
+
value: contextValue,
|
|
274
|
+
children: /*#__PURE__*/ jsx(TreeContext, {
|
|
275
|
+
componentProps,
|
|
276
|
+
forwardedRef,
|
|
277
|
+
children: componentProps.children
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
if (!nested) return /*#__PURE__*/ jsx(FloatingTree, { children: jsx$1 });
|
|
281
|
+
return jsx$1;
|
|
282
|
+
});
|
|
283
|
+
NavigationMenuRoot.displayName = "NavigationMenuRoot";
|
|
284
|
+
function TreeContext(props) {
|
|
285
|
+
const { className, render, defaultValue, value: valueParam, onValueChange, actionsRef, delay, closeDelay, orientation, onOpenChangeComplete, style, ...elementProps } = props.componentProps;
|
|
286
|
+
const nodeId = useFloatingNodeId();
|
|
287
|
+
const { rootRef, nested, open } = useNavigationMenuRootContext();
|
|
288
|
+
const state = {
|
|
289
|
+
open,
|
|
290
|
+
nested
|
|
291
|
+
};
|
|
292
|
+
const element = useRenderElement(nested ? "div" : "nav", props.componentProps, {
|
|
293
|
+
state,
|
|
294
|
+
ref: [props.forwardedRef, rootRef],
|
|
295
|
+
props: elementProps
|
|
296
|
+
});
|
|
297
|
+
return /*#__PURE__*/ jsx(NavigationMenuTreeContext.Provider, {
|
|
298
|
+
value: nodeId,
|
|
299
|
+
children: /*#__PURE__*/ jsx(FloatingNode, {
|
|
300
|
+
id: nodeId,
|
|
301
|
+
children: element
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/utils/constants.mjs
|
|
307
|
+
const NAVIGATION_MENU_TRIGGER_IDENTIFIER = "data-base-ui-navigation-menu-trigger";
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/list/NavigationMenuDismissContext.mjs
|
|
310
|
+
const NavigationMenuDismissContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
311
|
+
NavigationMenuDismissContext.displayName = "NavigationMenuDismissContext";
|
|
312
|
+
function useNavigationMenuDismissContext() {
|
|
313
|
+
return React$1.useContext(NavigationMenuDismissContext);
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/list/NavigationMenuList.mjs
|
|
317
|
+
/**
|
|
318
|
+
* Contains a list of navigation menu items.
|
|
319
|
+
* Renders a `<ul>` element.
|
|
320
|
+
*
|
|
321
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
322
|
+
*/
|
|
323
|
+
const NavigationMenuList = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuList(componentProps, forwardedRef) {
|
|
324
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
325
|
+
const nodeId = useNavigationMenuTreeContext();
|
|
326
|
+
const { orientation, open, floatingRootContext, positionerElement, value, closeDelay, viewportElement, nested } = useNavigationMenuRootContext();
|
|
327
|
+
const fallbackContext = React$1.useMemo(() => getEmptyRootContext(), []);
|
|
328
|
+
const context = floatingRootContext || fallbackContext;
|
|
329
|
+
const interactionsEnabled = positionerElement != null || value == null;
|
|
330
|
+
useHoverFloatingInteraction(context, {
|
|
331
|
+
enabled: Boolean(floatingRootContext) && (positionerElement != null || viewportElement != null || value == null),
|
|
332
|
+
closeDelay,
|
|
333
|
+
nodeId
|
|
334
|
+
});
|
|
335
|
+
const dismiss = useDismiss(context, {
|
|
336
|
+
enabled: interactionsEnabled,
|
|
337
|
+
outsidePressEvent: "intentional",
|
|
338
|
+
outsidePress(event) {
|
|
339
|
+
return getTarget(event)?.closest(`[${NAVIGATION_MENU_TRIGGER_IDENTIFIER}]`) === null;
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
const dismissProps = floatingRootContext ? dismiss : void 0;
|
|
343
|
+
const state = { open };
|
|
344
|
+
const defaultProps = nested ? EMPTY_OBJECT : { onKeyDown(event) {
|
|
345
|
+
if (orientation === "horizontal" && (event.key === "ArrowLeft" || event.key === "ArrowRight") || orientation === "vertical" && (event.key === "ArrowUp" || event.key === "ArrowDown")) event.stopPropagation();
|
|
346
|
+
} };
|
|
347
|
+
const props = [
|
|
348
|
+
dismissProps?.floating || EMPTY_OBJECT,
|
|
349
|
+
defaultProps,
|
|
350
|
+
elementProps
|
|
351
|
+
];
|
|
352
|
+
const element = useRenderElement("ul", componentProps, {
|
|
353
|
+
state,
|
|
354
|
+
ref: forwardedRef,
|
|
355
|
+
props,
|
|
356
|
+
enabled: nested
|
|
357
|
+
});
|
|
358
|
+
if (nested) return /*#__PURE__*/ jsx(NavigationMenuDismissContext.Provider, {
|
|
359
|
+
value: dismissProps,
|
|
360
|
+
children: element
|
|
361
|
+
});
|
|
362
|
+
return /*#__PURE__*/ jsx(NavigationMenuDismissContext.Provider, {
|
|
363
|
+
value: dismissProps,
|
|
364
|
+
children: /*#__PURE__*/ jsx(CompositeRoot, {
|
|
365
|
+
render,
|
|
366
|
+
className,
|
|
367
|
+
style,
|
|
368
|
+
state,
|
|
369
|
+
refs: [forwardedRef],
|
|
370
|
+
props,
|
|
371
|
+
loopFocus: false,
|
|
372
|
+
orientation,
|
|
373
|
+
tag: "ul"
|
|
374
|
+
})
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
NavigationMenuList.displayName = "NavigationMenuList";
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/item/NavigationMenuItemContext.mjs
|
|
380
|
+
const NavigationMenuItemContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
381
|
+
NavigationMenuItemContext.displayName = "NavigationMenuItemContext";
|
|
382
|
+
function useNavigationMenuItemContext() {
|
|
383
|
+
const value = React$1.useContext(NavigationMenuItemContext);
|
|
384
|
+
if (!value) throw new Error("Base UI: NavigationMenuItem parts must be used within a <NavigationMenu.Item>.");
|
|
385
|
+
return value;
|
|
386
|
+
}
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/item/NavigationMenuItem.mjs
|
|
389
|
+
/**
|
|
390
|
+
* An individual navigation menu item.
|
|
391
|
+
* Renders a `<li>` element.
|
|
392
|
+
*
|
|
393
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
394
|
+
*/
|
|
395
|
+
const NavigationMenuItem = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuItem(componentProps, forwardedRef) {
|
|
396
|
+
const { render, className, style, value: valueProp, ...elementProps } = componentProps;
|
|
397
|
+
const fallbackValue = useBaseUiId();
|
|
398
|
+
const value = valueProp ?? fallbackValue;
|
|
399
|
+
const element = useRenderElement("li", componentProps, {
|
|
400
|
+
ref: forwardedRef,
|
|
401
|
+
props: elementProps
|
|
402
|
+
});
|
|
403
|
+
const contextValue = React$1.useMemo(() => ({ value }), [value]);
|
|
404
|
+
return /*#__PURE__*/ jsx(NavigationMenuItemContext.Provider, {
|
|
405
|
+
value: contextValue,
|
|
406
|
+
children: element
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
NavigationMenuItem.displayName = "NavigationMenuItem";
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/content/NavigationMenuContent.mjs
|
|
412
|
+
const stateAttributesMapping$2 = {
|
|
413
|
+
...popupStateMapping,
|
|
414
|
+
...transitionStatusMapping,
|
|
415
|
+
activationDirection(value) {
|
|
416
|
+
if (!value) return null;
|
|
417
|
+
return { "data-activation-direction": value };
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* A container for the content of the navigation menu item that is moved into the popup
|
|
422
|
+
* when the item is active.
|
|
423
|
+
* Renders a `<div>` element.
|
|
424
|
+
*
|
|
425
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
426
|
+
*/
|
|
427
|
+
const NavigationMenuContent = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuContent(componentProps, forwardedRef) {
|
|
428
|
+
const { render, className, style, keepMounted = false, ...elementProps } = componentProps;
|
|
429
|
+
const { mounted: popupMounted, viewportElement, value, activationDirection, currentContentRef, viewportTargetElement } = useNavigationMenuRootContext();
|
|
430
|
+
const { value: itemValue } = useNavigationMenuItemContext();
|
|
431
|
+
const nodeId = useNavigationMenuTreeContext();
|
|
432
|
+
const open = popupMounted && value === itemValue;
|
|
433
|
+
const ref = React$1.useRef(null);
|
|
434
|
+
const [hasMountedInPortal, setHasMountedInPortal] = React$1.useState(false);
|
|
435
|
+
const [focusInside, setFocusInside] = React$1.useState(false);
|
|
436
|
+
const { mounted, setMounted, transitionStatus } = useTransitionStatus(open);
|
|
437
|
+
if (mounted && !popupMounted) setMounted(false);
|
|
438
|
+
useOpenChangeComplete({
|
|
439
|
+
ref,
|
|
440
|
+
open,
|
|
441
|
+
onComplete() {
|
|
442
|
+
if (!open) setMounted(false);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
useIsoLayoutEffect(() => {
|
|
446
|
+
if (open && ref.current) currentContentRef.current = ref.current;
|
|
447
|
+
}, [open, currentContentRef]);
|
|
448
|
+
const state = {
|
|
449
|
+
open,
|
|
450
|
+
transitionStatus,
|
|
451
|
+
activationDirection
|
|
452
|
+
};
|
|
453
|
+
const handleCurrentContentRef = useStableCallback((node) => {
|
|
454
|
+
if (node && open) currentContentRef.current = node;
|
|
455
|
+
});
|
|
456
|
+
const commonProps = {
|
|
457
|
+
onFocus(event) {
|
|
458
|
+
if (getTarget(event.nativeEvent)?.hasAttribute("data-base-ui-focus-guard")) return;
|
|
459
|
+
setFocusInside(true);
|
|
460
|
+
},
|
|
461
|
+
onBlur(event) {
|
|
462
|
+
if (!contains(event.currentTarget, event.relatedTarget)) setFocusInside(false);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
const defaultProps = !open && mounted ? {
|
|
466
|
+
style: {
|
|
467
|
+
position: "absolute",
|
|
468
|
+
top: 0,
|
|
469
|
+
left: 0
|
|
470
|
+
},
|
|
471
|
+
inert: inertValue(!focusInside),
|
|
472
|
+
...commonProps
|
|
473
|
+
} : commonProps;
|
|
474
|
+
const portalContainer = viewportTargetElement || viewportElement;
|
|
475
|
+
const hidden = keepMounted && !mounted;
|
|
476
|
+
const shouldRenderInline = keepMounted && !portalContainer && !hasMountedInPortal;
|
|
477
|
+
if (keepMounted && portalContainer && !hasMountedInPortal) setHasMountedInPortal(true);
|
|
478
|
+
if (shouldRenderInline) return /*#__PURE__*/ jsx(CompositeRoot, {
|
|
479
|
+
render,
|
|
480
|
+
className,
|
|
481
|
+
style,
|
|
482
|
+
state,
|
|
483
|
+
refs: [forwardedRef],
|
|
484
|
+
props: [
|
|
485
|
+
defaultProps,
|
|
486
|
+
{ hidden: true },
|
|
487
|
+
elementProps
|
|
488
|
+
],
|
|
489
|
+
stateAttributesMapping: stateAttributesMapping$2
|
|
490
|
+
});
|
|
491
|
+
if (!portalContainer || !mounted && !keepMounted) return null;
|
|
492
|
+
return /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ jsx(FloatingNode, {
|
|
493
|
+
id: nodeId,
|
|
494
|
+
children: /*#__PURE__*/ jsx(CompositeRoot, {
|
|
495
|
+
render,
|
|
496
|
+
className,
|
|
497
|
+
style,
|
|
498
|
+
state,
|
|
499
|
+
refs: [
|
|
500
|
+
forwardedRef,
|
|
501
|
+
ref,
|
|
502
|
+
handleCurrentContentRef
|
|
503
|
+
],
|
|
504
|
+
props: [
|
|
505
|
+
defaultProps,
|
|
506
|
+
hidden ? { hidden: true } : EMPTY_OBJECT,
|
|
507
|
+
elementProps
|
|
508
|
+
],
|
|
509
|
+
stateAttributesMapping: stateAttributesMapping$2
|
|
510
|
+
})
|
|
511
|
+
}), portalContainer);
|
|
512
|
+
});
|
|
513
|
+
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/utils/isOutsideMenuEvent.mjs
|
|
516
|
+
function isOutsideMenuEvent({ currentTarget, relatedTarget }, params) {
|
|
517
|
+
const { popupElement, rootRef, tree, nodeId } = params;
|
|
518
|
+
const nodeChildrenContains = tree ? getNodeChildren(tree.nodesRef.current, nodeId).some((node) => contains(node.context?.elements.floating, relatedTarget)) : [];
|
|
519
|
+
if (!popupElement) return !contains(rootRef.current, relatedTarget) && !nodeChildrenContains;
|
|
520
|
+
return !contains(popupElement, currentTarget) && !contains(popupElement, relatedTarget) && !contains(rootRef.current, relatedTarget) && !nodeChildrenContains && !(contains(popupElement, relatedTarget) && relatedTarget?.hasAttribute("data-base-ui-focus-guard"));
|
|
521
|
+
}
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/trigger/NavigationMenuTrigger.mjs
|
|
524
|
+
const DEFAULT_SIZE = {
|
|
525
|
+
width: 0,
|
|
526
|
+
height: 0
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Opens the navigation menu popup when hovered or clicked, revealing the
|
|
530
|
+
* associated content.
|
|
531
|
+
* Renders a `<button>` element.
|
|
532
|
+
*
|
|
533
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
534
|
+
*/
|
|
535
|
+
const NavigationMenuTrigger = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuTrigger(componentProps, forwardedRef) {
|
|
536
|
+
const { render, className, style, nativeButton = true, disabled, ...elementProps } = componentProps;
|
|
537
|
+
const { value, setValue, mounted, open, positionerElement, setActivationDirection, setFloatingRootContext, popupElement, viewportElement, transitionStatus, rootRef, beforeOutsideRef, afterOutsideRef, afterInsideRef, beforeInsideRef, prevTriggerElementRef, popupAutoSizeResetRef, currentContentRef, delay, closeDelay, orientation, setViewportInert, nested } = useNavigationMenuRootContext();
|
|
538
|
+
const { value: itemValue } = useNavigationMenuItemContext();
|
|
539
|
+
const nodeId = useNavigationMenuTreeContext();
|
|
540
|
+
const tree = useFloatingTree();
|
|
541
|
+
const dismissProps = useNavigationMenuDismissContext();
|
|
542
|
+
const direction = useDirection();
|
|
543
|
+
const stickIfOpenTimeout = useTimeout();
|
|
544
|
+
const focusFrame = useAnimationFrame();
|
|
545
|
+
const mutationFrame = useAnimationFrame();
|
|
546
|
+
const resizeFrame = useAnimationFrame();
|
|
547
|
+
const sizeFrame = useAnimationFrame();
|
|
548
|
+
const [triggerElement, setTriggerElement] = React$1.useState(null);
|
|
549
|
+
const [stickIfOpen, setStickIfOpen] = React$1.useState(true);
|
|
550
|
+
const [pointerType, setPointerType] = React$1.useState("");
|
|
551
|
+
const triggerElementRef = React$1.useRef(null);
|
|
552
|
+
const allowFocusRef = React$1.useRef(false);
|
|
553
|
+
const prevSizeRef = React$1.useRef(DEFAULT_SIZE);
|
|
554
|
+
const skipAutoSizeSyncRef = React$1.useRef(false);
|
|
555
|
+
const isActiveItem = open && value === itemValue;
|
|
556
|
+
const isActiveItemRef = useValueAsRef(isActiveItem);
|
|
557
|
+
const interactionsEnabled = (positionerElement != null || value == null) && !disabled;
|
|
558
|
+
const hoverFloatingElement = positionerElement || viewportElement;
|
|
559
|
+
const hoverInteractionsEnabled = (hoverFloatingElement != null || value == null) && !disabled;
|
|
560
|
+
const runOnceAnimationsFinish = useAnimationsFinished(popupElement, false, false);
|
|
561
|
+
const handleTriggerElement = React$1.useCallback((element) => {
|
|
562
|
+
triggerElementRef.current = element;
|
|
563
|
+
setTriggerElement(element);
|
|
564
|
+
}, []);
|
|
565
|
+
const cancelAutoSizeReset = useStableCallback((force = false) => {
|
|
566
|
+
if (!force && popupAutoSizeResetRef.current.owner !== itemValue) return;
|
|
567
|
+
popupAutoSizeResetRef.current.abortController?.abort();
|
|
568
|
+
popupAutoSizeResetRef.current.abortController = null;
|
|
569
|
+
popupAutoSizeResetRef.current.owner = null;
|
|
570
|
+
});
|
|
571
|
+
useIsoLayoutEffect(() => {
|
|
572
|
+
if (isActiveItem) return;
|
|
573
|
+
mutationFrame.cancel();
|
|
574
|
+
sizeFrame.cancel();
|
|
575
|
+
cancelAutoSizeReset();
|
|
576
|
+
}, [
|
|
577
|
+
isActiveItem,
|
|
578
|
+
mutationFrame,
|
|
579
|
+
sizeFrame,
|
|
580
|
+
cancelAutoSizeReset
|
|
581
|
+
]);
|
|
582
|
+
function setAutoSizes() {
|
|
583
|
+
if (!popupElement) return;
|
|
584
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, "auto");
|
|
585
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, "auto");
|
|
586
|
+
}
|
|
587
|
+
function clearFixedSizes() {
|
|
588
|
+
if (!popupElement || !positionerElement) return;
|
|
589
|
+
popupElement.style.removeProperty(NavigationMenuPopupCssVars.popupWidth);
|
|
590
|
+
popupElement.style.removeProperty(NavigationMenuPopupCssVars.popupHeight);
|
|
591
|
+
positionerElement.style.removeProperty(NavigationMenuPositionerCssVars.positionerWidth);
|
|
592
|
+
positionerElement.style.removeProperty(NavigationMenuPositionerCssVars.positionerHeight);
|
|
593
|
+
}
|
|
594
|
+
function scheduleAutoSizeReset() {
|
|
595
|
+
cancelAutoSizeReset(true);
|
|
596
|
+
const abortController = new AbortController();
|
|
597
|
+
popupAutoSizeResetRef.current.abortController = abortController;
|
|
598
|
+
popupAutoSizeResetRef.current.owner = itemValue;
|
|
599
|
+
runOnceAnimationsFinish(() => {
|
|
600
|
+
if (popupAutoSizeResetRef.current.abortController !== abortController || popupAutoSizeResetRef.current.owner !== itemValue) return;
|
|
601
|
+
popupAutoSizeResetRef.current.abortController = null;
|
|
602
|
+
popupAutoSizeResetRef.current.owner = null;
|
|
603
|
+
setAutoSizes();
|
|
604
|
+
}, abortController.signal);
|
|
605
|
+
}
|
|
606
|
+
const handleValueChange = useStableCallback((currentWidth, currentHeight, options = {}) => {
|
|
607
|
+
if (!popupElement || !positionerElement) return;
|
|
608
|
+
cancelAutoSizeReset(true);
|
|
609
|
+
const { syncPositioner = false } = options;
|
|
610
|
+
clearFixedSizes();
|
|
611
|
+
const { width, height } = getCssDimensions(popupElement);
|
|
612
|
+
const measuredWidth = width || prevSizeRef.current.width;
|
|
613
|
+
const measuredHeight = height || prevSizeRef.current.height;
|
|
614
|
+
if (currentHeight === 0 || currentWidth === 0) {
|
|
615
|
+
currentWidth = measuredWidth;
|
|
616
|
+
currentHeight = measuredHeight;
|
|
617
|
+
}
|
|
618
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${currentWidth}px`);
|
|
619
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${currentHeight}px`);
|
|
620
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${syncPositioner ? currentWidth : measuredWidth}px`);
|
|
621
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${syncPositioner ? currentHeight : measuredHeight}px`);
|
|
622
|
+
sizeFrame.request(() => {
|
|
623
|
+
if (!isActiveItemRef.current) return;
|
|
624
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupWidth, `${measuredWidth}px`);
|
|
625
|
+
popupElement.style.setProperty(NavigationMenuPopupCssVars.popupHeight, `${measuredHeight}px`);
|
|
626
|
+
if (syncPositioner) {
|
|
627
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${measuredWidth}px`);
|
|
628
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${measuredHeight}px`);
|
|
629
|
+
}
|
|
630
|
+
scheduleAutoSizeReset();
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
const handleInterruptedMutationResize = useStableCallback((currentWidth, currentHeight) => {
|
|
634
|
+
if (!popupElement || !positionerElement) return;
|
|
635
|
+
sizeFrame.cancel();
|
|
636
|
+
mutationFrame.cancel();
|
|
637
|
+
cancelAutoSizeReset(true);
|
|
638
|
+
if (currentWidth === 0 || currentHeight === 0) return;
|
|
639
|
+
setSharedFixedSize(popupElement, positionerElement, currentWidth, currentHeight);
|
|
640
|
+
mutationFrame.request(() => {
|
|
641
|
+
mutationFrame.request(() => {
|
|
642
|
+
clearFixedSizes();
|
|
643
|
+
const { width, height } = getCssDimensions(popupElement);
|
|
644
|
+
const measuredWidth = width || currentWidth || prevSizeRef.current.width;
|
|
645
|
+
const measuredHeight = height || currentHeight || prevSizeRef.current.height;
|
|
646
|
+
setSharedFixedSize(popupElement, positionerElement, currentWidth, currentHeight);
|
|
647
|
+
sizeFrame.request(() => {
|
|
648
|
+
if (!isActiveItemRef.current) return;
|
|
649
|
+
setSharedFixedSize(popupElement, positionerElement, measuredWidth, measuredHeight);
|
|
650
|
+
scheduleAutoSizeReset();
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
});
|
|
655
|
+
const syncCurrentSize = useStableCallback(() => {
|
|
656
|
+
if (!popupElement || !positionerElement) return;
|
|
657
|
+
sizeFrame.cancel();
|
|
658
|
+
cancelAutoSizeReset(true);
|
|
659
|
+
clearFixedSizes();
|
|
660
|
+
const { width, height } = getCssDimensions(popupElement);
|
|
661
|
+
if (width === 0 || height === 0) return;
|
|
662
|
+
prevSizeRef.current = {
|
|
663
|
+
width,
|
|
664
|
+
height
|
|
665
|
+
};
|
|
666
|
+
setAutoSizes();
|
|
667
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
|
|
668
|
+
positionerElement.style.setProperty(NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
|
|
669
|
+
});
|
|
670
|
+
const getMutationBaseline = useStableCallback(() => {
|
|
671
|
+
if (!popupElement) return {
|
|
672
|
+
size: prevSizeRef.current,
|
|
673
|
+
syncPositioner: false
|
|
674
|
+
};
|
|
675
|
+
const popupWidth = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars.popupWidth);
|
|
676
|
+
const popupHeight = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars.popupHeight);
|
|
677
|
+
if (!(popupWidth !== "" && popupWidth !== "auto" && popupHeight !== "" && popupHeight !== "auto")) return {
|
|
678
|
+
size: prevSizeRef.current,
|
|
679
|
+
syncPositioner: false
|
|
680
|
+
};
|
|
681
|
+
return {
|
|
682
|
+
size: {
|
|
683
|
+
width: popupElement.offsetWidth || prevSizeRef.current.width,
|
|
684
|
+
height: popupElement.offsetHeight || prevSizeRef.current.height
|
|
685
|
+
},
|
|
686
|
+
syncPositioner: true
|
|
687
|
+
};
|
|
688
|
+
});
|
|
689
|
+
React$1.useEffect(() => {
|
|
690
|
+
if (!open) {
|
|
691
|
+
stickIfOpenTimeout.clear();
|
|
692
|
+
mutationFrame.cancel();
|
|
693
|
+
resizeFrame.cancel();
|
|
694
|
+
sizeFrame.cancel();
|
|
695
|
+
cancelAutoSizeReset(true);
|
|
696
|
+
skipAutoSizeSyncRef.current = false;
|
|
697
|
+
setPointerType("");
|
|
698
|
+
}
|
|
699
|
+
}, [
|
|
700
|
+
stickIfOpenTimeout,
|
|
701
|
+
open,
|
|
702
|
+
mutationFrame,
|
|
703
|
+
resizeFrame,
|
|
704
|
+
sizeFrame,
|
|
705
|
+
cancelAutoSizeReset
|
|
706
|
+
]);
|
|
707
|
+
React$1.useEffect(() => {
|
|
708
|
+
if (!mounted) prevSizeRef.current = DEFAULT_SIZE;
|
|
709
|
+
}, [mounted]);
|
|
710
|
+
useIsoLayoutEffect(() => {
|
|
711
|
+
if (!popupElement || typeof ResizeObserver !== "function") return;
|
|
712
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
713
|
+
prevSizeRef.current = {
|
|
714
|
+
width: popupElement.offsetWidth,
|
|
715
|
+
height: popupElement.offsetHeight
|
|
716
|
+
};
|
|
717
|
+
});
|
|
718
|
+
resizeObserver.observe(popupElement);
|
|
719
|
+
return () => {
|
|
720
|
+
resizeObserver.disconnect();
|
|
721
|
+
};
|
|
722
|
+
}, [popupElement]);
|
|
723
|
+
React$1.useEffect(() => {
|
|
724
|
+
if (!open || !isActiveItem || !popupElement || !positionerElement) return;
|
|
725
|
+
const win = getWindow(positionerElement);
|
|
726
|
+
function handleResize() {
|
|
727
|
+
resizeFrame.cancel();
|
|
728
|
+
resizeFrame.request(syncCurrentSize);
|
|
729
|
+
}
|
|
730
|
+
const unsubscribe = addEventListener(win, "resize", handleResize);
|
|
731
|
+
return () => {
|
|
732
|
+
resizeFrame.cancel();
|
|
733
|
+
unsubscribe();
|
|
734
|
+
};
|
|
735
|
+
}, [
|
|
736
|
+
open,
|
|
737
|
+
isActiveItem,
|
|
738
|
+
popupElement,
|
|
739
|
+
positionerElement,
|
|
740
|
+
resizeFrame,
|
|
741
|
+
syncCurrentSize
|
|
742
|
+
]);
|
|
743
|
+
React$1.useEffect(() => {
|
|
744
|
+
const observedElement = currentContentRef.current;
|
|
745
|
+
if (!observedElement || !popupElement || !isActiveItem || typeof MutationObserver !== "function") return;
|
|
746
|
+
const mutationObserver = new MutationObserver(() => {
|
|
747
|
+
if (transitionStatus === "starting" || popupElement.hasAttribute(TransitionStatusDataAttributes.startingStyle)) {
|
|
748
|
+
syncCurrentSize();
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
const { size, syncPositioner } = getMutationBaseline();
|
|
752
|
+
if (syncPositioner) {
|
|
753
|
+
handleInterruptedMutationResize(size.width, size.height);
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
handleValueChange(size.width, size.height);
|
|
757
|
+
});
|
|
758
|
+
mutationObserver.observe(observedElement, {
|
|
759
|
+
childList: true,
|
|
760
|
+
subtree: true,
|
|
761
|
+
characterData: true,
|
|
762
|
+
attributes: true,
|
|
763
|
+
attributeFilter: ["hidden"]
|
|
764
|
+
});
|
|
765
|
+
return () => {
|
|
766
|
+
mutationObserver.disconnect();
|
|
767
|
+
};
|
|
768
|
+
}, [
|
|
769
|
+
currentContentRef,
|
|
770
|
+
popupElement,
|
|
771
|
+
isActiveItem,
|
|
772
|
+
transitionStatus,
|
|
773
|
+
getMutationBaseline,
|
|
774
|
+
handleInterruptedMutationResize,
|
|
775
|
+
handleValueChange,
|
|
776
|
+
syncCurrentSize
|
|
777
|
+
]);
|
|
778
|
+
React$1.useEffect(() => {
|
|
779
|
+
if (isActiveItem && open && popupElement && allowFocusRef.current) {
|
|
780
|
+
allowFocusRef.current = false;
|
|
781
|
+
focusFrame.request(() => {
|
|
782
|
+
beforeOutsideRef.current?.focus();
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
return () => {
|
|
786
|
+
focusFrame.cancel();
|
|
787
|
+
};
|
|
788
|
+
}, [
|
|
789
|
+
beforeOutsideRef,
|
|
790
|
+
focusFrame,
|
|
791
|
+
isActiveItem,
|
|
792
|
+
open,
|
|
793
|
+
popupElement
|
|
794
|
+
]);
|
|
795
|
+
useIsoLayoutEffect(() => {
|
|
796
|
+
if (isActiveItemRef.current && open && popupElement) {
|
|
797
|
+
const hasNestedMenu = currentContentRef.current?.querySelector("[data-nested]") != null;
|
|
798
|
+
if (transitionStatus === "starting" && hasNestedMenu) {
|
|
799
|
+
sizeFrame.request(syncCurrentSize);
|
|
800
|
+
return () => {
|
|
801
|
+
sizeFrame.cancel();
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
if (skipAutoSizeSyncRef.current) {
|
|
805
|
+
skipAutoSizeSyncRef.current = false;
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
const { width, height } = getCssDimensions(popupElement);
|
|
809
|
+
handleValueChange(width, height);
|
|
810
|
+
}
|
|
811
|
+
}, [
|
|
812
|
+
currentContentRef,
|
|
813
|
+
handleValueChange,
|
|
814
|
+
isActiveItemRef,
|
|
815
|
+
open,
|
|
816
|
+
popupElement,
|
|
817
|
+
sizeFrame,
|
|
818
|
+
syncCurrentSize,
|
|
819
|
+
transitionStatus
|
|
820
|
+
]);
|
|
821
|
+
function handleOpenChange(nextOpen, eventDetails) {
|
|
822
|
+
const isHover = eventDetails.reason === triggerHover;
|
|
823
|
+
if (!interactionsEnabled) return;
|
|
824
|
+
if (pointerType === "touch" && isHover) return;
|
|
825
|
+
if (!nextOpen && value !== itemValue) return;
|
|
826
|
+
function changeState() {
|
|
827
|
+
if (isHover) {
|
|
828
|
+
setStickIfOpen(true);
|
|
829
|
+
stickIfOpenTimeout.clear();
|
|
830
|
+
stickIfOpenTimeout.start(500, () => {
|
|
831
|
+
setStickIfOpen(false);
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
if (nextOpen) setValue(itemValue, eventDetails);
|
|
835
|
+
else {
|
|
836
|
+
setValue(null, eventDetails);
|
|
837
|
+
setPointerType("");
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
if (isHover) ReactDOM.flushSync(changeState);
|
|
841
|
+
else changeState();
|
|
842
|
+
}
|
|
843
|
+
const context = useFloatingRootContext({
|
|
844
|
+
open,
|
|
845
|
+
onOpenChange: handleOpenChange,
|
|
846
|
+
elements: {
|
|
847
|
+
reference: triggerElement,
|
|
848
|
+
floating: hoverFloatingElement
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
const hoverInteractionState = useHoverInteractionSharedState(context);
|
|
852
|
+
const shouldBlockSafePolygonPointerEvents = pointerType !== "touch";
|
|
853
|
+
React$1.useEffect(() => {
|
|
854
|
+
if (!open) {
|
|
855
|
+
context.context.dataRef.current.openEvent = void 0;
|
|
856
|
+
hoverInteractionState.pointerType = void 0;
|
|
857
|
+
hoverInteractionState.interactedInside = false;
|
|
858
|
+
hoverInteractionState.restTimeoutPending = false;
|
|
859
|
+
hoverInteractionState.openChangeTimeout.clear();
|
|
860
|
+
hoverInteractionState.restTimeout.clear();
|
|
861
|
+
clearSafePolygonPointerEventsMutation(hoverInteractionState);
|
|
862
|
+
}
|
|
863
|
+
}, [
|
|
864
|
+
context,
|
|
865
|
+
hoverInteractionState,
|
|
866
|
+
open
|
|
867
|
+
]);
|
|
868
|
+
const getInlineHandleCloseContext = useStableCallback(() => {
|
|
869
|
+
if (!nested || positionerElement || !triggerElementRef.current || !hoverFloatingElement) return null;
|
|
870
|
+
return getHandleCloseContext(triggerElementRef.current, hoverFloatingElement, nodeId);
|
|
871
|
+
});
|
|
872
|
+
function getScope() {
|
|
873
|
+
if (!nested || !positionerElement) return triggerElementRef.current?.closest("ul") ?? null;
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
const hoverProps = useHoverReferenceInteraction(context, {
|
|
877
|
+
enabled: hoverInteractionsEnabled,
|
|
878
|
+
move: false,
|
|
879
|
+
handleClose: safePolygon({
|
|
880
|
+
blockPointerEvents: shouldBlockSafePolygonPointerEvents,
|
|
881
|
+
getScope
|
|
882
|
+
}),
|
|
883
|
+
restMs: mounted && positionerElement ? 0 : delay,
|
|
884
|
+
delay: { close: closeDelay },
|
|
885
|
+
triggerElementRef,
|
|
886
|
+
getHandleCloseContext: getInlineHandleCloseContext
|
|
887
|
+
});
|
|
888
|
+
const hover = React$1.useMemo(() => hoverProps ? { reference: hoverProps } : void 0, [hoverProps]);
|
|
889
|
+
const click = useClick(context, {
|
|
890
|
+
enabled: interactionsEnabled,
|
|
891
|
+
stickIfOpen,
|
|
892
|
+
toggle: isActiveItem
|
|
893
|
+
});
|
|
894
|
+
const referenceProps = React$1.useMemo(() => mergeProps(click.reference, hover?.reference), [click.reference, hover]);
|
|
895
|
+
useIsoLayoutEffect(() => {
|
|
896
|
+
if (isActiveItem) {
|
|
897
|
+
setFloatingRootContext(context);
|
|
898
|
+
prevTriggerElementRef.current = triggerElement;
|
|
899
|
+
}
|
|
900
|
+
}, [
|
|
901
|
+
isActiveItem,
|
|
902
|
+
context,
|
|
903
|
+
setFloatingRootContext,
|
|
904
|
+
prevTriggerElementRef,
|
|
905
|
+
triggerElement
|
|
906
|
+
]);
|
|
907
|
+
function handleActivation(event) {
|
|
908
|
+
ReactDOM.flushSync(() => {
|
|
909
|
+
const currentTarget = isHTMLElement(event.currentTarget) ? event.currentTarget : null;
|
|
910
|
+
const prevTriggerRect = prevTriggerElementRef.current?.getBoundingClientRect();
|
|
911
|
+
if (mounted && prevTriggerRect && triggerElement) {
|
|
912
|
+
const nextTriggerRect = triggerElement.getBoundingClientRect();
|
|
913
|
+
const isMovingRight = nextTriggerRect.left > prevTriggerRect.left;
|
|
914
|
+
const isMovingDown = nextTriggerRect.top > prevTriggerRect.top;
|
|
915
|
+
if (orientation === "horizontal" && nextTriggerRect.left !== prevTriggerRect.left) setActivationDirection(isMovingRight ? "right" : "left");
|
|
916
|
+
else if (orientation === "vertical" && nextTriggerRect.top !== prevTriggerRect.top) setActivationDirection(isMovingDown ? "down" : "up");
|
|
917
|
+
}
|
|
918
|
+
if (event.type !== "click" && value != null) context.context.dataRef.current.openEvent = void 0;
|
|
919
|
+
if (pointerType === "touch" && event.type !== "click") return;
|
|
920
|
+
if (value != null && event.type !== "keydown") setValue(itemValue, createChangeEventDetails(event.type === "mouseenter" ? triggerHover : triggerPress, event.nativeEvent));
|
|
921
|
+
if (event.type === "mouseenter" && shouldBlockSafePolygonPointerEvents && (!nested || !positionerElement) && hoverFloatingElement && currentTarget) {
|
|
922
|
+
const applyPointerEventsMutation = () => {
|
|
923
|
+
const scopeElement = getScope() ?? currentTarget.ownerDocument.body;
|
|
924
|
+
applySafePolygonPointerEventsMutation(hoverInteractionState, {
|
|
925
|
+
scopeElement,
|
|
926
|
+
referenceElement: currentTarget,
|
|
927
|
+
floatingElement: hoverFloatingElement
|
|
928
|
+
});
|
|
929
|
+
};
|
|
930
|
+
if (value != null && value !== itemValue) queueMicrotask(applyPointerEventsMutation);
|
|
931
|
+
else applyPointerEventsMutation();
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
const handleOpenEvent = useStableCallback((event) => {
|
|
936
|
+
if (disabled) return;
|
|
937
|
+
if (!popupElement || !positionerElement) {
|
|
938
|
+
handleActivation(event);
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
const { width, height } = getCssDimensions(popupElement);
|
|
942
|
+
const shouldSkipAutoSizeSync = value != null && value !== itemValue && (event.type === "click" || pointerType !== "touch");
|
|
943
|
+
handleActivation(event);
|
|
944
|
+
if (shouldSkipAutoSizeSync) skipAutoSizeSyncRef.current = true;
|
|
945
|
+
handleValueChange(width, height);
|
|
946
|
+
});
|
|
947
|
+
const state = { open: isActiveItem };
|
|
948
|
+
function handleSetPointerType(event) {
|
|
949
|
+
setPointerType(event.pointerType);
|
|
950
|
+
}
|
|
951
|
+
function handleTriggerPointerDown(event) {
|
|
952
|
+
handleSetPointerType(event);
|
|
953
|
+
clearSafePolygonPointerEventsMutation(hoverInteractionState);
|
|
954
|
+
}
|
|
955
|
+
const defaultProps = {
|
|
956
|
+
tabIndex: 0,
|
|
957
|
+
onMouseEnter: handleOpenEvent,
|
|
958
|
+
onClick: handleOpenEvent,
|
|
959
|
+
onPointerEnter: handleSetPointerType,
|
|
960
|
+
onPointerDown: handleTriggerPointerDown,
|
|
961
|
+
"aria-expanded": isActiveItem,
|
|
962
|
+
"aria-controls": isActiveItem ? popupElement?.id : void 0,
|
|
963
|
+
[NAVIGATION_MENU_TRIGGER_IDENTIFIER]: "",
|
|
964
|
+
onFocus() {
|
|
965
|
+
if (!isActiveItem) return;
|
|
966
|
+
setViewportInert(false);
|
|
967
|
+
},
|
|
968
|
+
onMouseMove() {
|
|
969
|
+
allowFocusRef.current = false;
|
|
970
|
+
},
|
|
971
|
+
onKeyDown(event) {
|
|
972
|
+
allowFocusRef.current = true;
|
|
973
|
+
if (nested) return;
|
|
974
|
+
const verticalOpenKey = direction === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
975
|
+
const openHorizontal = orientation === "horizontal" && event.key === "ArrowDown";
|
|
976
|
+
const openVertical = orientation === "vertical" && event.key === verticalOpenKey;
|
|
977
|
+
if (openHorizontal || openVertical) {
|
|
978
|
+
setValue(itemValue, createChangeEventDetails(listNavigation, event.nativeEvent));
|
|
979
|
+
handleOpenEvent(event);
|
|
980
|
+
stopEvent(event);
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
onBlur(event) {
|
|
984
|
+
if (positionerElement && popupElement && isOutsideMenuEvent({
|
|
985
|
+
currentTarget: event.currentTarget,
|
|
986
|
+
relatedTarget: event.relatedTarget
|
|
987
|
+
}, {
|
|
988
|
+
popupElement,
|
|
989
|
+
rootRef,
|
|
990
|
+
tree,
|
|
991
|
+
nodeId
|
|
992
|
+
})) setValue(null, createChangeEventDetails(focusOut, event.nativeEvent));
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
const { getButtonProps, buttonRef } = useButton({
|
|
996
|
+
disabled,
|
|
997
|
+
focusableWhenDisabled: true,
|
|
998
|
+
native: nativeButton
|
|
999
|
+
});
|
|
1000
|
+
const referenceElement = hoverFloatingElement;
|
|
1001
|
+
return /*#__PURE__*/ jsxs(React$1.Fragment, { children: [/*#__PURE__*/ jsx(CompositeItem, {
|
|
1002
|
+
tag: "button",
|
|
1003
|
+
render,
|
|
1004
|
+
className,
|
|
1005
|
+
style,
|
|
1006
|
+
state,
|
|
1007
|
+
stateAttributesMapping: pressableTriggerOpenStateMapping,
|
|
1008
|
+
refs: [
|
|
1009
|
+
forwardedRef,
|
|
1010
|
+
handleTriggerElement,
|
|
1011
|
+
buttonRef
|
|
1012
|
+
],
|
|
1013
|
+
props: [
|
|
1014
|
+
referenceProps,
|
|
1015
|
+
dismissProps?.reference || EMPTY_ARRAY,
|
|
1016
|
+
defaultProps,
|
|
1017
|
+
elementProps,
|
|
1018
|
+
getButtonProps
|
|
1019
|
+
]
|
|
1020
|
+
}), isActiveItem && /*#__PURE__*/ jsxs(React$1.Fragment, { children: [
|
|
1021
|
+
/*#__PURE__*/ jsx(FocusGuard, {
|
|
1022
|
+
ref: beforeOutsideRef,
|
|
1023
|
+
onFocus: (event) => {
|
|
1024
|
+
if (referenceElement && isOutsideEvent(event, referenceElement)) beforeInsideRef.current?.focus();
|
|
1025
|
+
else getPreviousTabbable(triggerElement)?.focus();
|
|
1026
|
+
}
|
|
1027
|
+
}),
|
|
1028
|
+
/*#__PURE__*/ jsx("span", {
|
|
1029
|
+
"aria-owns": viewportElement?.id,
|
|
1030
|
+
style: ownerVisuallyHidden
|
|
1031
|
+
}),
|
|
1032
|
+
/*#__PURE__*/ jsx(FocusGuard, {
|
|
1033
|
+
ref: afterOutsideRef,
|
|
1034
|
+
onFocus: (event) => {
|
|
1035
|
+
if (referenceElement && isOutsideEvent(event, referenceElement)) {
|
|
1036
|
+
ReactDOM.flushSync(() => {
|
|
1037
|
+
setViewportInert(false);
|
|
1038
|
+
});
|
|
1039
|
+
(afterInsideRef.current || triggerElement)?.focus();
|
|
1040
|
+
} else {
|
|
1041
|
+
let nextTabbable = getNextTabbable(triggerElement);
|
|
1042
|
+
if (nested && !positionerElement && referenceElement && nextTabbable && contains(referenceElement, nextTabbable)) nextTabbable = getTabbableAfterElement(afterInsideRef.current);
|
|
1043
|
+
nextTabbable?.focus();
|
|
1044
|
+
if ((!nested || positionerElement) && !contains(rootRef.current, nextTabbable)) setValue(null, createChangeEventDetails("focus-out", event.nativeEvent));
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
})
|
|
1048
|
+
] })] });
|
|
1049
|
+
});
|
|
1050
|
+
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
1051
|
+
function getPlacementFromElements(domReferenceElement, floatingElement) {
|
|
1052
|
+
const referenceRect = domReferenceElement.getBoundingClientRect();
|
|
1053
|
+
const floatingRect = floatingElement.getBoundingClientRect();
|
|
1054
|
+
const referenceCenterX = referenceRect.left + referenceRect.width / 2;
|
|
1055
|
+
const referenceCenterY = referenceRect.top + referenceRect.height / 2;
|
|
1056
|
+
const floatingCenterX = floatingRect.left + floatingRect.width / 2;
|
|
1057
|
+
const floatingCenterY = floatingRect.top + floatingRect.height / 2;
|
|
1058
|
+
const deltaX = floatingCenterX - referenceCenterX;
|
|
1059
|
+
const deltaY = floatingCenterY - referenceCenterY;
|
|
1060
|
+
if (Math.abs(deltaX) >= Math.abs(deltaY)) return deltaX >= 0 ? "right" : "left";
|
|
1061
|
+
return deltaY >= 0 ? "bottom" : "top";
|
|
1062
|
+
}
|
|
1063
|
+
function getHandleCloseContext(domReferenceElement, floatingElement, nodeId) {
|
|
1064
|
+
return {
|
|
1065
|
+
placement: getPlacementFromElements(domReferenceElement, floatingElement),
|
|
1066
|
+
elements: {
|
|
1067
|
+
domReference: domReferenceElement,
|
|
1068
|
+
floating: floatingElement
|
|
1069
|
+
},
|
|
1070
|
+
nodeId
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
//#endregion
|
|
1074
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/portal/NavigationMenuPortalContext.mjs
|
|
1075
|
+
const NavigationMenuPortalContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1076
|
+
NavigationMenuPortalContext.displayName = "NavigationMenuPortalContext";
|
|
1077
|
+
function useNavigationMenuPortalContext() {
|
|
1078
|
+
const value = React$1.useContext(NavigationMenuPortalContext);
|
|
1079
|
+
if (value === void 0) throw new Error("Base UI: <NavigationMenu.Portal> is missing.");
|
|
1080
|
+
return value;
|
|
1081
|
+
}
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/portal/NavigationMenuPortal.mjs
|
|
1084
|
+
/**
|
|
1085
|
+
* A portal element that moves the popup to a different part of the DOM.
|
|
1086
|
+
* By default, the portal element is appended to `<body>`.
|
|
1087
|
+
* Renders a `<div>` element.
|
|
1088
|
+
*
|
|
1089
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1090
|
+
*/
|
|
1091
|
+
const NavigationMenuPortal = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuPortal(props, forwardedRef) {
|
|
1092
|
+
const { keepMounted = false, ...portalProps } = props;
|
|
1093
|
+
const { mounted } = useNavigationMenuRootContext();
|
|
1094
|
+
if (!(mounted || keepMounted)) return null;
|
|
1095
|
+
return /*#__PURE__*/ jsx(NavigationMenuPortalContext.Provider, {
|
|
1096
|
+
value: keepMounted,
|
|
1097
|
+
children: /*#__PURE__*/ jsx(FloatingPortal, {
|
|
1098
|
+
ref: forwardedRef,
|
|
1099
|
+
...portalProps
|
|
1100
|
+
})
|
|
1101
|
+
});
|
|
1102
|
+
});
|
|
1103
|
+
NavigationMenuPortal.displayName = "NavigationMenuPortal";
|
|
1104
|
+
//#endregion
|
|
1105
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/positioner/NavigationMenuPositionerContext.mjs
|
|
1106
|
+
const NavigationMenuPositionerContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1107
|
+
NavigationMenuPositionerContext.displayName = "NavigationMenuPositionerContext";
|
|
1108
|
+
function useNavigationMenuPositionerContext(optional = false) {
|
|
1109
|
+
const context = React$1.useContext(NavigationMenuPositionerContext);
|
|
1110
|
+
if (!context && !optional) throw new Error("Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.");
|
|
1111
|
+
return context;
|
|
1112
|
+
}
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/positioner/NavigationMenuPositioner.mjs
|
|
1115
|
+
const EMPTY_ROOT_CONTEXT$1 = getEmptyRootContext();
|
|
1116
|
+
/**
|
|
1117
|
+
* Positions the navigation menu against the currently active trigger.
|
|
1118
|
+
* Renders a `<div>` element.
|
|
1119
|
+
*
|
|
1120
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1121
|
+
*/
|
|
1122
|
+
const NavigationMenuPositioner = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuPositioner(componentProps, forwardedRef) {
|
|
1123
|
+
const { open, mounted, positionerElement, setPositionerElement, floatingRootContext, nested, transitionStatus } = useNavigationMenuRootContext();
|
|
1124
|
+
const { className, render, anchor, positionMethod = "absolute", side = "bottom", align = "center", sideOffset = 0, alignOffset = 0, collisionBoundary = "clipping-ancestors", collisionPadding = 5, collisionAvoidance = nested ? POPUP_COLLISION_AVOIDANCE : DROPDOWN_COLLISION_AVOIDANCE, arrowPadding = 5, sticky = false, disableAnchorTracking = false, style, ...elementProps } = componentProps;
|
|
1125
|
+
const keepMounted = useNavigationMenuPortalContext();
|
|
1126
|
+
const nodeId = useNavigationMenuTreeContext();
|
|
1127
|
+
const initialInstantTimeout = useTimeout();
|
|
1128
|
+
const resizeTimeout = useTimeout();
|
|
1129
|
+
const [instant, setInstant] = React$1.useState(open);
|
|
1130
|
+
const needsInitialInstantResetRef = React$1.useRef(open);
|
|
1131
|
+
const positionerRef = React$1.useRef(null);
|
|
1132
|
+
const prevTriggerElementRef = React$1.useRef(null);
|
|
1133
|
+
React$1.useEffect(() => {
|
|
1134
|
+
if (!positionerElement) return;
|
|
1135
|
+
function onFocus(event) {
|
|
1136
|
+
if (positionerElement && isOutsideEvent(event)) (event.type === "focusin" ? enableFocusInside : disableFocusInside)(positionerElement);
|
|
1137
|
+
}
|
|
1138
|
+
return mergeCleanups(addEventListener(positionerElement, "focusin", onFocus, true), addEventListener(positionerElement, "focusout", onFocus, true));
|
|
1139
|
+
}, [positionerElement]);
|
|
1140
|
+
const domReference = (floatingRootContext || EMPTY_ROOT_CONTEXT$1).useState("domReferenceElement");
|
|
1141
|
+
const positioning = useAnchorPositioning({
|
|
1142
|
+
anchor: anchor ?? domReference ?? prevTriggerElementRef,
|
|
1143
|
+
positionMethod,
|
|
1144
|
+
mounted,
|
|
1145
|
+
side,
|
|
1146
|
+
sideOffset,
|
|
1147
|
+
align,
|
|
1148
|
+
alignOffset,
|
|
1149
|
+
arrowPadding,
|
|
1150
|
+
collisionBoundary,
|
|
1151
|
+
collisionPadding,
|
|
1152
|
+
sticky,
|
|
1153
|
+
disableAnchorTracking,
|
|
1154
|
+
keepMounted,
|
|
1155
|
+
floatingRootContext,
|
|
1156
|
+
collisionAvoidance,
|
|
1157
|
+
nodeId,
|
|
1158
|
+
adaptiveOrigin
|
|
1159
|
+
});
|
|
1160
|
+
const state = {
|
|
1161
|
+
open,
|
|
1162
|
+
side: positioning.side,
|
|
1163
|
+
align: positioning.align,
|
|
1164
|
+
anchorHidden: positioning.anchorHidden,
|
|
1165
|
+
instant
|
|
1166
|
+
};
|
|
1167
|
+
React$1.useEffect(() => {
|
|
1168
|
+
if (!open) return;
|
|
1169
|
+
if (needsInitialInstantResetRef.current) initialInstantTimeout.start(0, () => {
|
|
1170
|
+
needsInitialInstantResetRef.current = false;
|
|
1171
|
+
if (!resizeTimeout.isStarted()) setInstant(false);
|
|
1172
|
+
});
|
|
1173
|
+
function handleResize() {
|
|
1174
|
+
ReactDOM.flushSync(() => {
|
|
1175
|
+
setInstant(true);
|
|
1176
|
+
});
|
|
1177
|
+
resizeTimeout.start(100, () => {
|
|
1178
|
+
setInstant(false);
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
return addEventListener(getWindow(positionerElement), "resize", handleResize);
|
|
1182
|
+
}, [
|
|
1183
|
+
open,
|
|
1184
|
+
initialInstantTimeout,
|
|
1185
|
+
resizeTimeout,
|
|
1186
|
+
positionerElement
|
|
1187
|
+
]);
|
|
1188
|
+
const element = usePositioner(componentProps, state, {
|
|
1189
|
+
styles: positioning.positionerStyles,
|
|
1190
|
+
transitionStatus,
|
|
1191
|
+
props: elementProps,
|
|
1192
|
+
refs: [
|
|
1193
|
+
forwardedRef,
|
|
1194
|
+
setPositionerElement,
|
|
1195
|
+
positionerRef
|
|
1196
|
+
],
|
|
1197
|
+
hidden: !mounted,
|
|
1198
|
+
inert: !open
|
|
1199
|
+
});
|
|
1200
|
+
return /*#__PURE__*/ jsx(NavigationMenuPositionerContext.Provider, {
|
|
1201
|
+
value: positioning,
|
|
1202
|
+
children: element
|
|
1203
|
+
});
|
|
1204
|
+
});
|
|
1205
|
+
NavigationMenuPositioner.displayName = "NavigationMenuPositioner";
|
|
1206
|
+
//#endregion
|
|
1207
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/viewport/NavigationMenuViewport.mjs
|
|
1208
|
+
const EMPTY_ROOT_CONTEXT = getEmptyRootContext();
|
|
1209
|
+
function Guards({ children }) {
|
|
1210
|
+
const { beforeInsideRef, beforeOutsideRef, afterInsideRef, afterOutsideRef, positionerElement, viewportElement, floatingRootContext } = useNavigationMenuRootContext();
|
|
1211
|
+
const hasPositioner = Boolean(useNavigationMenuPositionerContext(true));
|
|
1212
|
+
const referenceElement = positionerElement || viewportElement;
|
|
1213
|
+
if (!floatingRootContext && !hasPositioner) return children;
|
|
1214
|
+
return /*#__PURE__*/ jsxs(React$1.Fragment, { children: [
|
|
1215
|
+
/*#__PURE__*/ jsx(FocusGuard, {
|
|
1216
|
+
ref: beforeInsideRef,
|
|
1217
|
+
onFocus: (event) => {
|
|
1218
|
+
if (referenceElement && isOutsideEvent(event, referenceElement)) getNextTabbable(referenceElement)?.focus();
|
|
1219
|
+
else beforeOutsideRef.current?.focus();
|
|
1220
|
+
}
|
|
1221
|
+
}),
|
|
1222
|
+
children,
|
|
1223
|
+
/*#__PURE__*/ jsx(FocusGuard, {
|
|
1224
|
+
ref: afterInsideRef,
|
|
1225
|
+
onFocus: (event) => {
|
|
1226
|
+
if (referenceElement && isOutsideEvent(event, referenceElement)) getPreviousTabbable(referenceElement)?.focus();
|
|
1227
|
+
else afterOutsideRef.current?.focus();
|
|
1228
|
+
}
|
|
1229
|
+
})
|
|
1230
|
+
] });
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* The clipping viewport of the navigation menu's current content.
|
|
1234
|
+
* Renders a `<div>` element.
|
|
1235
|
+
*
|
|
1236
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1237
|
+
*/
|
|
1238
|
+
const NavigationMenuViewport = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuViewport(componentProps, forwardedRef) {
|
|
1239
|
+
const { render, className, style, children, id: idProp, ...elementProps } = componentProps;
|
|
1240
|
+
const id = useId$1(idProp);
|
|
1241
|
+
const { setViewportElement, setViewportTargetElement, floatingRootContext, prevTriggerElementRef, viewportInert, setViewportInert } = useNavigationMenuRootContext();
|
|
1242
|
+
const positioning = useNavigationMenuPositionerContext(true);
|
|
1243
|
+
const hasPositioner = Boolean(positioning);
|
|
1244
|
+
const domReference = (floatingRootContext || EMPTY_ROOT_CONTEXT).useState("domReferenceElement");
|
|
1245
|
+
useIsoLayoutEffect(() => {
|
|
1246
|
+
if (domReference) prevTriggerElementRef.current = domReference;
|
|
1247
|
+
}, [domReference, prevTriggerElementRef]);
|
|
1248
|
+
const element = useRenderElement("div", componentProps, {
|
|
1249
|
+
ref: [forwardedRef, setViewportElement],
|
|
1250
|
+
props: [{
|
|
1251
|
+
id,
|
|
1252
|
+
onBlur(event) {
|
|
1253
|
+
const relatedTarget = event.relatedTarget;
|
|
1254
|
+
const currentTarget = event.currentTarget;
|
|
1255
|
+
if (relatedTarget && !contains(currentTarget, relatedTarget) && relatedTarget !== domReference) setViewportInert(true);
|
|
1256
|
+
},
|
|
1257
|
+
...!hasPositioner && viewportInert && { inert: inertValue(true) },
|
|
1258
|
+
children: hasPositioner ? children : /*#__PURE__*/ jsx(Guards, { children: /*#__PURE__*/ jsx("div", {
|
|
1259
|
+
ref: setViewportTargetElement,
|
|
1260
|
+
children
|
|
1261
|
+
}) })
|
|
1262
|
+
}, elementProps]
|
|
1263
|
+
});
|
|
1264
|
+
return hasPositioner ? /*#__PURE__*/ jsx(Guards, { children: element }) : element;
|
|
1265
|
+
});
|
|
1266
|
+
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
1267
|
+
//#endregion
|
|
1268
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/backdrop/NavigationMenuBackdrop.mjs
|
|
1269
|
+
const stateAttributesMapping$1 = {
|
|
1270
|
+
...popupStateMapping,
|
|
1271
|
+
...transitionStatusMapping
|
|
1272
|
+
};
|
|
1273
|
+
/**
|
|
1274
|
+
* A backdrop for the navigation menu popup.
|
|
1275
|
+
* Renders a `<div>` element.
|
|
1276
|
+
*
|
|
1277
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1278
|
+
*/
|
|
1279
|
+
const NavigationMenuBackdrop = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuBackdrop(componentProps, forwardedRef) {
|
|
1280
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1281
|
+
const { open, mounted, transitionStatus } = useNavigationMenuRootContext();
|
|
1282
|
+
return useRenderElement("div", componentProps, {
|
|
1283
|
+
state: {
|
|
1284
|
+
open,
|
|
1285
|
+
transitionStatus
|
|
1286
|
+
},
|
|
1287
|
+
ref: forwardedRef,
|
|
1288
|
+
props: [{
|
|
1289
|
+
role: "presentation",
|
|
1290
|
+
hidden: !mounted,
|
|
1291
|
+
style: {
|
|
1292
|
+
userSelect: "none",
|
|
1293
|
+
WebkitUserSelect: "none"
|
|
1294
|
+
}
|
|
1295
|
+
}, elementProps],
|
|
1296
|
+
stateAttributesMapping: stateAttributesMapping$1
|
|
1297
|
+
});
|
|
1298
|
+
});
|
|
1299
|
+
NavigationMenuBackdrop.displayName = "NavigationMenuBackdrop";
|
|
1300
|
+
//#endregion
|
|
1301
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/popup/NavigationMenuPopup.mjs
|
|
1302
|
+
const stateAttributesMapping = {
|
|
1303
|
+
...popupStateMapping,
|
|
1304
|
+
...transitionStatusMapping
|
|
1305
|
+
};
|
|
1306
|
+
/**
|
|
1307
|
+
* A container for the navigation menu contents.
|
|
1308
|
+
* Renders a `<nav>` element.
|
|
1309
|
+
*
|
|
1310
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1311
|
+
*/
|
|
1312
|
+
const NavigationMenuPopup = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuPopup(componentProps, forwardedRef) {
|
|
1313
|
+
const { render, className, style, id: idProp, ...elementProps } = componentProps;
|
|
1314
|
+
const { open, transitionStatus, setPopupElement } = useNavigationMenuRootContext();
|
|
1315
|
+
const positioning = useNavigationMenuPositionerContext();
|
|
1316
|
+
const direction = useDirection();
|
|
1317
|
+
const id = useBaseUiId(idProp);
|
|
1318
|
+
const state = {
|
|
1319
|
+
open,
|
|
1320
|
+
transitionStatus,
|
|
1321
|
+
side: positioning.side,
|
|
1322
|
+
align: positioning.align,
|
|
1323
|
+
anchorHidden: positioning.anchorHidden
|
|
1324
|
+
};
|
|
1325
|
+
let isPhysicalLeft = positioning.side === "left";
|
|
1326
|
+
if (direction === "rtl") isPhysicalLeft = isPhysicalLeft || positioning.side === "inline-end";
|
|
1327
|
+
else isPhysicalLeft = isPhysicalLeft || positioning.side === "inline-start";
|
|
1328
|
+
const isOriginSide = positioning.side === "top" || isPhysicalLeft;
|
|
1329
|
+
return useRenderElement("nav", componentProps, {
|
|
1330
|
+
state,
|
|
1331
|
+
ref: [forwardedRef, setPopupElement],
|
|
1332
|
+
props: [
|
|
1333
|
+
{
|
|
1334
|
+
id,
|
|
1335
|
+
tabIndex: -1,
|
|
1336
|
+
style: isOriginSide ? {
|
|
1337
|
+
position: "absolute",
|
|
1338
|
+
[positioning.side === "top" ? "bottom" : "top"]: "0",
|
|
1339
|
+
[isPhysicalLeft ? "right" : "left"]: "0"
|
|
1340
|
+
} : {}
|
|
1341
|
+
},
|
|
1342
|
+
getDisabledMountTransitionStyles(transitionStatus),
|
|
1343
|
+
elementProps
|
|
1344
|
+
],
|
|
1345
|
+
stateAttributesMapping
|
|
1346
|
+
});
|
|
1347
|
+
});
|
|
1348
|
+
NavigationMenuPopup.displayName = "NavigationMenuPopup";
|
|
1349
|
+
//#endregion
|
|
1350
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/arrow/NavigationMenuArrow.mjs
|
|
1351
|
+
/**
|
|
1352
|
+
* Displays an element pointing toward the navigation menu's current anchor.
|
|
1353
|
+
* Renders a `<div>` element.
|
|
1354
|
+
*
|
|
1355
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1356
|
+
*/
|
|
1357
|
+
const NavigationMenuArrow = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuArrow(componentProps, forwardedRef) {
|
|
1358
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1359
|
+
const { open, transitionStatus } = useNavigationMenuRootContext();
|
|
1360
|
+
const { arrowRef, side, align, arrowUncentered, arrowStyles } = useNavigationMenuPositionerContext();
|
|
1361
|
+
return useRenderElement("div", componentProps, {
|
|
1362
|
+
state: {
|
|
1363
|
+
open,
|
|
1364
|
+
side,
|
|
1365
|
+
align,
|
|
1366
|
+
uncentered: arrowUncentered
|
|
1367
|
+
},
|
|
1368
|
+
ref: [forwardedRef, arrowRef],
|
|
1369
|
+
props: [
|
|
1370
|
+
{
|
|
1371
|
+
style: arrowStyles,
|
|
1372
|
+
"aria-hidden": true
|
|
1373
|
+
},
|
|
1374
|
+
getDisabledMountTransitionStyles(transitionStatus),
|
|
1375
|
+
elementProps
|
|
1376
|
+
],
|
|
1377
|
+
stateAttributesMapping: popupStateMapping
|
|
1378
|
+
});
|
|
1379
|
+
});
|
|
1380
|
+
NavigationMenuArrow.displayName = "NavigationMenuArrow";
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/link/NavigationMenuLink.mjs
|
|
1383
|
+
/**
|
|
1384
|
+
* A link in the navigation menu that can be used to navigate to a different page or section.
|
|
1385
|
+
* Renders an `<a>` element.
|
|
1386
|
+
*
|
|
1387
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1388
|
+
*/
|
|
1389
|
+
const NavigationMenuLink = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuLink(componentProps, forwardedRef) {
|
|
1390
|
+
const { className, render, active = false, closeOnClick = false, style, ...elementProps } = componentProps;
|
|
1391
|
+
const { setValue, popupElement, positionerElement, rootRef } = useNavigationMenuRootContext();
|
|
1392
|
+
const nodeId = useNavigationMenuTreeContext();
|
|
1393
|
+
const tree = useFloatingTree();
|
|
1394
|
+
return /*#__PURE__*/ jsx(CompositeItem, {
|
|
1395
|
+
tag: "a",
|
|
1396
|
+
render,
|
|
1397
|
+
className,
|
|
1398
|
+
style,
|
|
1399
|
+
state: { active },
|
|
1400
|
+
refs: [forwardedRef],
|
|
1401
|
+
props: [{
|
|
1402
|
+
"aria-current": active ? "page" : void 0,
|
|
1403
|
+
tabIndex: void 0,
|
|
1404
|
+
onClick(event) {
|
|
1405
|
+
if (closeOnClick) setValue(null, createChangeEventDetails(linkPress, event.nativeEvent));
|
|
1406
|
+
},
|
|
1407
|
+
onBlur(event) {
|
|
1408
|
+
if (positionerElement && popupElement && isOutsideMenuEvent({
|
|
1409
|
+
currentTarget: event.currentTarget,
|
|
1410
|
+
relatedTarget: event.relatedTarget
|
|
1411
|
+
}, {
|
|
1412
|
+
popupElement,
|
|
1413
|
+
rootRef,
|
|
1414
|
+
tree,
|
|
1415
|
+
nodeId
|
|
1416
|
+
})) setValue(null, createChangeEventDetails(focusOut, event.nativeEvent));
|
|
1417
|
+
}
|
|
1418
|
+
}, elementProps]
|
|
1419
|
+
});
|
|
1420
|
+
});
|
|
1421
|
+
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
1422
|
+
//#endregion
|
|
1423
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/icon/NavigationMenuIcon.mjs
|
|
1424
|
+
/**
|
|
1425
|
+
* An icon that indicates that the trigger button opens a menu.
|
|
1426
|
+
*
|
|
1427
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
1428
|
+
*/
|
|
1429
|
+
const NavigationMenuIcon = /*#__PURE__*/ React$1.forwardRef(function NavigationMenuIcon(componentProps, forwardedRef) {
|
|
1430
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1431
|
+
const { value: itemValue } = useNavigationMenuItemContext();
|
|
1432
|
+
const { open, value } = useNavigationMenuRootContext();
|
|
1433
|
+
return useRenderElement("span", componentProps, {
|
|
1434
|
+
state: { open: open && value === itemValue },
|
|
1435
|
+
ref: forwardedRef,
|
|
1436
|
+
props: [{
|
|
1437
|
+
"aria-hidden": true,
|
|
1438
|
+
children: "▼"
|
|
1439
|
+
}, elementProps],
|
|
1440
|
+
stateAttributesMapping: triggerOpenStateMapping
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1443
|
+
NavigationMenuIcon.displayName = "NavigationMenuIcon";
|
|
1444
|
+
//#endregion
|
|
1445
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.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/navigation-menu/index.parts.mjs
|
|
1446
|
+
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1447
|
+
Arrow: () => NavigationMenuArrow,
|
|
1448
|
+
Backdrop: () => NavigationMenuBackdrop,
|
|
1449
|
+
Content: () => NavigationMenuContent,
|
|
1450
|
+
Icon: () => NavigationMenuIcon,
|
|
1451
|
+
Item: () => NavigationMenuItem,
|
|
1452
|
+
Link: () => NavigationMenuLink,
|
|
1453
|
+
List: () => NavigationMenuList,
|
|
1454
|
+
Popup: () => NavigationMenuPopup,
|
|
1455
|
+
Portal: () => NavigationMenuPortal,
|
|
1456
|
+
Positioner: () => NavigationMenuPositioner,
|
|
1457
|
+
Root: () => NavigationMenuRoot,
|
|
1458
|
+
Trigger: () => NavigationMenuTrigger,
|
|
1459
|
+
Viewport: () => NavigationMenuViewport
|
|
1460
|
+
});
|
|
1461
|
+
//#endregion
|
|
1462
|
+
export { index_parts_exports as t };
|