@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,1558 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { useLayoutEffect } from "react";
|
|
4
|
+
import * as ReactDOM from "react-dom";
|
|
5
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
6
|
+
function hasWindow() {
|
|
7
|
+
return typeof window !== "undefined";
|
|
8
|
+
}
|
|
9
|
+
function getNodeName(node) {
|
|
10
|
+
if (isNode(node)) return (node.nodeName || "").toLowerCase();
|
|
11
|
+
return "#document";
|
|
12
|
+
}
|
|
13
|
+
function getWindow(node) {
|
|
14
|
+
var _node$ownerDocument;
|
|
15
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
16
|
+
}
|
|
17
|
+
function getDocumentElement(node) {
|
|
18
|
+
var _ref;
|
|
19
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
20
|
+
}
|
|
21
|
+
function isNode(value) {
|
|
22
|
+
if (!hasWindow()) return false;
|
|
23
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
24
|
+
}
|
|
25
|
+
function isElement(value) {
|
|
26
|
+
if (!hasWindow()) return false;
|
|
27
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
28
|
+
}
|
|
29
|
+
function isHTMLElement(value) {
|
|
30
|
+
if (!hasWindow()) return false;
|
|
31
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
32
|
+
}
|
|
33
|
+
function isShadowRoot(value) {
|
|
34
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
|
|
35
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
36
|
+
}
|
|
37
|
+
function isOverflowElement(element) {
|
|
38
|
+
const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
|
|
39
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
40
|
+
}
|
|
41
|
+
function isTableElement(element) {
|
|
42
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
43
|
+
}
|
|
44
|
+
function isTopLayer(element) {
|
|
45
|
+
try {
|
|
46
|
+
if (element.matches(":popover-open")) return true;
|
|
47
|
+
} catch (_e) {}
|
|
48
|
+
try {
|
|
49
|
+
return element.matches(":modal");
|
|
50
|
+
} catch (_e) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
55
|
+
const containRe = /paint|layout|strict|content/;
|
|
56
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
57
|
+
let isWebKitValue;
|
|
58
|
+
function isContainingBlock(elementOrCss) {
|
|
59
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
60
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
61
|
+
}
|
|
62
|
+
function getContainingBlock(element) {
|
|
63
|
+
let currentNode = getParentNode(element);
|
|
64
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
65
|
+
if (isContainingBlock(currentNode)) return currentNode;
|
|
66
|
+
else if (isTopLayer(currentNode)) return null;
|
|
67
|
+
currentNode = getParentNode(currentNode);
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
function isWebKit() {
|
|
72
|
+
if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
73
|
+
return isWebKitValue;
|
|
74
|
+
}
|
|
75
|
+
function isLastTraversableNode(node) {
|
|
76
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
77
|
+
}
|
|
78
|
+
function getComputedStyle$1(element) {
|
|
79
|
+
return getWindow(element).getComputedStyle(element);
|
|
80
|
+
}
|
|
81
|
+
function getNodeScroll(element) {
|
|
82
|
+
if (isElement(element)) return {
|
|
83
|
+
scrollLeft: element.scrollLeft,
|
|
84
|
+
scrollTop: element.scrollTop
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
scrollLeft: element.scrollX,
|
|
88
|
+
scrollTop: element.scrollY
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function getParentNode(node) {
|
|
92
|
+
if (getNodeName(node) === "html") return node;
|
|
93
|
+
const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
94
|
+
return isShadowRoot(result) ? result.host : result;
|
|
95
|
+
}
|
|
96
|
+
function getNearestOverflowAncestor(node) {
|
|
97
|
+
const parentNode = getParentNode(node);
|
|
98
|
+
if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
99
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
|
|
100
|
+
return getNearestOverflowAncestor(parentNode);
|
|
101
|
+
}
|
|
102
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
103
|
+
var _node$ownerDocument2;
|
|
104
|
+
if (list === void 0) list = [];
|
|
105
|
+
if (traverseIframes === void 0) traverseIframes = true;
|
|
106
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
107
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
108
|
+
const win = getWindow(scrollableAncestor);
|
|
109
|
+
if (isBody) {
|
|
110
|
+
const frameElement = getFrameElement(win);
|
|
111
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
112
|
+
} else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
113
|
+
}
|
|
114
|
+
function getFrameElement(win) {
|
|
115
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
119
|
+
/**
|
|
120
|
+
* Custom positioning reference element.
|
|
121
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
122
|
+
*/
|
|
123
|
+
const sides = [
|
|
124
|
+
"top",
|
|
125
|
+
"right",
|
|
126
|
+
"bottom",
|
|
127
|
+
"left"
|
|
128
|
+
];
|
|
129
|
+
const min = Math.min;
|
|
130
|
+
const max = Math.max;
|
|
131
|
+
const round = Math.round;
|
|
132
|
+
const floor = Math.floor;
|
|
133
|
+
const createCoords = (v) => ({
|
|
134
|
+
x: v,
|
|
135
|
+
y: v
|
|
136
|
+
});
|
|
137
|
+
const oppositeSideMap = {
|
|
138
|
+
left: "right",
|
|
139
|
+
right: "left",
|
|
140
|
+
bottom: "top",
|
|
141
|
+
top: "bottom"
|
|
142
|
+
};
|
|
143
|
+
function clamp(start, value, end) {
|
|
144
|
+
return max(start, min(value, end));
|
|
145
|
+
}
|
|
146
|
+
function evaluate(value, param) {
|
|
147
|
+
return typeof value === "function" ? value(param) : value;
|
|
148
|
+
}
|
|
149
|
+
function getSide(placement) {
|
|
150
|
+
return placement.split("-")[0];
|
|
151
|
+
}
|
|
152
|
+
function getAlignment(placement) {
|
|
153
|
+
return placement.split("-")[1];
|
|
154
|
+
}
|
|
155
|
+
function getOppositeAxis(axis) {
|
|
156
|
+
return axis === "x" ? "y" : "x";
|
|
157
|
+
}
|
|
158
|
+
function getAxisLength(axis) {
|
|
159
|
+
return axis === "y" ? "height" : "width";
|
|
160
|
+
}
|
|
161
|
+
function getSideAxis(placement) {
|
|
162
|
+
const firstChar = placement[0];
|
|
163
|
+
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
164
|
+
}
|
|
165
|
+
function getAlignmentAxis(placement) {
|
|
166
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
167
|
+
}
|
|
168
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
169
|
+
if (rtl === void 0) rtl = false;
|
|
170
|
+
const alignment = getAlignment(placement);
|
|
171
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
172
|
+
const length = getAxisLength(alignmentAxis);
|
|
173
|
+
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
174
|
+
if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
175
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
176
|
+
}
|
|
177
|
+
function getExpandedPlacements(placement) {
|
|
178
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
179
|
+
return [
|
|
180
|
+
getOppositeAlignmentPlacement(placement),
|
|
181
|
+
oppositePlacement,
|
|
182
|
+
getOppositeAlignmentPlacement(oppositePlacement)
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
186
|
+
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
187
|
+
}
|
|
188
|
+
const lrPlacement = ["left", "right"];
|
|
189
|
+
const rlPlacement = ["right", "left"];
|
|
190
|
+
const tbPlacement = ["top", "bottom"];
|
|
191
|
+
const btPlacement = ["bottom", "top"];
|
|
192
|
+
function getSideList(side, isStart, rtl) {
|
|
193
|
+
switch (side) {
|
|
194
|
+
case "top":
|
|
195
|
+
case "bottom":
|
|
196
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
197
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
198
|
+
case "left":
|
|
199
|
+
case "right": return isStart ? tbPlacement : btPlacement;
|
|
200
|
+
default: return [];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
204
|
+
const alignment = getAlignment(placement);
|
|
205
|
+
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
206
|
+
if (alignment) {
|
|
207
|
+
list = list.map((side) => side + "-" + alignment);
|
|
208
|
+
if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
209
|
+
}
|
|
210
|
+
return list;
|
|
211
|
+
}
|
|
212
|
+
function getOppositePlacement(placement) {
|
|
213
|
+
const side = getSide(placement);
|
|
214
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
215
|
+
}
|
|
216
|
+
function expandPaddingObject(padding) {
|
|
217
|
+
return {
|
|
218
|
+
top: 0,
|
|
219
|
+
right: 0,
|
|
220
|
+
bottom: 0,
|
|
221
|
+
left: 0,
|
|
222
|
+
...padding
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function getPaddingObject(padding) {
|
|
226
|
+
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
227
|
+
top: padding,
|
|
228
|
+
right: padding,
|
|
229
|
+
bottom: padding,
|
|
230
|
+
left: padding
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function rectToClientRect(rect) {
|
|
234
|
+
const { x, y, width, height } = rect;
|
|
235
|
+
return {
|
|
236
|
+
width,
|
|
237
|
+
height,
|
|
238
|
+
top: y,
|
|
239
|
+
left: x,
|
|
240
|
+
right: x + width,
|
|
241
|
+
bottom: y + height,
|
|
242
|
+
x,
|
|
243
|
+
y
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
248
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
249
|
+
let { reference, floating } = _ref;
|
|
250
|
+
const sideAxis = getSideAxis(placement);
|
|
251
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
252
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
253
|
+
const side = getSide(placement);
|
|
254
|
+
const isVertical = sideAxis === "y";
|
|
255
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
256
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
257
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
258
|
+
let coords;
|
|
259
|
+
switch (side) {
|
|
260
|
+
case "top":
|
|
261
|
+
coords = {
|
|
262
|
+
x: commonX,
|
|
263
|
+
y: reference.y - floating.height
|
|
264
|
+
};
|
|
265
|
+
break;
|
|
266
|
+
case "bottom":
|
|
267
|
+
coords = {
|
|
268
|
+
x: commonX,
|
|
269
|
+
y: reference.y + reference.height
|
|
270
|
+
};
|
|
271
|
+
break;
|
|
272
|
+
case "right":
|
|
273
|
+
coords = {
|
|
274
|
+
x: reference.x + reference.width,
|
|
275
|
+
y: commonY
|
|
276
|
+
};
|
|
277
|
+
break;
|
|
278
|
+
case "left":
|
|
279
|
+
coords = {
|
|
280
|
+
x: reference.x - floating.width,
|
|
281
|
+
y: commonY
|
|
282
|
+
};
|
|
283
|
+
break;
|
|
284
|
+
default: coords = {
|
|
285
|
+
x: reference.x,
|
|
286
|
+
y: reference.y
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
switch (getAlignment(placement)) {
|
|
290
|
+
case "start":
|
|
291
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
292
|
+
break;
|
|
293
|
+
case "end":
|
|
294
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
return coords;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
301
|
+
* element is overflowing a given clipping boundary on each side.
|
|
302
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
303
|
+
* - negative = how many pixels left before it will overflow
|
|
304
|
+
* - 0 = lies flush with the boundary
|
|
305
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
306
|
+
*/
|
|
307
|
+
async function detectOverflow(state, options) {
|
|
308
|
+
var _await$platform$isEle;
|
|
309
|
+
if (options === void 0) options = {};
|
|
310
|
+
const { x, y, platform, rects, elements, strategy } = state;
|
|
311
|
+
const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
|
|
312
|
+
const paddingObject = getPaddingObject(padding);
|
|
313
|
+
const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
|
|
314
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
315
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
|
|
316
|
+
boundary,
|
|
317
|
+
rootBoundary,
|
|
318
|
+
strategy
|
|
319
|
+
}));
|
|
320
|
+
const rect = elementContext === "floating" ? {
|
|
321
|
+
x,
|
|
322
|
+
y,
|
|
323
|
+
width: rects.floating.width,
|
|
324
|
+
height: rects.floating.height
|
|
325
|
+
} : rects.reference;
|
|
326
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
327
|
+
const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
|
|
328
|
+
x: 1,
|
|
329
|
+
y: 1
|
|
330
|
+
} : {
|
|
331
|
+
x: 1,
|
|
332
|
+
y: 1
|
|
333
|
+
};
|
|
334
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
335
|
+
elements,
|
|
336
|
+
rect,
|
|
337
|
+
offsetParent,
|
|
338
|
+
strategy
|
|
339
|
+
}) : rect);
|
|
340
|
+
return {
|
|
341
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
342
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
343
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
344
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
const MAX_RESET_COUNT = 50;
|
|
348
|
+
/**
|
|
349
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
350
|
+
* next to a given reference element.
|
|
351
|
+
*
|
|
352
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
353
|
+
* write one for the platform you are using Floating UI with.
|
|
354
|
+
*/
|
|
355
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
356
|
+
const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
|
|
357
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
358
|
+
...platform,
|
|
359
|
+
detectOverflow
|
|
360
|
+
};
|
|
361
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
362
|
+
let rects = await platform.getElementRects({
|
|
363
|
+
reference,
|
|
364
|
+
floating,
|
|
365
|
+
strategy
|
|
366
|
+
});
|
|
367
|
+
let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
|
|
368
|
+
let statefulPlacement = placement;
|
|
369
|
+
let resetCount = 0;
|
|
370
|
+
const middlewareData = {};
|
|
371
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
372
|
+
const currentMiddleware = middleware[i];
|
|
373
|
+
if (!currentMiddleware) continue;
|
|
374
|
+
const { name, fn } = currentMiddleware;
|
|
375
|
+
const { x: nextX, y: nextY, data, reset } = await fn({
|
|
376
|
+
x,
|
|
377
|
+
y,
|
|
378
|
+
initialPlacement: placement,
|
|
379
|
+
placement: statefulPlacement,
|
|
380
|
+
strategy,
|
|
381
|
+
middlewareData,
|
|
382
|
+
rects,
|
|
383
|
+
platform: platformWithDetectOverflow,
|
|
384
|
+
elements: {
|
|
385
|
+
reference,
|
|
386
|
+
floating
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
x = nextX != null ? nextX : x;
|
|
390
|
+
y = nextY != null ? nextY : y;
|
|
391
|
+
middlewareData[name] = {
|
|
392
|
+
...middlewareData[name],
|
|
393
|
+
...data
|
|
394
|
+
};
|
|
395
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
396
|
+
resetCount++;
|
|
397
|
+
if (typeof reset === "object") {
|
|
398
|
+
if (reset.placement) statefulPlacement = reset.placement;
|
|
399
|
+
if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
|
|
400
|
+
reference,
|
|
401
|
+
floating,
|
|
402
|
+
strategy
|
|
403
|
+
}) : reset.rects;
|
|
404
|
+
({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
405
|
+
}
|
|
406
|
+
i = -1;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
x,
|
|
411
|
+
y,
|
|
412
|
+
placement: statefulPlacement,
|
|
413
|
+
strategy,
|
|
414
|
+
middlewareData
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
419
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
420
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
421
|
+
* @see https://floating-ui.com/docs/flip
|
|
422
|
+
*/
|
|
423
|
+
const flip$2 = function(options) {
|
|
424
|
+
if (options === void 0) options = {};
|
|
425
|
+
return {
|
|
426
|
+
name: "flip",
|
|
427
|
+
options,
|
|
428
|
+
async fn(state) {
|
|
429
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
430
|
+
const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
|
|
431
|
+
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
|
|
432
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
433
|
+
const side = getSide(placement);
|
|
434
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
435
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
436
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
437
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
438
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
439
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
440
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
441
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
442
|
+
const overflows = [];
|
|
443
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
444
|
+
if (checkMainAxis) overflows.push(overflow[side]);
|
|
445
|
+
if (checkCrossAxis) {
|
|
446
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
447
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
448
|
+
}
|
|
449
|
+
overflowsData = [...overflowsData, {
|
|
450
|
+
placement,
|
|
451
|
+
overflows
|
|
452
|
+
}];
|
|
453
|
+
if (!overflows.every((side) => side <= 0)) {
|
|
454
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
455
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
456
|
+
const nextPlacement = placements[nextIndex];
|
|
457
|
+
if (nextPlacement) {
|
|
458
|
+
if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
|
|
459
|
+
data: {
|
|
460
|
+
index: nextIndex,
|
|
461
|
+
overflows: overflowsData
|
|
462
|
+
},
|
|
463
|
+
reset: { placement: nextPlacement }
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
467
|
+
if (!resetPlacement) switch (fallbackStrategy) {
|
|
468
|
+
case "bestFit": {
|
|
469
|
+
var _overflowsData$filter2;
|
|
470
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
471
|
+
if (hasFallbackAxisSideDirection) {
|
|
472
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
473
|
+
return currentSideAxis === initialSideAxis || currentSideAxis === "y";
|
|
474
|
+
}
|
|
475
|
+
return true;
|
|
476
|
+
}).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
477
|
+
if (placement) resetPlacement = placement;
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
case "initialPlacement":
|
|
481
|
+
resetPlacement = initialPlacement;
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
|
|
485
|
+
}
|
|
486
|
+
return {};
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
function getSideOffsets(overflow, rect) {
|
|
491
|
+
return {
|
|
492
|
+
top: overflow.top - rect.height,
|
|
493
|
+
right: overflow.right - rect.width,
|
|
494
|
+
bottom: overflow.bottom - rect.height,
|
|
495
|
+
left: overflow.left - rect.width
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
function isAnySideFullyClipped(overflow) {
|
|
499
|
+
return sides.some((side) => overflow[side] >= 0);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
503
|
+
* when it is not in the same clipping context as the reference element.
|
|
504
|
+
* @see https://floating-ui.com/docs/hide
|
|
505
|
+
*/
|
|
506
|
+
const hide$2 = function(options) {
|
|
507
|
+
if (options === void 0) options = {};
|
|
508
|
+
return {
|
|
509
|
+
name: "hide",
|
|
510
|
+
options,
|
|
511
|
+
async fn(state) {
|
|
512
|
+
const { rects, platform } = state;
|
|
513
|
+
const { strategy = "referenceHidden", ...detectOverflowOptions } = evaluate(options, state);
|
|
514
|
+
switch (strategy) {
|
|
515
|
+
case "referenceHidden": {
|
|
516
|
+
const offsets = getSideOffsets(await platform.detectOverflow(state, {
|
|
517
|
+
...detectOverflowOptions,
|
|
518
|
+
elementContext: "reference"
|
|
519
|
+
}), rects.reference);
|
|
520
|
+
return { data: {
|
|
521
|
+
referenceHiddenOffsets: offsets,
|
|
522
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
523
|
+
} };
|
|
524
|
+
}
|
|
525
|
+
case "escaped": {
|
|
526
|
+
const offsets = getSideOffsets(await platform.detectOverflow(state, {
|
|
527
|
+
...detectOverflowOptions,
|
|
528
|
+
altBoundary: true
|
|
529
|
+
}), rects.floating);
|
|
530
|
+
return { data: {
|
|
531
|
+
escapedOffsets: offsets,
|
|
532
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
533
|
+
} };
|
|
534
|
+
}
|
|
535
|
+
default: return {};
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
const originSides = /*#__PURE__*/ new Set(["left", "top"]);
|
|
541
|
+
async function convertValueToCoords(state, options) {
|
|
542
|
+
const { placement, platform, elements } = state;
|
|
543
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
544
|
+
const side = getSide(placement);
|
|
545
|
+
const alignment = getAlignment(placement);
|
|
546
|
+
const isVertical = getSideAxis(placement) === "y";
|
|
547
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
548
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
549
|
+
const rawValue = evaluate(options, state);
|
|
550
|
+
let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
|
|
551
|
+
mainAxis: rawValue,
|
|
552
|
+
crossAxis: 0,
|
|
553
|
+
alignmentAxis: null
|
|
554
|
+
} : {
|
|
555
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
556
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
557
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
558
|
+
};
|
|
559
|
+
if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
560
|
+
return isVertical ? {
|
|
561
|
+
x: crossAxis * crossAxisMulti,
|
|
562
|
+
y: mainAxis * mainAxisMulti
|
|
563
|
+
} : {
|
|
564
|
+
x: mainAxis * mainAxisMulti,
|
|
565
|
+
y: crossAxis * crossAxisMulti
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Modifies the placement by translating the floating element along the
|
|
570
|
+
* specified axes.
|
|
571
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
572
|
+
* object may be passed.
|
|
573
|
+
* @see https://floating-ui.com/docs/offset
|
|
574
|
+
*/
|
|
575
|
+
const offset$2 = function(options) {
|
|
576
|
+
if (options === void 0) options = 0;
|
|
577
|
+
return {
|
|
578
|
+
name: "offset",
|
|
579
|
+
options,
|
|
580
|
+
async fn(state) {
|
|
581
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
582
|
+
const { x, y, placement, middlewareData } = state;
|
|
583
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
584
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
585
|
+
return {
|
|
586
|
+
x: x + diffCoords.x,
|
|
587
|
+
y: y + diffCoords.y,
|
|
588
|
+
data: {
|
|
589
|
+
...diffCoords,
|
|
590
|
+
placement
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
/**
|
|
597
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
598
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
599
|
+
* @see https://floating-ui.com/docs/shift
|
|
600
|
+
*/
|
|
601
|
+
const shift$2 = function(options) {
|
|
602
|
+
if (options === void 0) options = {};
|
|
603
|
+
return {
|
|
604
|
+
name: "shift",
|
|
605
|
+
options,
|
|
606
|
+
async fn(state) {
|
|
607
|
+
const { x, y, placement, platform } = state;
|
|
608
|
+
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
|
|
609
|
+
let { x, y } = _ref;
|
|
610
|
+
return {
|
|
611
|
+
x,
|
|
612
|
+
y
|
|
613
|
+
};
|
|
614
|
+
} }, ...detectOverflowOptions } = evaluate(options, state);
|
|
615
|
+
const coords = {
|
|
616
|
+
x,
|
|
617
|
+
y
|
|
618
|
+
};
|
|
619
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
620
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
621
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
622
|
+
let mainAxisCoord = coords[mainAxis];
|
|
623
|
+
let crossAxisCoord = coords[crossAxis];
|
|
624
|
+
if (checkMainAxis) {
|
|
625
|
+
const minSide = mainAxis === "y" ? "top" : "left";
|
|
626
|
+
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
627
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
628
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
629
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
630
|
+
}
|
|
631
|
+
if (checkCrossAxis) {
|
|
632
|
+
const minSide = crossAxis === "y" ? "top" : "left";
|
|
633
|
+
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
634
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
635
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
636
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
637
|
+
}
|
|
638
|
+
const limitedCoords = limiter.fn({
|
|
639
|
+
...state,
|
|
640
|
+
[mainAxis]: mainAxisCoord,
|
|
641
|
+
[crossAxis]: crossAxisCoord
|
|
642
|
+
});
|
|
643
|
+
return {
|
|
644
|
+
...limitedCoords,
|
|
645
|
+
data: {
|
|
646
|
+
x: limitedCoords.x - x,
|
|
647
|
+
y: limitedCoords.y - y,
|
|
648
|
+
enabled: {
|
|
649
|
+
[mainAxis]: checkMainAxis,
|
|
650
|
+
[crossAxis]: checkCrossAxis
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
/**
|
|
658
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
659
|
+
*/
|
|
660
|
+
const limitShift$2 = function(options) {
|
|
661
|
+
if (options === void 0) options = {};
|
|
662
|
+
return {
|
|
663
|
+
options,
|
|
664
|
+
fn(state) {
|
|
665
|
+
const { x, y, placement, rects, middlewareData } = state;
|
|
666
|
+
const { offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = evaluate(options, state);
|
|
667
|
+
const coords = {
|
|
668
|
+
x,
|
|
669
|
+
y
|
|
670
|
+
};
|
|
671
|
+
const crossAxis = getSideAxis(placement);
|
|
672
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
673
|
+
let mainAxisCoord = coords[mainAxis];
|
|
674
|
+
let crossAxisCoord = coords[crossAxis];
|
|
675
|
+
const rawOffset = evaluate(offset, state);
|
|
676
|
+
const computedOffset = typeof rawOffset === "number" ? {
|
|
677
|
+
mainAxis: rawOffset,
|
|
678
|
+
crossAxis: 0
|
|
679
|
+
} : {
|
|
680
|
+
mainAxis: 0,
|
|
681
|
+
crossAxis: 0,
|
|
682
|
+
...rawOffset
|
|
683
|
+
};
|
|
684
|
+
if (checkMainAxis) {
|
|
685
|
+
const len = mainAxis === "y" ? "height" : "width";
|
|
686
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
687
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
688
|
+
if (mainAxisCoord < limitMin) mainAxisCoord = limitMin;
|
|
689
|
+
else if (mainAxisCoord > limitMax) mainAxisCoord = limitMax;
|
|
690
|
+
}
|
|
691
|
+
if (checkCrossAxis) {
|
|
692
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
693
|
+
const len = mainAxis === "y" ? "width" : "height";
|
|
694
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
695
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
696
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
697
|
+
if (crossAxisCoord < limitMin) crossAxisCoord = limitMin;
|
|
698
|
+
else if (crossAxisCoord > limitMax) crossAxisCoord = limitMax;
|
|
699
|
+
}
|
|
700
|
+
return {
|
|
701
|
+
[mainAxis]: mainAxisCoord,
|
|
702
|
+
[crossAxis]: crossAxisCoord
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* Provides data that allows you to change the size of the floating element —
|
|
709
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
710
|
+
* width of the reference element.
|
|
711
|
+
* @see https://floating-ui.com/docs/size
|
|
712
|
+
*/
|
|
713
|
+
const size$2 = function(options) {
|
|
714
|
+
if (options === void 0) options = {};
|
|
715
|
+
return {
|
|
716
|
+
name: "size",
|
|
717
|
+
options,
|
|
718
|
+
async fn(state) {
|
|
719
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
720
|
+
const { placement, rects, platform, elements } = state;
|
|
721
|
+
const { apply = () => {}, ...detectOverflowOptions } = evaluate(options, state);
|
|
722
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
723
|
+
const side = getSide(placement);
|
|
724
|
+
const alignment = getAlignment(placement);
|
|
725
|
+
const isYAxis = getSideAxis(placement) === "y";
|
|
726
|
+
const { width, height } = rects.floating;
|
|
727
|
+
let heightSide;
|
|
728
|
+
let widthSide;
|
|
729
|
+
if (side === "top" || side === "bottom") {
|
|
730
|
+
heightSide = side;
|
|
731
|
+
widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
732
|
+
} else {
|
|
733
|
+
widthSide = side;
|
|
734
|
+
heightSide = alignment === "end" ? "top" : "bottom";
|
|
735
|
+
}
|
|
736
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
737
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
738
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
739
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
740
|
+
const noShift = !state.middlewareData.shift;
|
|
741
|
+
let availableHeight = overflowAvailableHeight;
|
|
742
|
+
let availableWidth = overflowAvailableWidth;
|
|
743
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) availableWidth = maximumClippingWidth;
|
|
744
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) availableHeight = maximumClippingHeight;
|
|
745
|
+
if (noShift && !alignment) {
|
|
746
|
+
const xMin = max(overflow.left, 0);
|
|
747
|
+
const xMax = max(overflow.right, 0);
|
|
748
|
+
const yMin = max(overflow.top, 0);
|
|
749
|
+
const yMax = max(overflow.bottom, 0);
|
|
750
|
+
if (isYAxis) availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
751
|
+
else availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
752
|
+
}
|
|
753
|
+
await apply({
|
|
754
|
+
...state,
|
|
755
|
+
availableWidth,
|
|
756
|
+
availableHeight
|
|
757
|
+
});
|
|
758
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
759
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
|
|
760
|
+
return {};
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
//#endregion
|
|
765
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
766
|
+
function getCssDimensions(element) {
|
|
767
|
+
const css = getComputedStyle$1(element);
|
|
768
|
+
let width = parseFloat(css.width) || 0;
|
|
769
|
+
let height = parseFloat(css.height) || 0;
|
|
770
|
+
const hasOffset = isHTMLElement(element);
|
|
771
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
772
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
773
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
774
|
+
if (shouldFallback) {
|
|
775
|
+
width = offsetWidth;
|
|
776
|
+
height = offsetHeight;
|
|
777
|
+
}
|
|
778
|
+
return {
|
|
779
|
+
width,
|
|
780
|
+
height,
|
|
781
|
+
$: shouldFallback
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
function unwrapElement(element) {
|
|
785
|
+
return !isElement(element) ? element.contextElement : element;
|
|
786
|
+
}
|
|
787
|
+
function getScale(element) {
|
|
788
|
+
const domElement = unwrapElement(element);
|
|
789
|
+
if (!isHTMLElement(domElement)) return createCoords(1);
|
|
790
|
+
const rect = domElement.getBoundingClientRect();
|
|
791
|
+
const { width, height, $ } = getCssDimensions(domElement);
|
|
792
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
793
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
794
|
+
if (!x || !Number.isFinite(x)) x = 1;
|
|
795
|
+
if (!y || !Number.isFinite(y)) y = 1;
|
|
796
|
+
return {
|
|
797
|
+
x,
|
|
798
|
+
y
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
const noOffsets = /*#__PURE__*/ createCoords(0);
|
|
802
|
+
function getVisualOffsets(element) {
|
|
803
|
+
const win = getWindow(element);
|
|
804
|
+
if (!isWebKit() || !win.visualViewport) return noOffsets;
|
|
805
|
+
return {
|
|
806
|
+
x: win.visualViewport.offsetLeft,
|
|
807
|
+
y: win.visualViewport.offsetTop
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
811
|
+
if (isFixed === void 0) isFixed = false;
|
|
812
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
|
|
813
|
+
return isFixed;
|
|
814
|
+
}
|
|
815
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
816
|
+
if (includeScale === void 0) includeScale = false;
|
|
817
|
+
if (isFixedStrategy === void 0) isFixedStrategy = false;
|
|
818
|
+
const clientRect = element.getBoundingClientRect();
|
|
819
|
+
const domElement = unwrapElement(element);
|
|
820
|
+
let scale = createCoords(1);
|
|
821
|
+
if (includeScale) if (offsetParent) {
|
|
822
|
+
if (isElement(offsetParent)) scale = getScale(offsetParent);
|
|
823
|
+
} else scale = getScale(element);
|
|
824
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
825
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
826
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
827
|
+
let width = clientRect.width / scale.x;
|
|
828
|
+
let height = clientRect.height / scale.y;
|
|
829
|
+
if (domElement) {
|
|
830
|
+
const win = getWindow(domElement);
|
|
831
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
832
|
+
let currentWin = win;
|
|
833
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
834
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
835
|
+
const iframeScale = getScale(currentIFrame);
|
|
836
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
837
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
838
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
839
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
840
|
+
x *= iframeScale.x;
|
|
841
|
+
y *= iframeScale.y;
|
|
842
|
+
width *= iframeScale.x;
|
|
843
|
+
height *= iframeScale.y;
|
|
844
|
+
x += left;
|
|
845
|
+
y += top;
|
|
846
|
+
currentWin = getWindow(currentIFrame);
|
|
847
|
+
currentIFrame = getFrameElement(currentWin);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
return rectToClientRect({
|
|
851
|
+
width,
|
|
852
|
+
height,
|
|
853
|
+
x,
|
|
854
|
+
y
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
function getWindowScrollBarX(element, rect) {
|
|
858
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
859
|
+
if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
860
|
+
return rect.left + leftScroll;
|
|
861
|
+
}
|
|
862
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
863
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
864
|
+
return {
|
|
865
|
+
x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
|
|
866
|
+
y: htmlRect.top + scroll.scrollTop
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
870
|
+
let { elements, rect, offsetParent, strategy } = _ref;
|
|
871
|
+
const isFixed = strategy === "fixed";
|
|
872
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
873
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
874
|
+
if (offsetParent === documentElement || topLayer && isFixed) return rect;
|
|
875
|
+
let scroll = {
|
|
876
|
+
scrollLeft: 0,
|
|
877
|
+
scrollTop: 0
|
|
878
|
+
};
|
|
879
|
+
let scale = createCoords(1);
|
|
880
|
+
const offsets = createCoords(0);
|
|
881
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
882
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
883
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
884
|
+
if (isOffsetParentAnElement) {
|
|
885
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
886
|
+
scale = getScale(offsetParent);
|
|
887
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
888
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
892
|
+
return {
|
|
893
|
+
width: rect.width * scale.x,
|
|
894
|
+
height: rect.height * scale.y,
|
|
895
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
896
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
function getClientRects(element) {
|
|
900
|
+
return Array.from(element.getClientRects());
|
|
901
|
+
}
|
|
902
|
+
function getDocumentRect(element) {
|
|
903
|
+
const html = getDocumentElement(element);
|
|
904
|
+
const scroll = getNodeScroll(element);
|
|
905
|
+
const body = element.ownerDocument.body;
|
|
906
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
907
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
908
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
909
|
+
const y = -scroll.scrollTop;
|
|
910
|
+
if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
|
|
911
|
+
return {
|
|
912
|
+
width,
|
|
913
|
+
height,
|
|
914
|
+
x,
|
|
915
|
+
y
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
const SCROLLBAR_MAX = 25;
|
|
919
|
+
function getViewportRect(element, strategy) {
|
|
920
|
+
const win = getWindow(element);
|
|
921
|
+
const html = getDocumentElement(element);
|
|
922
|
+
const visualViewport = win.visualViewport;
|
|
923
|
+
let width = html.clientWidth;
|
|
924
|
+
let height = html.clientHeight;
|
|
925
|
+
let x = 0;
|
|
926
|
+
let y = 0;
|
|
927
|
+
if (visualViewport) {
|
|
928
|
+
width = visualViewport.width;
|
|
929
|
+
height = visualViewport.height;
|
|
930
|
+
const visualViewportBased = isWebKit();
|
|
931
|
+
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
932
|
+
x = visualViewport.offsetLeft;
|
|
933
|
+
y = visualViewport.offsetTop;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
937
|
+
if (windowScrollbarX <= 0) {
|
|
938
|
+
const doc = html.ownerDocument;
|
|
939
|
+
const body = doc.body;
|
|
940
|
+
const bodyStyles = getComputedStyle(body);
|
|
941
|
+
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
942
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
943
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
|
|
944
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
|
|
945
|
+
return {
|
|
946
|
+
width,
|
|
947
|
+
height,
|
|
948
|
+
x,
|
|
949
|
+
y
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
953
|
+
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
954
|
+
const top = clientRect.top + element.clientTop;
|
|
955
|
+
const left = clientRect.left + element.clientLeft;
|
|
956
|
+
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
957
|
+
return {
|
|
958
|
+
width: element.clientWidth * scale.x,
|
|
959
|
+
height: element.clientHeight * scale.y,
|
|
960
|
+
x: left * scale.x,
|
|
961
|
+
y: top * scale.y
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
965
|
+
let rect;
|
|
966
|
+
if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
|
|
967
|
+
else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
|
|
968
|
+
else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
969
|
+
else {
|
|
970
|
+
const visualOffsets = getVisualOffsets(element);
|
|
971
|
+
rect = {
|
|
972
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
973
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
974
|
+
width: clippingAncestor.width,
|
|
975
|
+
height: clippingAncestor.height
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
return rectToClientRect(rect);
|
|
979
|
+
}
|
|
980
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
981
|
+
const parentNode = getParentNode(element);
|
|
982
|
+
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
|
|
983
|
+
return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
984
|
+
}
|
|
985
|
+
function getClippingElementAncestors(element, cache) {
|
|
986
|
+
const cachedResult = cache.get(element);
|
|
987
|
+
if (cachedResult) return cachedResult;
|
|
988
|
+
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
989
|
+
let currentContainingBlockComputedStyle = null;
|
|
990
|
+
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
991
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
992
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
993
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
994
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
995
|
+
if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
|
|
996
|
+
if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
|
|
997
|
+
else currentContainingBlockComputedStyle = computedStyle;
|
|
998
|
+
currentNode = getParentNode(currentNode);
|
|
999
|
+
}
|
|
1000
|
+
cache.set(element, result);
|
|
1001
|
+
return result;
|
|
1002
|
+
}
|
|
1003
|
+
function getClippingRect(_ref) {
|
|
1004
|
+
let { element, boundary, rootBoundary, strategy } = _ref;
|
|
1005
|
+
const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
|
|
1006
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
1007
|
+
let top = firstRect.top;
|
|
1008
|
+
let right = firstRect.right;
|
|
1009
|
+
let bottom = firstRect.bottom;
|
|
1010
|
+
let left = firstRect.left;
|
|
1011
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
1012
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
1013
|
+
top = max(rect.top, top);
|
|
1014
|
+
right = min(rect.right, right);
|
|
1015
|
+
bottom = min(rect.bottom, bottom);
|
|
1016
|
+
left = max(rect.left, left);
|
|
1017
|
+
}
|
|
1018
|
+
return {
|
|
1019
|
+
width: right - left,
|
|
1020
|
+
height: bottom - top,
|
|
1021
|
+
x: left,
|
|
1022
|
+
y: top
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
function getDimensions(element) {
|
|
1026
|
+
const { width, height } = getCssDimensions(element);
|
|
1027
|
+
return {
|
|
1028
|
+
width,
|
|
1029
|
+
height
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1033
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1034
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1035
|
+
const isFixed = strategy === "fixed";
|
|
1036
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1037
|
+
let scroll = {
|
|
1038
|
+
scrollLeft: 0,
|
|
1039
|
+
scrollTop: 0
|
|
1040
|
+
};
|
|
1041
|
+
const offsets = createCoords(0);
|
|
1042
|
+
function setLeftRTLScrollbarOffset() {
|
|
1043
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1044
|
+
}
|
|
1045
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1046
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
1047
|
+
if (isOffsetParentAnElement) {
|
|
1048
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1049
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1050
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1051
|
+
} else if (documentElement) setLeftRTLScrollbarOffset();
|
|
1052
|
+
}
|
|
1053
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
|
|
1054
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1055
|
+
return {
|
|
1056
|
+
x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
|
|
1057
|
+
y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
|
|
1058
|
+
width: rect.width,
|
|
1059
|
+
height: rect.height
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function isStaticPositioned(element) {
|
|
1063
|
+
return getComputedStyle$1(element).position === "static";
|
|
1064
|
+
}
|
|
1065
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
1066
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
|
|
1067
|
+
if (polyfill) return polyfill(element);
|
|
1068
|
+
let rawOffsetParent = element.offsetParent;
|
|
1069
|
+
if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1070
|
+
return rawOffsetParent;
|
|
1071
|
+
}
|
|
1072
|
+
function getOffsetParent(element, polyfill) {
|
|
1073
|
+
const win = getWindow(element);
|
|
1074
|
+
if (isTopLayer(element)) return win;
|
|
1075
|
+
if (!isHTMLElement(element)) {
|
|
1076
|
+
let svgOffsetParent = getParentNode(element);
|
|
1077
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1078
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
|
|
1079
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1080
|
+
}
|
|
1081
|
+
return win;
|
|
1082
|
+
}
|
|
1083
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1084
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1085
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
|
|
1086
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
1087
|
+
}
|
|
1088
|
+
const getElementRects = async function(data) {
|
|
1089
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1090
|
+
const getDimensionsFn = this.getDimensions;
|
|
1091
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1092
|
+
return {
|
|
1093
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1094
|
+
floating: {
|
|
1095
|
+
x: 0,
|
|
1096
|
+
y: 0,
|
|
1097
|
+
width: floatingDimensions.width,
|
|
1098
|
+
height: floatingDimensions.height
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
function isRTL(element) {
|
|
1103
|
+
return getComputedStyle$1(element).direction === "rtl";
|
|
1104
|
+
}
|
|
1105
|
+
const platform = {
|
|
1106
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1107
|
+
getDocumentElement,
|
|
1108
|
+
getClippingRect,
|
|
1109
|
+
getOffsetParent,
|
|
1110
|
+
getElementRects,
|
|
1111
|
+
getClientRects,
|
|
1112
|
+
getDimensions,
|
|
1113
|
+
getScale,
|
|
1114
|
+
isElement,
|
|
1115
|
+
isRTL
|
|
1116
|
+
};
|
|
1117
|
+
function rectsAreEqual(a, b) {
|
|
1118
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1119
|
+
}
|
|
1120
|
+
function observeMove(element, onMove) {
|
|
1121
|
+
let io = null;
|
|
1122
|
+
let timeoutId;
|
|
1123
|
+
const root = getDocumentElement(element);
|
|
1124
|
+
function cleanup() {
|
|
1125
|
+
var _io;
|
|
1126
|
+
clearTimeout(timeoutId);
|
|
1127
|
+
(_io = io) == null || _io.disconnect();
|
|
1128
|
+
io = null;
|
|
1129
|
+
}
|
|
1130
|
+
function refresh(skip, threshold) {
|
|
1131
|
+
if (skip === void 0) skip = false;
|
|
1132
|
+
if (threshold === void 0) threshold = 1;
|
|
1133
|
+
cleanup();
|
|
1134
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1135
|
+
const { left, top, width, height } = elementRectForRootMargin;
|
|
1136
|
+
if (!skip) onMove();
|
|
1137
|
+
if (!width || !height) return;
|
|
1138
|
+
const insetTop = floor(top);
|
|
1139
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
1140
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1141
|
+
const insetLeft = floor(left);
|
|
1142
|
+
const options = {
|
|
1143
|
+
rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
|
|
1144
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
1145
|
+
};
|
|
1146
|
+
let isFirstUpdate = true;
|
|
1147
|
+
function handleObserve(entries) {
|
|
1148
|
+
const ratio = entries[0].intersectionRatio;
|
|
1149
|
+
if (ratio !== threshold) {
|
|
1150
|
+
if (!isFirstUpdate) return refresh();
|
|
1151
|
+
if (!ratio) timeoutId = setTimeout(() => {
|
|
1152
|
+
refresh(false, 1e-7);
|
|
1153
|
+
}, 1e3);
|
|
1154
|
+
else refresh(false, ratio);
|
|
1155
|
+
}
|
|
1156
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
|
|
1157
|
+
isFirstUpdate = false;
|
|
1158
|
+
}
|
|
1159
|
+
try {
|
|
1160
|
+
io = new IntersectionObserver(handleObserve, {
|
|
1161
|
+
...options,
|
|
1162
|
+
root: root.ownerDocument
|
|
1163
|
+
});
|
|
1164
|
+
} catch (_e) {
|
|
1165
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
1166
|
+
}
|
|
1167
|
+
io.observe(element);
|
|
1168
|
+
}
|
|
1169
|
+
refresh(true);
|
|
1170
|
+
return cleanup;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Automatically updates the position of the floating element when necessary.
|
|
1174
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
1175
|
+
* visible on the screen.
|
|
1176
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
1177
|
+
* removed from the DOM or hidden from the screen.
|
|
1178
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
1179
|
+
*/
|
|
1180
|
+
function autoUpdate(reference, floating, update, options) {
|
|
1181
|
+
if (options === void 0) options = {};
|
|
1182
|
+
const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
|
|
1183
|
+
const referenceEl = unwrapElement(reference);
|
|
1184
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
1185
|
+
ancestors.forEach((ancestor) => {
|
|
1186
|
+
ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
|
|
1187
|
+
ancestorResize && ancestor.addEventListener("resize", update);
|
|
1188
|
+
});
|
|
1189
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1190
|
+
let reobserveFrame = -1;
|
|
1191
|
+
let resizeObserver = null;
|
|
1192
|
+
if (elementResize) {
|
|
1193
|
+
resizeObserver = new ResizeObserver((_ref) => {
|
|
1194
|
+
let [firstEntry] = _ref;
|
|
1195
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
1196
|
+
resizeObserver.unobserve(floating);
|
|
1197
|
+
cancelAnimationFrame(reobserveFrame);
|
|
1198
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
1199
|
+
var _resizeObserver;
|
|
1200
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
update();
|
|
1204
|
+
});
|
|
1205
|
+
if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
|
|
1206
|
+
if (floating) resizeObserver.observe(floating);
|
|
1207
|
+
}
|
|
1208
|
+
let frameId;
|
|
1209
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1210
|
+
if (animationFrame) frameLoop();
|
|
1211
|
+
function frameLoop() {
|
|
1212
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
1213
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
|
|
1214
|
+
prevRefRect = nextRefRect;
|
|
1215
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
1216
|
+
}
|
|
1217
|
+
update();
|
|
1218
|
+
return () => {
|
|
1219
|
+
var _resizeObserver2;
|
|
1220
|
+
ancestors.forEach((ancestor) => {
|
|
1221
|
+
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
1222
|
+
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
1223
|
+
});
|
|
1224
|
+
cleanupIo?.();
|
|
1225
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1226
|
+
resizeObserver = null;
|
|
1227
|
+
if (animationFrame) cancelAnimationFrame(frameId);
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Modifies the placement by translating the floating element along the
|
|
1232
|
+
* specified axes.
|
|
1233
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1234
|
+
* object may be passed.
|
|
1235
|
+
* @see https://floating-ui.com/docs/offset
|
|
1236
|
+
*/
|
|
1237
|
+
const offset$1 = offset$2;
|
|
1238
|
+
/**
|
|
1239
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1240
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
1241
|
+
* @see https://floating-ui.com/docs/shift
|
|
1242
|
+
*/
|
|
1243
|
+
const shift$1 = shift$2;
|
|
1244
|
+
/**
|
|
1245
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1246
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1247
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1248
|
+
* @see https://floating-ui.com/docs/flip
|
|
1249
|
+
*/
|
|
1250
|
+
const flip$1 = flip$2;
|
|
1251
|
+
/**
|
|
1252
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1253
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1254
|
+
* width of the reference element.
|
|
1255
|
+
* @see https://floating-ui.com/docs/size
|
|
1256
|
+
*/
|
|
1257
|
+
const size$1 = size$2;
|
|
1258
|
+
/**
|
|
1259
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1260
|
+
* when it is not in the same clipping context as the reference element.
|
|
1261
|
+
* @see https://floating-ui.com/docs/hide
|
|
1262
|
+
*/
|
|
1263
|
+
const hide$1 = hide$2;
|
|
1264
|
+
/**
|
|
1265
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1266
|
+
*/
|
|
1267
|
+
const limitShift$1 = limitShift$2;
|
|
1268
|
+
/**
|
|
1269
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1270
|
+
* next to a given reference element.
|
|
1271
|
+
*/
|
|
1272
|
+
const computePosition = (reference, floating, options) => {
|
|
1273
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1274
|
+
const mergedOptions = {
|
|
1275
|
+
platform,
|
|
1276
|
+
...options
|
|
1277
|
+
};
|
|
1278
|
+
const platformWithCache = {
|
|
1279
|
+
...mergedOptions.platform,
|
|
1280
|
+
_c: cache
|
|
1281
|
+
};
|
|
1282
|
+
return computePosition$1(reference, floating, {
|
|
1283
|
+
...mergedOptions,
|
|
1284
|
+
platform: platformWithCache
|
|
1285
|
+
});
|
|
1286
|
+
};
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.8_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
1289
|
+
var index = typeof document !== "undefined" ? useLayoutEffect : function noop() {};
|
|
1290
|
+
function deepEqual(a, b) {
|
|
1291
|
+
if (a === b) return true;
|
|
1292
|
+
if (typeof a !== typeof b) return false;
|
|
1293
|
+
if (typeof a === "function" && a.toString() === b.toString()) return true;
|
|
1294
|
+
let length;
|
|
1295
|
+
let i;
|
|
1296
|
+
let keys;
|
|
1297
|
+
if (a && b && typeof a === "object") {
|
|
1298
|
+
if (Array.isArray(a)) {
|
|
1299
|
+
length = a.length;
|
|
1300
|
+
if (length !== b.length) return false;
|
|
1301
|
+
for (i = length; i-- !== 0;) if (!deepEqual(a[i], b[i])) return false;
|
|
1302
|
+
return true;
|
|
1303
|
+
}
|
|
1304
|
+
keys = Object.keys(a);
|
|
1305
|
+
length = keys.length;
|
|
1306
|
+
if (length !== Object.keys(b).length) return false;
|
|
1307
|
+
for (i = length; i-- !== 0;) if (!{}.hasOwnProperty.call(b, keys[i])) return false;
|
|
1308
|
+
for (i = length; i-- !== 0;) {
|
|
1309
|
+
const key = keys[i];
|
|
1310
|
+
if (key === "_owner" && a.$$typeof) continue;
|
|
1311
|
+
if (!deepEqual(a[key], b[key])) return false;
|
|
1312
|
+
}
|
|
1313
|
+
return true;
|
|
1314
|
+
}
|
|
1315
|
+
return a !== a && b !== b;
|
|
1316
|
+
}
|
|
1317
|
+
function getDPR(element) {
|
|
1318
|
+
if (typeof window === "undefined") return 1;
|
|
1319
|
+
return (element.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1320
|
+
}
|
|
1321
|
+
function roundByDPR(element, value) {
|
|
1322
|
+
const dpr = getDPR(element);
|
|
1323
|
+
return Math.round(value * dpr) / dpr;
|
|
1324
|
+
}
|
|
1325
|
+
function useLatestRef(value) {
|
|
1326
|
+
const ref = React$1.useRef(value);
|
|
1327
|
+
index(() => {
|
|
1328
|
+
ref.current = value;
|
|
1329
|
+
});
|
|
1330
|
+
return ref;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Provides data to position a floating element.
|
|
1334
|
+
* @see https://floating-ui.com/docs/useFloating
|
|
1335
|
+
*/
|
|
1336
|
+
function useFloating(options) {
|
|
1337
|
+
if (options === void 0) options = {};
|
|
1338
|
+
const { placement = "bottom", strategy = "absolute", middleware = [], platform, elements: { reference: externalReference, floating: externalFloating } = {}, transform = true, whileElementsMounted, open } = options;
|
|
1339
|
+
const [data, setData] = React$1.useState({
|
|
1340
|
+
x: 0,
|
|
1341
|
+
y: 0,
|
|
1342
|
+
strategy,
|
|
1343
|
+
placement,
|
|
1344
|
+
middlewareData: {},
|
|
1345
|
+
isPositioned: false
|
|
1346
|
+
});
|
|
1347
|
+
const [latestMiddleware, setLatestMiddleware] = React$1.useState(middleware);
|
|
1348
|
+
if (!deepEqual(latestMiddleware, middleware)) setLatestMiddleware(middleware);
|
|
1349
|
+
const [_reference, _setReference] = React$1.useState(null);
|
|
1350
|
+
const [_floating, _setFloating] = React$1.useState(null);
|
|
1351
|
+
const setReference = React$1.useCallback((node) => {
|
|
1352
|
+
if (node !== referenceRef.current) {
|
|
1353
|
+
referenceRef.current = node;
|
|
1354
|
+
_setReference(node);
|
|
1355
|
+
}
|
|
1356
|
+
}, []);
|
|
1357
|
+
const setFloating = React$1.useCallback((node) => {
|
|
1358
|
+
if (node !== floatingRef.current) {
|
|
1359
|
+
floatingRef.current = node;
|
|
1360
|
+
_setFloating(node);
|
|
1361
|
+
}
|
|
1362
|
+
}, []);
|
|
1363
|
+
const referenceEl = externalReference || _reference;
|
|
1364
|
+
const floatingEl = externalFloating || _floating;
|
|
1365
|
+
const referenceRef = React$1.useRef(null);
|
|
1366
|
+
const floatingRef = React$1.useRef(null);
|
|
1367
|
+
const dataRef = React$1.useRef(data);
|
|
1368
|
+
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
1369
|
+
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
1370
|
+
const platformRef = useLatestRef(platform);
|
|
1371
|
+
const openRef = useLatestRef(open);
|
|
1372
|
+
const update = React$1.useCallback(() => {
|
|
1373
|
+
if (!referenceRef.current || !floatingRef.current) return;
|
|
1374
|
+
const config = {
|
|
1375
|
+
placement,
|
|
1376
|
+
strategy,
|
|
1377
|
+
middleware: latestMiddleware
|
|
1378
|
+
};
|
|
1379
|
+
if (platformRef.current) config.platform = platformRef.current;
|
|
1380
|
+
computePosition(referenceRef.current, floatingRef.current, config).then((data) => {
|
|
1381
|
+
const fullData = {
|
|
1382
|
+
...data,
|
|
1383
|
+
isPositioned: openRef.current !== false
|
|
1384
|
+
};
|
|
1385
|
+
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
1386
|
+
dataRef.current = fullData;
|
|
1387
|
+
ReactDOM.flushSync(() => {
|
|
1388
|
+
setData(fullData);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1392
|
+
}, [
|
|
1393
|
+
latestMiddleware,
|
|
1394
|
+
placement,
|
|
1395
|
+
strategy,
|
|
1396
|
+
platformRef,
|
|
1397
|
+
openRef
|
|
1398
|
+
]);
|
|
1399
|
+
index(() => {
|
|
1400
|
+
if (open === false && dataRef.current.isPositioned) {
|
|
1401
|
+
dataRef.current.isPositioned = false;
|
|
1402
|
+
setData((data) => ({
|
|
1403
|
+
...data,
|
|
1404
|
+
isPositioned: false
|
|
1405
|
+
}));
|
|
1406
|
+
}
|
|
1407
|
+
}, [open]);
|
|
1408
|
+
const isMountedRef = React$1.useRef(false);
|
|
1409
|
+
index(() => {
|
|
1410
|
+
isMountedRef.current = true;
|
|
1411
|
+
return () => {
|
|
1412
|
+
isMountedRef.current = false;
|
|
1413
|
+
};
|
|
1414
|
+
}, []);
|
|
1415
|
+
index(() => {
|
|
1416
|
+
if (referenceEl) referenceRef.current = referenceEl;
|
|
1417
|
+
if (floatingEl) floatingRef.current = floatingEl;
|
|
1418
|
+
if (referenceEl && floatingEl) {
|
|
1419
|
+
if (whileElementsMountedRef.current) return whileElementsMountedRef.current(referenceEl, floatingEl, update);
|
|
1420
|
+
update();
|
|
1421
|
+
}
|
|
1422
|
+
}, [
|
|
1423
|
+
referenceEl,
|
|
1424
|
+
floatingEl,
|
|
1425
|
+
update,
|
|
1426
|
+
whileElementsMountedRef,
|
|
1427
|
+
hasWhileElementsMounted
|
|
1428
|
+
]);
|
|
1429
|
+
const refs = React$1.useMemo(() => ({
|
|
1430
|
+
reference: referenceRef,
|
|
1431
|
+
floating: floatingRef,
|
|
1432
|
+
setReference,
|
|
1433
|
+
setFloating
|
|
1434
|
+
}), [setReference, setFloating]);
|
|
1435
|
+
const elements = React$1.useMemo(() => ({
|
|
1436
|
+
reference: referenceEl,
|
|
1437
|
+
floating: floatingEl
|
|
1438
|
+
}), [referenceEl, floatingEl]);
|
|
1439
|
+
const floatingStyles = React$1.useMemo(() => {
|
|
1440
|
+
const initialStyles = {
|
|
1441
|
+
position: strategy,
|
|
1442
|
+
left: 0,
|
|
1443
|
+
top: 0
|
|
1444
|
+
};
|
|
1445
|
+
if (!elements.floating) return initialStyles;
|
|
1446
|
+
const x = roundByDPR(elements.floating, data.x);
|
|
1447
|
+
const y = roundByDPR(elements.floating, data.y);
|
|
1448
|
+
if (transform) return {
|
|
1449
|
+
...initialStyles,
|
|
1450
|
+
transform: "translate(" + x + "px, " + y + "px)",
|
|
1451
|
+
...getDPR(elements.floating) >= 1.5 && { willChange: "transform" }
|
|
1452
|
+
};
|
|
1453
|
+
return {
|
|
1454
|
+
position: strategy,
|
|
1455
|
+
left: x,
|
|
1456
|
+
top: y
|
|
1457
|
+
};
|
|
1458
|
+
}, [
|
|
1459
|
+
strategy,
|
|
1460
|
+
transform,
|
|
1461
|
+
elements.floating,
|
|
1462
|
+
data.x,
|
|
1463
|
+
data.y
|
|
1464
|
+
]);
|
|
1465
|
+
return React$1.useMemo(() => ({
|
|
1466
|
+
...data,
|
|
1467
|
+
update,
|
|
1468
|
+
refs,
|
|
1469
|
+
elements,
|
|
1470
|
+
floatingStyles
|
|
1471
|
+
}), [
|
|
1472
|
+
data,
|
|
1473
|
+
update,
|
|
1474
|
+
refs,
|
|
1475
|
+
elements,
|
|
1476
|
+
floatingStyles
|
|
1477
|
+
]);
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* Modifies the placement by translating the floating element along the
|
|
1481
|
+
* specified axes.
|
|
1482
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1483
|
+
* object may be passed.
|
|
1484
|
+
* @see https://floating-ui.com/docs/offset
|
|
1485
|
+
*/
|
|
1486
|
+
const offset = (options, deps) => {
|
|
1487
|
+
const result = offset$1(options);
|
|
1488
|
+
return {
|
|
1489
|
+
name: result.name,
|
|
1490
|
+
fn: result.fn,
|
|
1491
|
+
options: [options, deps]
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1494
|
+
/**
|
|
1495
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1496
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
1497
|
+
* @see https://floating-ui.com/docs/shift
|
|
1498
|
+
*/
|
|
1499
|
+
const shift = (options, deps) => {
|
|
1500
|
+
const result = shift$1(options);
|
|
1501
|
+
return {
|
|
1502
|
+
name: result.name,
|
|
1503
|
+
fn: result.fn,
|
|
1504
|
+
options: [options, deps]
|
|
1505
|
+
};
|
|
1506
|
+
};
|
|
1507
|
+
/**
|
|
1508
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1509
|
+
*/
|
|
1510
|
+
const limitShift = (options, deps) => {
|
|
1511
|
+
return {
|
|
1512
|
+
fn: limitShift$1(options).fn,
|
|
1513
|
+
options: [options, deps]
|
|
1514
|
+
};
|
|
1515
|
+
};
|
|
1516
|
+
/**
|
|
1517
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1518
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1519
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1520
|
+
* @see https://floating-ui.com/docs/flip
|
|
1521
|
+
*/
|
|
1522
|
+
const flip = (options, deps) => {
|
|
1523
|
+
const result = flip$1(options);
|
|
1524
|
+
return {
|
|
1525
|
+
name: result.name,
|
|
1526
|
+
fn: result.fn,
|
|
1527
|
+
options: [options, deps]
|
|
1528
|
+
};
|
|
1529
|
+
};
|
|
1530
|
+
/**
|
|
1531
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1532
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1533
|
+
* width of the reference element.
|
|
1534
|
+
* @see https://floating-ui.com/docs/size
|
|
1535
|
+
*/
|
|
1536
|
+
const size = (options, deps) => {
|
|
1537
|
+
const result = size$1(options);
|
|
1538
|
+
return {
|
|
1539
|
+
name: result.name,
|
|
1540
|
+
fn: result.fn,
|
|
1541
|
+
options: [options, deps]
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
/**
|
|
1545
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1546
|
+
* when it is not in the same clipping context as the reference element.
|
|
1547
|
+
* @see https://floating-ui.com/docs/hide
|
|
1548
|
+
*/
|
|
1549
|
+
const hide = (options, deps) => {
|
|
1550
|
+
const result = hide$1(options);
|
|
1551
|
+
return {
|
|
1552
|
+
name: result.name,
|
|
1553
|
+
fn: result.fn,
|
|
1554
|
+
options: [options, deps]
|
|
1555
|
+
};
|
|
1556
|
+
};
|
|
1557
|
+
//#endregion
|
|
1558
|
+
export { isShadowRoot as A, getParentNode as C, isLastTraversableNode as D, isHTMLElement as E, isNode as O, getNodeName as S, isElement as T, getSide as _, shift as a, round as b, autoUpdate as c, evaluate as d, floor as f, getPaddingObject as g, getAxisLength as h, offset as i, isOverflowElement as k, platform as l, getAlignmentAxis as m, hide as n, size as o, getAlignment as p, limitShift as r, useFloating as s, flip as t, clamp as u, getSideAxis as v, getWindow as w, getComputedStyle$1 as x, rectToClientRect as y };
|