@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,1233 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { d as useRefWithInit, o as EMPTY_OBJECT, s as NOOP, t as useRenderElement } from "./useRenderElement-m8kc7jyuczp71mq8.js";
|
|
3
|
+
import { C as FocusGuard, b as POPUP_COLLISION_AVOIDANCE, c as ReactStore, d as createSelector, h as BASE_UI_SWIPE_IGNORE_SELECTOR, y as LEGACY_SWIPE_IGNORE_SELECTOR } from "./popupStateMapping-jpzw7eyzl8ghiv8s.js";
|
|
4
|
+
import { n as useIsoLayoutEffect } from "./safeReact-bavzz23j5tex60z2.js";
|
|
5
|
+
import { t as useOnMount } from "./useOnMount-j4wobeq47l3u9olo.js";
|
|
6
|
+
import { n as useTimeout, t as Timeout } from "./useTimeout-oqptmu2xmyv5ccic.js";
|
|
7
|
+
import { D as activeElement, E as matchesFocusVisible, O as contains, k as getTarget, v as ownerDocument } from "./vendor-utils-luqsvbyuig727bnr.js";
|
|
8
|
+
import { T as isElement, w as getWindow } from "./vendor-floating-ui-dsysdmve7iazaaes.js";
|
|
9
|
+
import { t as addEventListener } from "./addEventListener-lhqvk2ahlzjsanyg.js";
|
|
10
|
+
import { t as mergeCleanups } from "./mergeCleanups-pexn3wul6a4zn873.js";
|
|
11
|
+
import { t as useStableCallback } from "./useStableCallback-ninxmksdjvwl6ejj.js";
|
|
12
|
+
import { t as visuallyHidden } from "./visuallyHidden-n14xllazfozg55ox.js";
|
|
13
|
+
import { t as useId$1 } from "./useId-l9soitgw3e4jk5ie.js";
|
|
14
|
+
import { i as transitionStatusMapping, t as useOpenChangeComplete } from "./useOpenChangeComplete-dpkex2e23s1evpol.js";
|
|
15
|
+
import { t as useFloatingRootContext } from "./useFloatingRootContext-jo582qzez5k9gbgk.js";
|
|
16
|
+
import { r as useAnchorPositioning, t as usePositioner } from "./usePositioner-h1n5q86am1sjo5hn.js";
|
|
17
|
+
import { t as inertValue } from "./inertValue-f9pgp32jxnm88df3.js";
|
|
18
|
+
import { n as getElementTransform, t as getDisplacement } from "./useSwipeDismiss-bpbyw2ihsw3fw6y9.js";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
import * as React$1 from "react";
|
|
21
|
+
import * as ReactDOM from "react-dom";
|
|
22
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/provider/ToastProviderContext.mjs
|
|
23
|
+
const ToastContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
24
|
+
ToastContext.displayName = "ToastContext";
|
|
25
|
+
function useToastProviderContext() {
|
|
26
|
+
const context = React$1.useContext(ToastContext);
|
|
27
|
+
if (!context) throw new Error("Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
28
|
+
return context;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/generateId.mjs
|
|
32
|
+
let counter = 0;
|
|
33
|
+
function generateId(prefix) {
|
|
34
|
+
counter += 1;
|
|
35
|
+
return `${prefix}-${Math.random().toString(36).slice(2, 6)}-${counter}`;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/utils/resolvePromiseOptions.mjs
|
|
39
|
+
function resolvePromiseOptions(options, result) {
|
|
40
|
+
if (typeof options === "string") return { description: options };
|
|
41
|
+
if (typeof options === "function") {
|
|
42
|
+
const resolvedOptions = options(result);
|
|
43
|
+
return typeof resolvedOptions === "string" ? { description: resolvedOptions } : resolvedOptions;
|
|
44
|
+
}
|
|
45
|
+
return options;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/store.mjs
|
|
49
|
+
function createToastMetadata(toasts) {
|
|
50
|
+
const metadata = /* @__PURE__ */ new Map();
|
|
51
|
+
let visibleIndex = 0;
|
|
52
|
+
let offsetY = 0;
|
|
53
|
+
toasts.forEach((toast, toastIndex) => {
|
|
54
|
+
const isEnding = toast.transitionStatus === "ending";
|
|
55
|
+
metadata.set(toast.id, {
|
|
56
|
+
value: toast,
|
|
57
|
+
domIndex: toastIndex,
|
|
58
|
+
visibleIndex: isEnding ? -1 : visibleIndex,
|
|
59
|
+
offsetY
|
|
60
|
+
});
|
|
61
|
+
offsetY += toast.height || 0;
|
|
62
|
+
if (!isEnding) visibleIndex += 1;
|
|
63
|
+
});
|
|
64
|
+
return metadata;
|
|
65
|
+
}
|
|
66
|
+
function applyLimited(toasts, limit) {
|
|
67
|
+
let activeIndex = 0;
|
|
68
|
+
return toasts.map((toast) => {
|
|
69
|
+
if (toast.transitionStatus === "ending") return toast;
|
|
70
|
+
const limited = activeIndex >= limit;
|
|
71
|
+
activeIndex += 1;
|
|
72
|
+
return toast.limited === limited ? toast : {
|
|
73
|
+
...toast,
|
|
74
|
+
limited
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const toastMetadataSelector = (state) => state.toastMetadata;
|
|
79
|
+
const selectors = {
|
|
80
|
+
toasts: createSelector((state) => state.toasts),
|
|
81
|
+
isEmpty: createSelector((state) => state.toasts.length === 0),
|
|
82
|
+
toast: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.value),
|
|
83
|
+
toastIndex: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.domIndex ?? -1),
|
|
84
|
+
toastOffsetY: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.offsetY ?? 0),
|
|
85
|
+
toastVisibleIndex: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.visibleIndex ?? -1),
|
|
86
|
+
hovering: createSelector((state) => state.hovering),
|
|
87
|
+
focused: createSelector((state) => state.focused),
|
|
88
|
+
expanded: createSelector((state) => state.hovering || state.focused),
|
|
89
|
+
expandedOrOutOfFocus: createSelector((state) => state.hovering || state.focused || !state.isWindowFocused),
|
|
90
|
+
prevFocusElement: createSelector((state) => state.prevFocusElement)
|
|
91
|
+
};
|
|
92
|
+
var ToastStore = class extends ReactStore {
|
|
93
|
+
timers = /* @__PURE__ */ new Map();
|
|
94
|
+
areTimersPaused = false;
|
|
95
|
+
constructor(initialState) {
|
|
96
|
+
super({
|
|
97
|
+
...initialState,
|
|
98
|
+
toastMetadata: createToastMetadata(initialState.toasts)
|
|
99
|
+
}, {}, selectors);
|
|
100
|
+
}
|
|
101
|
+
setFocused(focused) {
|
|
102
|
+
this.set("focused", focused);
|
|
103
|
+
}
|
|
104
|
+
setHovering(hovering) {
|
|
105
|
+
this.set("hovering", hovering);
|
|
106
|
+
}
|
|
107
|
+
setIsWindowFocused(isWindowFocused) {
|
|
108
|
+
this.set("isWindowFocused", isWindowFocused);
|
|
109
|
+
}
|
|
110
|
+
setPrevFocusElement(prevFocusElement) {
|
|
111
|
+
this.set("prevFocusElement", prevFocusElement);
|
|
112
|
+
}
|
|
113
|
+
setViewport = (viewport) => {
|
|
114
|
+
this.set("viewport", viewport);
|
|
115
|
+
};
|
|
116
|
+
syncProviderProps(props) {
|
|
117
|
+
const limitChanged = this.state.limit !== props.limit;
|
|
118
|
+
if (this.state.timeout === props.timeout && !limitChanged) return;
|
|
119
|
+
const updates = {
|
|
120
|
+
timeout: props.timeout,
|
|
121
|
+
limit: props.limit
|
|
122
|
+
};
|
|
123
|
+
if (limitChanged) {
|
|
124
|
+
const newToasts = applyLimited(this.state.toasts, props.limit);
|
|
125
|
+
updates.toasts = newToasts;
|
|
126
|
+
updates.toastMetadata = createToastMetadata(newToasts);
|
|
127
|
+
}
|
|
128
|
+
this.update(updates);
|
|
129
|
+
}
|
|
130
|
+
disposeEffect = () => {
|
|
131
|
+
return () => {
|
|
132
|
+
this.timers.forEach((timer) => {
|
|
133
|
+
timer.timeout?.clear();
|
|
134
|
+
});
|
|
135
|
+
this.timers.clear();
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
removeToast(toastId, behavior = {}) {
|
|
139
|
+
const index = selectors.toastIndex(this.state, toastId);
|
|
140
|
+
if (index === -1) return;
|
|
141
|
+
const toast = this.state.toasts[index];
|
|
142
|
+
if (!behavior.skipOnRemove) toast?.onRemove?.();
|
|
143
|
+
const newToasts = [...this.state.toasts];
|
|
144
|
+
newToasts.splice(index, 1);
|
|
145
|
+
this.setToasts(newToasts);
|
|
146
|
+
}
|
|
147
|
+
addToast = (toast) => {
|
|
148
|
+
const { timeout, limit } = this.state;
|
|
149
|
+
const id = toast.id || generateId("toast");
|
|
150
|
+
if (toast.id) {
|
|
151
|
+
const existingToast = selectors.toast(this.state, toast.id);
|
|
152
|
+
if (existingToast) if (existingToast.transitionStatus === "ending") this.removeToast(toast.id, { skipOnRemove: true });
|
|
153
|
+
else {
|
|
154
|
+
const { id: ignoredId, transitionStatus: ignoredTransitionStatus, ...updates } = toast;
|
|
155
|
+
this.updateToastInternal(toast.id, updates, {
|
|
156
|
+
resetTimer: true,
|
|
157
|
+
markUpdated: true
|
|
158
|
+
});
|
|
159
|
+
return toast.id;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const toastToAdd = {
|
|
163
|
+
...toast,
|
|
164
|
+
id,
|
|
165
|
+
updateKey: 0,
|
|
166
|
+
transitionStatus: "starting"
|
|
167
|
+
};
|
|
168
|
+
const updatedToasts = [toastToAdd, ...this.state.toasts];
|
|
169
|
+
this.setToasts(applyLimited(updatedToasts, limit));
|
|
170
|
+
const duration = toastToAdd.timeout ?? timeout;
|
|
171
|
+
if (toastToAdd.type !== "loading" && duration > 0) this.scheduleTimer(id, duration, () => this.closeToast(id));
|
|
172
|
+
if (selectors.expandedOrOutOfFocus(this.state)) this.pauseTimers();
|
|
173
|
+
return id;
|
|
174
|
+
};
|
|
175
|
+
updateToast = (id, updates) => {
|
|
176
|
+
this.updateToastInternal(id, updates, { markUpdated: true });
|
|
177
|
+
};
|
|
178
|
+
updateToastInternal = (id, updates, behavior = {}) => {
|
|
179
|
+
const { timeout, toasts } = this.state;
|
|
180
|
+
const prevToast = selectors.toast(this.state, id) ?? null;
|
|
181
|
+
if (!prevToast) return;
|
|
182
|
+
if (prevToast.transitionStatus === "ending") return;
|
|
183
|
+
const nextToast = {
|
|
184
|
+
...prevToast,
|
|
185
|
+
...updates,
|
|
186
|
+
...behavior.markUpdated && { updateKey: (prevToast.updateKey ?? 0) + 1 }
|
|
187
|
+
};
|
|
188
|
+
this.setToasts(toasts.map((toast) => toast.id === id ? nextToast : toast));
|
|
189
|
+
const nextTimeout = nextToast.timeout ?? timeout;
|
|
190
|
+
const prevTimeout = prevToast?.timeout ?? timeout;
|
|
191
|
+
const timeoutUpdated = Object.hasOwn(updates, "timeout");
|
|
192
|
+
const shouldHaveTimer = nextToast.transitionStatus !== "ending" && nextToast.type !== "loading" && nextTimeout > 0;
|
|
193
|
+
const hasTimer = this.timers.has(id);
|
|
194
|
+
const timeoutChanged = prevTimeout !== nextTimeout;
|
|
195
|
+
const wasLoading = prevToast?.type === "loading";
|
|
196
|
+
if (!shouldHaveTimer && hasTimer) {
|
|
197
|
+
this.clearTimer(id);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (shouldHaveTimer && (!hasTimer || timeoutChanged || timeoutUpdated || wasLoading || behavior.resetTimer)) {
|
|
201
|
+
this.clearTimer(id);
|
|
202
|
+
this.scheduleTimer(id, nextTimeout, () => this.closeToast(id));
|
|
203
|
+
if (selectors.expandedOrOutOfFocus(this.state)) this.pauseTimers();
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
closeToast = (toastId) => {
|
|
207
|
+
const closeAll = toastId === void 0;
|
|
208
|
+
const { limit, toasts } = this.state;
|
|
209
|
+
let toastsToClose;
|
|
210
|
+
if (closeAll) {
|
|
211
|
+
toastsToClose = toasts;
|
|
212
|
+
this.clearTimers();
|
|
213
|
+
} else {
|
|
214
|
+
const toast = selectors.toast(this.state, toastId);
|
|
215
|
+
if (!toast) return;
|
|
216
|
+
toastsToClose = [toast];
|
|
217
|
+
this.clearTimer(toastId);
|
|
218
|
+
}
|
|
219
|
+
const newToasts = applyLimited(toasts.map((item) => closeAll || item.id === toastId ? {
|
|
220
|
+
...item,
|
|
221
|
+
transitionStatus: "ending",
|
|
222
|
+
height: 0
|
|
223
|
+
} : item), limit);
|
|
224
|
+
const updates = {
|
|
225
|
+
toasts: newToasts,
|
|
226
|
+
toastMetadata: createToastMetadata(newToasts)
|
|
227
|
+
};
|
|
228
|
+
if (!newToasts.some((toast) => toast.transitionStatus !== "ending")) {
|
|
229
|
+
updates.hovering = false;
|
|
230
|
+
updates.focused = false;
|
|
231
|
+
}
|
|
232
|
+
this.update(updates);
|
|
233
|
+
toastsToClose.forEach((toast) => {
|
|
234
|
+
if (toast.transitionStatus !== "ending") toast.onClose?.();
|
|
235
|
+
});
|
|
236
|
+
this.handleFocusManagement(toastId);
|
|
237
|
+
};
|
|
238
|
+
promiseToast = (promiseValue, options) => {
|
|
239
|
+
const loadingOptions = resolvePromiseOptions(options.loading);
|
|
240
|
+
const id = this.addToast({
|
|
241
|
+
...loadingOptions,
|
|
242
|
+
type: "loading"
|
|
243
|
+
});
|
|
244
|
+
const handledPromise = promiseValue.then((result) => {
|
|
245
|
+
const successOptions = resolvePromiseOptions(options.success, result);
|
|
246
|
+
this.updateToast(id, {
|
|
247
|
+
...successOptions,
|
|
248
|
+
type: "success",
|
|
249
|
+
timeout: successOptions.timeout
|
|
250
|
+
});
|
|
251
|
+
return result;
|
|
252
|
+
}).catch((error) => {
|
|
253
|
+
const errorOptions = resolvePromiseOptions(options.error, error);
|
|
254
|
+
this.updateToast(id, {
|
|
255
|
+
...errorOptions,
|
|
256
|
+
type: "error",
|
|
257
|
+
timeout: errorOptions.timeout
|
|
258
|
+
});
|
|
259
|
+
return Promise.reject(error);
|
|
260
|
+
});
|
|
261
|
+
if ({}.hasOwnProperty.call(options, "setPromise")) options.setPromise(handledPromise);
|
|
262
|
+
return handledPromise;
|
|
263
|
+
};
|
|
264
|
+
pauseTimers() {
|
|
265
|
+
if (this.areTimersPaused) return;
|
|
266
|
+
this.areTimersPaused = true;
|
|
267
|
+
this.timers.forEach((timer) => {
|
|
268
|
+
if (timer.timeout) {
|
|
269
|
+
timer.timeout.clear();
|
|
270
|
+
const elapsed = Date.now() - timer.start;
|
|
271
|
+
const remaining = timer.delay - elapsed;
|
|
272
|
+
timer.remaining = remaining > 0 ? remaining : 0;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
resumeTimers() {
|
|
277
|
+
if (!this.areTimersPaused) return;
|
|
278
|
+
this.areTimersPaused = false;
|
|
279
|
+
this.timers.forEach((timer, id) => {
|
|
280
|
+
timer.remaining = timer.remaining > 0 ? timer.remaining : timer.delay;
|
|
281
|
+
timer.timeout ??= Timeout.create();
|
|
282
|
+
timer.timeout.start(timer.remaining, () => {
|
|
283
|
+
this.handleTimerFired(id);
|
|
284
|
+
timer.callback();
|
|
285
|
+
});
|
|
286
|
+
timer.start = Date.now();
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
restoreFocusToPrevElement() {
|
|
290
|
+
this.state.prevFocusElement?.focus({ preventScroll: true });
|
|
291
|
+
}
|
|
292
|
+
handleDocumentPointerDown = (event) => {
|
|
293
|
+
if (event.pointerType !== "touch") return;
|
|
294
|
+
const target = getTarget(event);
|
|
295
|
+
if (contains(this.state.viewport, target)) return;
|
|
296
|
+
this.resumeTimers();
|
|
297
|
+
this.update({
|
|
298
|
+
hovering: false,
|
|
299
|
+
focused: false
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
scheduleTimer(id, delay, callback) {
|
|
303
|
+
const start = Date.now();
|
|
304
|
+
const shouldStartActive = !selectors.expandedOrOutOfFocus(this.state);
|
|
305
|
+
const currentTimeout = shouldStartActive ? Timeout.create() : void 0;
|
|
306
|
+
currentTimeout?.start(delay, () => {
|
|
307
|
+
this.handleTimerFired(id);
|
|
308
|
+
callback();
|
|
309
|
+
});
|
|
310
|
+
this.timers.set(id, {
|
|
311
|
+
timeout: currentTimeout,
|
|
312
|
+
start: shouldStartActive ? start : 0,
|
|
313
|
+
delay,
|
|
314
|
+
remaining: delay,
|
|
315
|
+
callback
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
clearTimers() {
|
|
319
|
+
this.timers.forEach((timer) => {
|
|
320
|
+
timer.timeout?.clear();
|
|
321
|
+
});
|
|
322
|
+
this.timers.clear();
|
|
323
|
+
this.areTimersPaused = false;
|
|
324
|
+
}
|
|
325
|
+
clearTimer(id) {
|
|
326
|
+
this.timers.get(id)?.timeout?.clear();
|
|
327
|
+
this.timers.delete(id);
|
|
328
|
+
this.resetPausedStateIfNoTimersRemain();
|
|
329
|
+
}
|
|
330
|
+
handleTimerFired(id) {
|
|
331
|
+
this.timers.delete(id);
|
|
332
|
+
this.resetPausedStateIfNoTimersRemain();
|
|
333
|
+
}
|
|
334
|
+
resetPausedStateIfNoTimersRemain() {
|
|
335
|
+
if (this.timers.size === 0) this.areTimersPaused = false;
|
|
336
|
+
}
|
|
337
|
+
setToasts(newToasts) {
|
|
338
|
+
const updates = {
|
|
339
|
+
toasts: newToasts,
|
|
340
|
+
toastMetadata: createToastMetadata(newToasts)
|
|
341
|
+
};
|
|
342
|
+
if (newToasts.length === 0) {
|
|
343
|
+
updates.hovering = false;
|
|
344
|
+
updates.focused = false;
|
|
345
|
+
}
|
|
346
|
+
this.update(updates);
|
|
347
|
+
}
|
|
348
|
+
handleFocusManagement(toastId) {
|
|
349
|
+
const activeEl = activeElement(ownerDocument(this.state.viewport));
|
|
350
|
+
if (!this.state.viewport || !contains(this.state.viewport, activeEl) || !matchesFocusVisible(activeEl)) return;
|
|
351
|
+
if (toastId === void 0) {
|
|
352
|
+
this.restoreFocusToPrevElement();
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const toasts = selectors.toasts(this.state);
|
|
356
|
+
const currentIndex = selectors.toastIndex(this.state, toastId);
|
|
357
|
+
let nextToast = null;
|
|
358
|
+
let index = currentIndex + 1;
|
|
359
|
+
while (index < toasts.length) {
|
|
360
|
+
if (toasts[index].transitionStatus !== "ending") {
|
|
361
|
+
nextToast = toasts[index];
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
index += 1;
|
|
365
|
+
}
|
|
366
|
+
if (!nextToast) {
|
|
367
|
+
index = currentIndex - 1;
|
|
368
|
+
while (index >= 0) {
|
|
369
|
+
if (toasts[index].transitionStatus !== "ending") {
|
|
370
|
+
nextToast = toasts[index];
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
index -= 1;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
if (nextToast) nextToast.ref?.current?.focus();
|
|
377
|
+
else this.restoreFocusToPrevElement();
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/provider/ToastProvider.mjs
|
|
382
|
+
/**
|
|
383
|
+
* Provides a context for creating and managing toasts.
|
|
384
|
+
*
|
|
385
|
+
* Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
|
|
386
|
+
*/
|
|
387
|
+
const ToastProvider = function ToastProvider(props) {
|
|
388
|
+
const { children, timeout = 5e3, limit = 3, toastManager } = props;
|
|
389
|
+
const store = useRefWithInit(() => new ToastStore({
|
|
390
|
+
timeout,
|
|
391
|
+
limit,
|
|
392
|
+
viewport: null,
|
|
393
|
+
toasts: [],
|
|
394
|
+
hovering: false,
|
|
395
|
+
focused: false,
|
|
396
|
+
isWindowFocused: true,
|
|
397
|
+
prevFocusElement: null
|
|
398
|
+
})).current;
|
|
399
|
+
useOnMount(store.disposeEffect);
|
|
400
|
+
React$1.useEffect(function subscribeToToastManager() {
|
|
401
|
+
if (!toastManager) return;
|
|
402
|
+
return toastManager[" subscribe"](({ action, options }) => {
|
|
403
|
+
const id = options.id;
|
|
404
|
+
if (action === "promise" && options.promise) store.promiseToast(options.promise, options);
|
|
405
|
+
else if (action === "update" && id) store.updateToast(id, options);
|
|
406
|
+
else if (action === "close") store.closeToast(id);
|
|
407
|
+
else store.addToast(options);
|
|
408
|
+
});
|
|
409
|
+
}, [store, toastManager]);
|
|
410
|
+
useIsoLayoutEffect(() => {
|
|
411
|
+
store.syncProviderProps({
|
|
412
|
+
timeout,
|
|
413
|
+
limit
|
|
414
|
+
});
|
|
415
|
+
}, [
|
|
416
|
+
store,
|
|
417
|
+
timeout,
|
|
418
|
+
limit
|
|
419
|
+
]);
|
|
420
|
+
return /*#__PURE__*/ jsx(ToastContext.Provider, {
|
|
421
|
+
value: store,
|
|
422
|
+
children
|
|
423
|
+
});
|
|
424
|
+
};
|
|
425
|
+
ToastProvider.displayName = "ToastProvider";
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
|
|
428
|
+
let ToastViewportCssVars = /*#__PURE__*/ function(ToastViewportCssVars) {
|
|
429
|
+
/**
|
|
430
|
+
* Indicates the height of the frontmost toast.
|
|
431
|
+
* @type {number}
|
|
432
|
+
*/
|
|
433
|
+
ToastViewportCssVars["frontmostHeight"] = "--toast-frontmost-height";
|
|
434
|
+
return ToastViewportCssVars;
|
|
435
|
+
}({});
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/viewport/ToastViewport.mjs
|
|
438
|
+
/**
|
|
439
|
+
* A container viewport for toasts.
|
|
440
|
+
* Renders a `<div>` element.
|
|
441
|
+
*
|
|
442
|
+
* Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
|
|
443
|
+
*/
|
|
444
|
+
const ToastViewport = /*#__PURE__*/ React$1.forwardRef(function ToastViewport(componentProps, forwardedRef) {
|
|
445
|
+
const { render, className, style, children, ...elementProps } = componentProps;
|
|
446
|
+
const store = useToastProviderContext();
|
|
447
|
+
const windowFocusTimeout = useTimeout();
|
|
448
|
+
const handlingFocusGuardRef = React$1.useRef(false);
|
|
449
|
+
const markedReadyForMouseLeaveRef = React$1.useRef(false);
|
|
450
|
+
const touchActiveRef = React$1.useRef(false);
|
|
451
|
+
const isEmpty = store.useState("isEmpty");
|
|
452
|
+
const toasts = store.useState("toasts");
|
|
453
|
+
const focused = store.useState("focused");
|
|
454
|
+
const expanded = store.useState("expanded");
|
|
455
|
+
const prevFocusElement = store.useState("prevFocusElement");
|
|
456
|
+
const frontmostHeight = toasts[0]?.height ?? 0;
|
|
457
|
+
const hasTransitioningToasts = React$1.useMemo(() => toasts.some((toast) => toast.transitionStatus === "ending"), [toasts]);
|
|
458
|
+
const highPriorityToasts = React$1.useMemo(() => toasts.filter((toast) => toast.priority === "high"), [toasts]);
|
|
459
|
+
React$1.useEffect(() => {
|
|
460
|
+
const viewport = store.state.viewport;
|
|
461
|
+
if (!viewport) return;
|
|
462
|
+
function handleGlobalKeyDown(event) {
|
|
463
|
+
if (isEmpty) return;
|
|
464
|
+
if (event.key === "F6" && getTarget(event) !== viewport) {
|
|
465
|
+
event.preventDefault();
|
|
466
|
+
store.setPrevFocusElement(activeElement(ownerDocument(viewport)));
|
|
467
|
+
viewport?.focus({ preventScroll: true });
|
|
468
|
+
store.pauseTimers();
|
|
469
|
+
store.setFocused(true);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return addEventListener(getWindow(viewport), "keydown", handleGlobalKeyDown);
|
|
473
|
+
}, [store, isEmpty]);
|
|
474
|
+
React$1.useEffect(() => {
|
|
475
|
+
const viewport = store.state.viewport;
|
|
476
|
+
if (!viewport || isEmpty) return;
|
|
477
|
+
const win = getWindow(viewport);
|
|
478
|
+
function handleWindowBlur(event) {
|
|
479
|
+
if (getTarget(event) !== win) return;
|
|
480
|
+
store.setIsWindowFocused(false);
|
|
481
|
+
store.pauseTimers();
|
|
482
|
+
}
|
|
483
|
+
function handleWindowFocus(event) {
|
|
484
|
+
if (event.relatedTarget) return;
|
|
485
|
+
const target = getTarget(event);
|
|
486
|
+
const activeEl = activeElement(ownerDocument(viewport));
|
|
487
|
+
if (target === win || !contains(viewport, target) || !matchesFocusVisible(activeEl)) store.resumeTimers();
|
|
488
|
+
windowFocusTimeout.start(0, () => store.setIsWindowFocused(true));
|
|
489
|
+
}
|
|
490
|
+
return mergeCleanups(addEventListener(win, "blur", handleWindowBlur, true), addEventListener(win, "focus", handleWindowFocus, true));
|
|
491
|
+
}, [
|
|
492
|
+
store,
|
|
493
|
+
windowFocusTimeout,
|
|
494
|
+
isEmpty
|
|
495
|
+
]);
|
|
496
|
+
React$1.useEffect(() => {
|
|
497
|
+
const viewport = store.state.viewport;
|
|
498
|
+
if (!viewport || isEmpty) return;
|
|
499
|
+
return addEventListener(ownerDocument(viewport), "pointerdown", store.handleDocumentPointerDown, true);
|
|
500
|
+
}, [isEmpty, store]);
|
|
501
|
+
function handleFocusGuard(event) {
|
|
502
|
+
const viewport = store.state.viewport;
|
|
503
|
+
if (!viewport) return;
|
|
504
|
+
handlingFocusGuardRef.current = true;
|
|
505
|
+
if (event.relatedTarget === viewport) {
|
|
506
|
+
const firstFocusableToast = toasts.find((toast) => toast.transitionStatus !== "ending" && !toast.limited);
|
|
507
|
+
if (firstFocusableToast) firstFocusableToast.ref?.current?.focus();
|
|
508
|
+
else store.restoreFocusToPrevElement();
|
|
509
|
+
} else store.restoreFocusToPrevElement();
|
|
510
|
+
}
|
|
511
|
+
function handleKeyDown(event) {
|
|
512
|
+
if (event.key === "Tab" && event.shiftKey && getTarget(event.nativeEvent) === store.state.viewport) {
|
|
513
|
+
event.preventDefault();
|
|
514
|
+
store.restoreFocusToPrevElement();
|
|
515
|
+
store.resumeTimers();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function flushMouseLeave() {
|
|
519
|
+
if (store.state.toasts.some((toast) => toast.transitionStatus === "ending") || touchActiveRef.current || !markedReadyForMouseLeaveRef.current) return;
|
|
520
|
+
if (store.state.isWindowFocused) store.resumeTimers();
|
|
521
|
+
store.setHovering(false);
|
|
522
|
+
markedReadyForMouseLeaveRef.current = false;
|
|
523
|
+
}
|
|
524
|
+
React$1.useEffect(flushMouseLeave, [hasTransitioningToasts, store]);
|
|
525
|
+
function handleMouseEnter() {
|
|
526
|
+
store.pauseTimers();
|
|
527
|
+
store.setHovering(true);
|
|
528
|
+
markedReadyForMouseLeaveRef.current = false;
|
|
529
|
+
}
|
|
530
|
+
function resumeTimersIfWindowFocused() {
|
|
531
|
+
if (store.state.isWindowFocused) store.resumeTimers();
|
|
532
|
+
}
|
|
533
|
+
function handleMouseLeave() {
|
|
534
|
+
if (store.state.toasts.some((toast) => toast.transitionStatus === "ending") || touchActiveRef.current) markedReadyForMouseLeaveRef.current = true;
|
|
535
|
+
else {
|
|
536
|
+
resumeTimersIfWindowFocused();
|
|
537
|
+
store.setHovering(false);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
function handlePointerDown(event) {
|
|
541
|
+
if (event.pointerType === "touch") touchActiveRef.current = true;
|
|
542
|
+
}
|
|
543
|
+
function handlePointerEnd(event) {
|
|
544
|
+
if (event.pointerType !== "touch") return;
|
|
545
|
+
touchActiveRef.current = false;
|
|
546
|
+
flushMouseLeave();
|
|
547
|
+
}
|
|
548
|
+
function handleFocus() {
|
|
549
|
+
if (handlingFocusGuardRef.current) {
|
|
550
|
+
handlingFocusGuardRef.current = false;
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
if (focused) return;
|
|
554
|
+
if (matchesFocusVisible(activeElement(ownerDocument(store.state.viewport)))) {
|
|
555
|
+
store.setFocused(true);
|
|
556
|
+
store.pauseTimers();
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function handleBlur(event) {
|
|
560
|
+
if (!focused || contains(store.state.viewport, event.relatedTarget)) return;
|
|
561
|
+
store.setFocused(false);
|
|
562
|
+
resumeTimersIfWindowFocused();
|
|
563
|
+
}
|
|
564
|
+
const defaultProps = {
|
|
565
|
+
tabIndex: -1,
|
|
566
|
+
role: "region",
|
|
567
|
+
"aria-live": "polite",
|
|
568
|
+
"aria-atomic": false,
|
|
569
|
+
"aria-relevant": "additions text",
|
|
570
|
+
"aria-label": "Notifications",
|
|
571
|
+
onMouseEnter: handleMouseEnter,
|
|
572
|
+
onMouseMove: handleMouseEnter,
|
|
573
|
+
onMouseLeave: handleMouseLeave,
|
|
574
|
+
onFocus: handleFocus,
|
|
575
|
+
onBlur: handleBlur,
|
|
576
|
+
onKeyDown: handleKeyDown,
|
|
577
|
+
onClick: handleFocus,
|
|
578
|
+
onPointerDown: handlePointerDown,
|
|
579
|
+
onPointerUp: handlePointerEnd,
|
|
580
|
+
onPointerCancel: handlePointerEnd
|
|
581
|
+
};
|
|
582
|
+
const state = { expanded };
|
|
583
|
+
const element = useRenderElement("div", componentProps, {
|
|
584
|
+
ref: [forwardedRef, store.setViewport],
|
|
585
|
+
state,
|
|
586
|
+
props: [
|
|
587
|
+
defaultProps,
|
|
588
|
+
{ style: { [ToastViewportCssVars.frontmostHeight]: frontmostHeight ? `${frontmostHeight}px` : void 0 } },
|
|
589
|
+
elementProps,
|
|
590
|
+
{ children: /*#__PURE__*/ jsxs(React$1.Fragment, { children: [
|
|
591
|
+
!isEmpty && prevFocusElement && /*#__PURE__*/ jsx(FocusGuard, { onFocus: handleFocusGuard }),
|
|
592
|
+
children,
|
|
593
|
+
!isEmpty && prevFocusElement && /*#__PURE__*/ jsx(FocusGuard, { onFocus: handleFocusGuard })
|
|
594
|
+
] }) }
|
|
595
|
+
]
|
|
596
|
+
});
|
|
597
|
+
return /*#__PURE__*/ jsxs(React$1.Fragment, { children: [
|
|
598
|
+
!isEmpty && prevFocusElement && /*#__PURE__*/ jsx(FocusGuard, { onFocus: handleFocusGuard }),
|
|
599
|
+
element,
|
|
600
|
+
!focused && highPriorityToasts.length > 0 && /*#__PURE__*/ jsx("div", {
|
|
601
|
+
style: visuallyHidden,
|
|
602
|
+
children: highPriorityToasts.map((toast) => /*#__PURE__*/ jsxs("div", {
|
|
603
|
+
role: "alert",
|
|
604
|
+
"aria-atomic": true,
|
|
605
|
+
children: [/*#__PURE__*/ jsx("div", { children: toast.title }), /*#__PURE__*/ jsx("div", { children: toast.description })]
|
|
606
|
+
}, toast.id))
|
|
607
|
+
})
|
|
608
|
+
] });
|
|
609
|
+
});
|
|
610
|
+
ToastViewport.displayName = "ToastViewport";
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/root/ToastRootContext.mjs
|
|
613
|
+
const ToastRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
614
|
+
ToastRootContext.displayName = "ToastRootContext";
|
|
615
|
+
function useToastRootContext() {
|
|
616
|
+
const context = React$1.useContext(ToastRootContext);
|
|
617
|
+
if (!context) throw new Error("Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
|
|
618
|
+
return context;
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
|
|
622
|
+
let ToastRootCssVars = /*#__PURE__*/ function(ToastRootCssVars) {
|
|
623
|
+
/**
|
|
624
|
+
* Indicates the index of the toast in the list.
|
|
625
|
+
* @type {number}
|
|
626
|
+
*/
|
|
627
|
+
ToastRootCssVars["index"] = "--toast-index";
|
|
628
|
+
/**
|
|
629
|
+
* Indicates the vertical pixels offset of the toast in the list when expanded.
|
|
630
|
+
* @type {number}
|
|
631
|
+
*/
|
|
632
|
+
ToastRootCssVars["offsetY"] = "--toast-offset-y";
|
|
633
|
+
/**
|
|
634
|
+
* Indicates the measured natural height of the toast in pixels.
|
|
635
|
+
* @type {number}
|
|
636
|
+
*/
|
|
637
|
+
ToastRootCssVars["height"] = "--toast-height";
|
|
638
|
+
/**
|
|
639
|
+
* Indicates the horizontal swipe movement of the toast.
|
|
640
|
+
* @type {number}
|
|
641
|
+
*/
|
|
642
|
+
ToastRootCssVars["swipeMovementX"] = "--toast-swipe-movement-x";
|
|
643
|
+
/**
|
|
644
|
+
* Indicates the vertical swipe movement of the toast.
|
|
645
|
+
* @type {number}
|
|
646
|
+
*/
|
|
647
|
+
ToastRootCssVars["swipeMovementY"] = "--toast-swipe-movement-y";
|
|
648
|
+
return ToastRootCssVars;
|
|
649
|
+
}({});
|
|
650
|
+
//#endregion
|
|
651
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/root/ToastRoot.mjs
|
|
652
|
+
const stateAttributesMapping = {
|
|
653
|
+
...transitionStatusMapping,
|
|
654
|
+
swipeDirection(value) {
|
|
655
|
+
return value ? { "data-swipe-direction": value } : null;
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
const SWIPE_THRESHOLD = 40;
|
|
659
|
+
const REVERSE_CANCEL_THRESHOLD = 10;
|
|
660
|
+
const OPPOSITE_DIRECTION_DAMPING_FACTOR = .5;
|
|
661
|
+
const MIN_DRAG_THRESHOLD = 1;
|
|
662
|
+
const TOAST_SWIPE_IGNORE_SELECTOR = `${BASE_UI_SWIPE_IGNORE_SELECTOR},${LEGACY_SWIPE_IGNORE_SELECTOR}`;
|
|
663
|
+
/**
|
|
664
|
+
* Groups all parts of an individual toast.
|
|
665
|
+
* Renders a `<div>` element.
|
|
666
|
+
*
|
|
667
|
+
* Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
|
|
668
|
+
*/
|
|
669
|
+
const ToastRoot = /*#__PURE__*/ React$1.forwardRef(function ToastRoot(componentProps, forwardedRef) {
|
|
670
|
+
const { toast, render, className, swipeDirection = ["down", "right"], style, ...elementProps } = componentProps;
|
|
671
|
+
const isAnchored = toast.positionerProps?.anchor !== void 0;
|
|
672
|
+
let swipeDirections = [];
|
|
673
|
+
if (!isAnchored) swipeDirections = Array.isArray(swipeDirection) ? swipeDirection : [swipeDirection];
|
|
674
|
+
const swipeEnabled = swipeDirections.length > 0;
|
|
675
|
+
const store = useToastProviderContext();
|
|
676
|
+
const [currentSwipeDirection, setCurrentSwipeDirection] = React$1.useState(void 0);
|
|
677
|
+
const [isSwiping, setIsSwiping] = React$1.useState(false);
|
|
678
|
+
const [isRealSwipe, setIsRealSwipe] = React$1.useState(false);
|
|
679
|
+
const [dragDismissed, setDragDismissed] = React$1.useState(false);
|
|
680
|
+
const [dragOffset, setDragOffset] = React$1.useState({
|
|
681
|
+
x: 0,
|
|
682
|
+
y: 0
|
|
683
|
+
});
|
|
684
|
+
const [initialTransform, setInitialTransform] = React$1.useState({
|
|
685
|
+
x: 0,
|
|
686
|
+
y: 0,
|
|
687
|
+
scale: 1
|
|
688
|
+
});
|
|
689
|
+
const [titleId, setTitleId] = React$1.useState();
|
|
690
|
+
const [descriptionId, setDescriptionId] = React$1.useState();
|
|
691
|
+
const [lockedDirection, setLockedDirection] = React$1.useState(null);
|
|
692
|
+
const rootRef = React$1.useRef(null);
|
|
693
|
+
const dragStartPosRef = React$1.useRef({
|
|
694
|
+
x: 0,
|
|
695
|
+
y: 0
|
|
696
|
+
});
|
|
697
|
+
const initialTransformRef = React$1.useRef({
|
|
698
|
+
x: 0,
|
|
699
|
+
y: 0,
|
|
700
|
+
scale: 1
|
|
701
|
+
});
|
|
702
|
+
const intendedSwipeDirectionRef = React$1.useRef(void 0);
|
|
703
|
+
const maxSwipeDisplacementRef = React$1.useRef(0);
|
|
704
|
+
const cancelledSwipeRef = React$1.useRef(false);
|
|
705
|
+
const swipeCancelBaselineRef = React$1.useRef({
|
|
706
|
+
x: 0,
|
|
707
|
+
y: 0
|
|
708
|
+
});
|
|
709
|
+
const isFirstPointerMoveRef = React$1.useRef(false);
|
|
710
|
+
const dragOffsetRef = React$1.useRef({
|
|
711
|
+
x: 0,
|
|
712
|
+
y: 0
|
|
713
|
+
});
|
|
714
|
+
const activePointerIdRef = React$1.useRef(null);
|
|
715
|
+
const dragAbortControllerRef = React$1.useRef(null);
|
|
716
|
+
const domIndex = store.useState("toastIndex", toast.id);
|
|
717
|
+
const visibleIndex = store.useState("toastVisibleIndex", toast.id);
|
|
718
|
+
const offsetY = store.useState("toastOffsetY", toast.id);
|
|
719
|
+
const focused = store.useState("focused");
|
|
720
|
+
const expanded = store.useState("expanded");
|
|
721
|
+
useOpenChangeComplete({
|
|
722
|
+
open: toast.transitionStatus !== "ending",
|
|
723
|
+
ref: rootRef,
|
|
724
|
+
onComplete() {
|
|
725
|
+
if (toast.transitionStatus === "ending") store.removeToast(toast.id);
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
const recalculateHeight = useStableCallback((flushSync = false) => {
|
|
729
|
+
const element = rootRef.current;
|
|
730
|
+
if (!element) return;
|
|
731
|
+
const previousHeight = element.style.height;
|
|
732
|
+
element.style.height = "auto";
|
|
733
|
+
const height = element.offsetHeight;
|
|
734
|
+
element.style.height = previousHeight;
|
|
735
|
+
function update() {
|
|
736
|
+
store.updateToastInternal(toast.id, {
|
|
737
|
+
ref: rootRef,
|
|
738
|
+
height,
|
|
739
|
+
...toast.transitionStatus === "starting" ? { transitionStatus: void 0 } : {}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
if (flushSync) ReactDOM.flushSync(update);
|
|
743
|
+
else update();
|
|
744
|
+
});
|
|
745
|
+
useIsoLayoutEffect(recalculateHeight, [recalculateHeight]);
|
|
746
|
+
function setResolvedDragOffset(nextDragOffset) {
|
|
747
|
+
dragOffsetRef.current = nextDragOffset;
|
|
748
|
+
setDragOffset(nextDragOffset);
|
|
749
|
+
}
|
|
750
|
+
useIsoLayoutEffect(() => {
|
|
751
|
+
return () => {
|
|
752
|
+
dragAbortControllerRef.current?.abort();
|
|
753
|
+
};
|
|
754
|
+
}, []);
|
|
755
|
+
function applyDirectionalDamping(deltaX, deltaY) {
|
|
756
|
+
let newDeltaX = deltaX;
|
|
757
|
+
let newDeltaY = deltaY;
|
|
758
|
+
if (!swipeDirections.includes("left") && !swipeDirections.includes("right")) newDeltaX = deltaX > 0 ? deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);
|
|
759
|
+
else {
|
|
760
|
+
if (!swipeDirections.includes("right") && deltaX > 0) newDeltaX = deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR;
|
|
761
|
+
if (!swipeDirections.includes("left") && deltaX < 0) newDeltaX = -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);
|
|
762
|
+
}
|
|
763
|
+
if (!swipeDirections.includes("up") && !swipeDirections.includes("down")) newDeltaY = deltaY > 0 ? deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);
|
|
764
|
+
else {
|
|
765
|
+
if (!swipeDirections.includes("down") && deltaY > 0) newDeltaY = deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR;
|
|
766
|
+
if (!swipeDirections.includes("up") && deltaY < 0) newDeltaY = -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);
|
|
767
|
+
}
|
|
768
|
+
return {
|
|
769
|
+
x: newDeltaX,
|
|
770
|
+
y: newDeltaY
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
const handleSwipeEnd = useStableCallback((event) => {
|
|
774
|
+
if (event.pointerId !== activePointerIdRef.current) return;
|
|
775
|
+
activePointerIdRef.current = null;
|
|
776
|
+
dragAbortControllerRef.current?.abort();
|
|
777
|
+
dragAbortControllerRef.current = null;
|
|
778
|
+
setIsSwiping(false);
|
|
779
|
+
setIsRealSwipe(false);
|
|
780
|
+
setLockedDirection(null);
|
|
781
|
+
const resolvedInitialTransform = initialTransformRef.current;
|
|
782
|
+
if (event.type === "pointercancel" || cancelledSwipeRef.current) {
|
|
783
|
+
setResolvedDragOffset({
|
|
784
|
+
x: resolvedInitialTransform.x,
|
|
785
|
+
y: resolvedInitialTransform.y
|
|
786
|
+
});
|
|
787
|
+
setCurrentSwipeDirection(void 0);
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
let shouldClose = false;
|
|
791
|
+
const resolvedDragOffset = dragOffsetRef.current;
|
|
792
|
+
const deltaX = resolvedDragOffset.x - resolvedInitialTransform.x;
|
|
793
|
+
const deltaY = resolvedDragOffset.y - resolvedInitialTransform.y;
|
|
794
|
+
let dismissDirection;
|
|
795
|
+
for (const direction of swipeDirections) {
|
|
796
|
+
switch (direction) {
|
|
797
|
+
case "right":
|
|
798
|
+
if (deltaX > SWIPE_THRESHOLD) {
|
|
799
|
+
shouldClose = true;
|
|
800
|
+
dismissDirection = "right";
|
|
801
|
+
}
|
|
802
|
+
break;
|
|
803
|
+
case "left":
|
|
804
|
+
if (deltaX < -40) {
|
|
805
|
+
shouldClose = true;
|
|
806
|
+
dismissDirection = "left";
|
|
807
|
+
}
|
|
808
|
+
break;
|
|
809
|
+
case "down":
|
|
810
|
+
if (deltaY > SWIPE_THRESHOLD) {
|
|
811
|
+
shouldClose = true;
|
|
812
|
+
dismissDirection = "down";
|
|
813
|
+
}
|
|
814
|
+
break;
|
|
815
|
+
case "up":
|
|
816
|
+
if (deltaY < -40) {
|
|
817
|
+
shouldClose = true;
|
|
818
|
+
dismissDirection = "up";
|
|
819
|
+
}
|
|
820
|
+
break;
|
|
821
|
+
default: break;
|
|
822
|
+
}
|
|
823
|
+
if (shouldClose) break;
|
|
824
|
+
}
|
|
825
|
+
if (shouldClose) {
|
|
826
|
+
setCurrentSwipeDirection(dismissDirection);
|
|
827
|
+
setDragDismissed(true);
|
|
828
|
+
store.closeToast(toast.id);
|
|
829
|
+
} else {
|
|
830
|
+
setResolvedDragOffset({
|
|
831
|
+
x: resolvedInitialTransform.x,
|
|
832
|
+
y: resolvedInitialTransform.y
|
|
833
|
+
});
|
|
834
|
+
setCurrentSwipeDirection(void 0);
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
function handlePointerDown(event) {
|
|
838
|
+
if (event.button !== 0) return;
|
|
839
|
+
if (event.pointerType === "touch") store.pauseTimers();
|
|
840
|
+
const target = getTarget(event.nativeEvent);
|
|
841
|
+
if (target ? target.closest(`button,a,input,textarea,[role="button"],${TOAST_SWIPE_IGNORE_SELECTOR}`) : false) return;
|
|
842
|
+
cancelledSwipeRef.current = false;
|
|
843
|
+
intendedSwipeDirectionRef.current = void 0;
|
|
844
|
+
maxSwipeDisplacementRef.current = 0;
|
|
845
|
+
activePointerIdRef.current = event.pointerId;
|
|
846
|
+
dragStartPosRef.current = {
|
|
847
|
+
x: event.clientX,
|
|
848
|
+
y: event.clientY
|
|
849
|
+
};
|
|
850
|
+
swipeCancelBaselineRef.current = dragStartPosRef.current;
|
|
851
|
+
if (rootRef.current) {
|
|
852
|
+
const transform = getElementTransform(rootRef.current);
|
|
853
|
+
initialTransformRef.current = transform;
|
|
854
|
+
setInitialTransform(transform);
|
|
855
|
+
setResolvedDragOffset({
|
|
856
|
+
x: transform.x,
|
|
857
|
+
y: transform.y
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
store.setHovering(true);
|
|
861
|
+
setIsSwiping(true);
|
|
862
|
+
setIsRealSwipe(false);
|
|
863
|
+
setLockedDirection(null);
|
|
864
|
+
isFirstPointerMoveRef.current = true;
|
|
865
|
+
const element = rootRef.current;
|
|
866
|
+
if (element) {
|
|
867
|
+
dragAbortControllerRef.current?.abort();
|
|
868
|
+
const dragAbortController = new AbortController();
|
|
869
|
+
dragAbortControllerRef.current = dragAbortController;
|
|
870
|
+
const doc = ownerDocument(element);
|
|
871
|
+
doc.addEventListener("pointerup", handleSwipeEnd, { signal: dragAbortController.signal });
|
|
872
|
+
doc.addEventListener("pointercancel", handleSwipeEnd, { signal: dragAbortController.signal });
|
|
873
|
+
element.setPointerCapture?.(event.pointerId);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
function handlePointerMove(event) {
|
|
877
|
+
if (event.pointerId !== activePointerIdRef.current) return;
|
|
878
|
+
event.preventDefault();
|
|
879
|
+
if (isFirstPointerMoveRef.current) {
|
|
880
|
+
dragStartPosRef.current = {
|
|
881
|
+
x: event.clientX,
|
|
882
|
+
y: event.clientY
|
|
883
|
+
};
|
|
884
|
+
isFirstPointerMoveRef.current = false;
|
|
885
|
+
}
|
|
886
|
+
const { clientY, clientX, movementX, movementY } = event;
|
|
887
|
+
if (movementY < 0 && clientY > swipeCancelBaselineRef.current.y || movementY > 0 && clientY < swipeCancelBaselineRef.current.y) swipeCancelBaselineRef.current = {
|
|
888
|
+
x: swipeCancelBaselineRef.current.x,
|
|
889
|
+
y: clientY
|
|
890
|
+
};
|
|
891
|
+
if (movementX < 0 && clientX > swipeCancelBaselineRef.current.x || movementX > 0 && clientX < swipeCancelBaselineRef.current.x) swipeCancelBaselineRef.current = {
|
|
892
|
+
x: clientX,
|
|
893
|
+
y: swipeCancelBaselineRef.current.y
|
|
894
|
+
};
|
|
895
|
+
const deltaX = clientX - dragStartPosRef.current.x;
|
|
896
|
+
const deltaY = clientY - dragStartPosRef.current.y;
|
|
897
|
+
const cancelDeltaY = clientY - swipeCancelBaselineRef.current.y;
|
|
898
|
+
const cancelDeltaX = clientX - swipeCancelBaselineRef.current.x;
|
|
899
|
+
if (!isRealSwipe) {
|
|
900
|
+
if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) >= MIN_DRAG_THRESHOLD) {
|
|
901
|
+
setIsRealSwipe(true);
|
|
902
|
+
if (lockedDirection === null) {
|
|
903
|
+
const hasHorizontal = swipeDirections.includes("left") || swipeDirections.includes("right");
|
|
904
|
+
const hasVertical = swipeDirections.includes("up") || swipeDirections.includes("down");
|
|
905
|
+
if (hasHorizontal && hasVertical) setLockedDirection(Math.abs(deltaX) > Math.abs(deltaY) ? "horizontal" : "vertical");
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
let candidate;
|
|
910
|
+
if (!intendedSwipeDirectionRef.current) {
|
|
911
|
+
if (lockedDirection === "vertical") {
|
|
912
|
+
if (deltaY > 0) candidate = "down";
|
|
913
|
+
else if (deltaY < 0) candidate = "up";
|
|
914
|
+
} else if (lockedDirection === "horizontal") {
|
|
915
|
+
if (deltaX > 0) candidate = "right";
|
|
916
|
+
else if (deltaX < 0) candidate = "left";
|
|
917
|
+
} else if (Math.abs(deltaX) >= Math.abs(deltaY)) candidate = deltaX > 0 ? "right" : "left";
|
|
918
|
+
else candidate = deltaY > 0 ? "down" : "up";
|
|
919
|
+
if (candidate && swipeDirections.includes(candidate)) {
|
|
920
|
+
intendedSwipeDirectionRef.current = candidate;
|
|
921
|
+
maxSwipeDisplacementRef.current = getDisplacement(candidate, deltaX, deltaY);
|
|
922
|
+
setCurrentSwipeDirection(candidate);
|
|
923
|
+
}
|
|
924
|
+
} else {
|
|
925
|
+
const direction = intendedSwipeDirectionRef.current;
|
|
926
|
+
const currentDisplacement = getDisplacement(direction, cancelDeltaX, cancelDeltaY);
|
|
927
|
+
if (currentDisplacement > SWIPE_THRESHOLD) {
|
|
928
|
+
cancelledSwipeRef.current = false;
|
|
929
|
+
setCurrentSwipeDirection(direction);
|
|
930
|
+
} else if (!(swipeDirections.includes("left") && swipeDirections.includes("right")) && !(swipeDirections.includes("up") && swipeDirections.includes("down")) && maxSwipeDisplacementRef.current - currentDisplacement >= REVERSE_CANCEL_THRESHOLD) cancelledSwipeRef.current = true;
|
|
931
|
+
}
|
|
932
|
+
const dampedDelta = applyDirectionalDamping(deltaX, deltaY);
|
|
933
|
+
let newOffsetX = initialTransformRef.current.x;
|
|
934
|
+
let newOffsetY = initialTransformRef.current.y;
|
|
935
|
+
if (lockedDirection === "horizontal") {
|
|
936
|
+
if (swipeDirections.includes("left") || swipeDirections.includes("right")) newOffsetX += dampedDelta.x;
|
|
937
|
+
} else if (lockedDirection === "vertical") {
|
|
938
|
+
if (swipeDirections.includes("up") || swipeDirections.includes("down")) newOffsetY += dampedDelta.y;
|
|
939
|
+
} else {
|
|
940
|
+
if (swipeDirections.includes("left") || swipeDirections.includes("right")) newOffsetX += dampedDelta.x;
|
|
941
|
+
if (swipeDirections.includes("up") || swipeDirections.includes("down")) newOffsetY += dampedDelta.y;
|
|
942
|
+
}
|
|
943
|
+
setResolvedDragOffset({
|
|
944
|
+
x: newOffsetX,
|
|
945
|
+
y: newOffsetY
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
function handleKeyDown(event) {
|
|
949
|
+
if (event.key === "Escape") {
|
|
950
|
+
if (!rootRef.current || !contains(rootRef.current, activeElement(ownerDocument(rootRef.current)))) return;
|
|
951
|
+
store.closeToast(toast.id);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
React$1.useEffect(() => {
|
|
955
|
+
if (!swipeEnabled) return;
|
|
956
|
+
const element = rootRef.current;
|
|
957
|
+
if (!element) return;
|
|
958
|
+
function preventDefaultTouchStart(event) {
|
|
959
|
+
if (activePointerIdRef.current === null || !contains(element, getTarget(event))) return;
|
|
960
|
+
event.preventDefault();
|
|
961
|
+
}
|
|
962
|
+
return addEventListener(element, "touchmove", preventDefaultTouchStart, { passive: false });
|
|
963
|
+
}, [swipeEnabled]);
|
|
964
|
+
function getDragStyles() {
|
|
965
|
+
if (!isSwiping && dragOffset.x === initialTransform.x && dragOffset.y === initialTransform.y && !dragDismissed) return {
|
|
966
|
+
[ToastRootCssVars.swipeMovementX]: "0px",
|
|
967
|
+
[ToastRootCssVars.swipeMovementY]: "0px"
|
|
968
|
+
};
|
|
969
|
+
const deltaX = dragOffset.x - initialTransform.x;
|
|
970
|
+
const deltaY = dragOffset.y - initialTransform.y;
|
|
971
|
+
return {
|
|
972
|
+
transition: isSwiping ? "none" : void 0,
|
|
973
|
+
transform: isSwiping ? `translateX(${dragOffset.x}px) translateY(${dragOffset.y}px) scale(${initialTransform.scale})` : void 0,
|
|
974
|
+
[ToastRootCssVars.swipeMovementX]: `${deltaX}px`,
|
|
975
|
+
[ToastRootCssVars.swipeMovementY]: `${deltaY}px`
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
const isHighPriority = toast.priority === "high";
|
|
979
|
+
const defaultProps = {
|
|
980
|
+
role: isHighPriority ? "alertdialog" : "dialog",
|
|
981
|
+
tabIndex: 0,
|
|
982
|
+
"aria-modal": false,
|
|
983
|
+
"aria-labelledby": titleId,
|
|
984
|
+
"aria-describedby": descriptionId,
|
|
985
|
+
"aria-hidden": isHighPriority && !focused ? true : void 0,
|
|
986
|
+
onPointerDown: swipeEnabled ? handlePointerDown : void 0,
|
|
987
|
+
onPointerMove: swipeEnabled ? handlePointerMove : void 0,
|
|
988
|
+
onPointerUp: swipeEnabled ? handleSwipeEnd : void 0,
|
|
989
|
+
onPointerCancel: swipeEnabled ? handleSwipeEnd : void 0,
|
|
990
|
+
onKeyDown: handleKeyDown,
|
|
991
|
+
inert: inertValue(toast.limited),
|
|
992
|
+
style: {
|
|
993
|
+
...getDragStyles(),
|
|
994
|
+
[ToastRootCssVars.index]: toast.transitionStatus === "ending" ? domIndex : visibleIndex,
|
|
995
|
+
[ToastRootCssVars.offsetY]: `${offsetY}px`,
|
|
996
|
+
[ToastRootCssVars.height]: toast.height ? `${toast.height}px` : void 0
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
const toastRoot = React$1.useMemo(() => ({
|
|
1000
|
+
rootRef,
|
|
1001
|
+
toast,
|
|
1002
|
+
titleId,
|
|
1003
|
+
setTitleId,
|
|
1004
|
+
descriptionId,
|
|
1005
|
+
setDescriptionId,
|
|
1006
|
+
swiping: isSwiping,
|
|
1007
|
+
swipeDirection: currentSwipeDirection,
|
|
1008
|
+
recalculateHeight,
|
|
1009
|
+
index: domIndex,
|
|
1010
|
+
visibleIndex,
|
|
1011
|
+
expanded
|
|
1012
|
+
}), [
|
|
1013
|
+
toast,
|
|
1014
|
+
titleId,
|
|
1015
|
+
descriptionId,
|
|
1016
|
+
isSwiping,
|
|
1017
|
+
currentSwipeDirection,
|
|
1018
|
+
recalculateHeight,
|
|
1019
|
+
domIndex,
|
|
1020
|
+
visibleIndex,
|
|
1021
|
+
expanded
|
|
1022
|
+
]);
|
|
1023
|
+
const state = {
|
|
1024
|
+
transitionStatus: toast.transitionStatus,
|
|
1025
|
+
expanded,
|
|
1026
|
+
limited: toast.limited || false,
|
|
1027
|
+
type: toast.type,
|
|
1028
|
+
swiping: toastRoot.swiping,
|
|
1029
|
+
swipeDirection: toastRoot.swipeDirection
|
|
1030
|
+
};
|
|
1031
|
+
const element = useRenderElement("div", componentProps, {
|
|
1032
|
+
ref: [forwardedRef, toastRoot.rootRef],
|
|
1033
|
+
state,
|
|
1034
|
+
stateAttributesMapping,
|
|
1035
|
+
props: [defaultProps, elementProps]
|
|
1036
|
+
});
|
|
1037
|
+
return /*#__PURE__*/ jsx(ToastRootContext.Provider, {
|
|
1038
|
+
value: toastRoot,
|
|
1039
|
+
children: element
|
|
1040
|
+
});
|
|
1041
|
+
});
|
|
1042
|
+
ToastRoot.displayName = "ToastRoot";
|
|
1043
|
+
//#endregion
|
|
1044
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/description/ToastDescription.mjs
|
|
1045
|
+
/**
|
|
1046
|
+
* A description that describes the toast.
|
|
1047
|
+
* Can be used as the default message for the toast when no title is provided.
|
|
1048
|
+
* Renders a `<p>` element.
|
|
1049
|
+
*
|
|
1050
|
+
* Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
|
|
1051
|
+
*/
|
|
1052
|
+
const ToastDescription = /*#__PURE__*/ React$1.forwardRef(function ToastDescription(componentProps, forwardedRef) {
|
|
1053
|
+
const { render, className, style, id: idProp, children: childrenProp, ...elementProps } = componentProps;
|
|
1054
|
+
const { toast, setDescriptionId } = useToastRootContext();
|
|
1055
|
+
const children = childrenProp ?? toast.description;
|
|
1056
|
+
const shouldRender = Boolean(children);
|
|
1057
|
+
const id = useId$1(idProp);
|
|
1058
|
+
useIsoLayoutEffect(() => {
|
|
1059
|
+
if (!shouldRender) return;
|
|
1060
|
+
setDescriptionId(id);
|
|
1061
|
+
return () => {
|
|
1062
|
+
setDescriptionId(void 0);
|
|
1063
|
+
};
|
|
1064
|
+
}, [
|
|
1065
|
+
shouldRender,
|
|
1066
|
+
id,
|
|
1067
|
+
setDescriptionId
|
|
1068
|
+
]);
|
|
1069
|
+
const element = useRenderElement("p", componentProps, {
|
|
1070
|
+
ref: forwardedRef,
|
|
1071
|
+
state: { type: toast.type },
|
|
1072
|
+
props: {
|
|
1073
|
+
...elementProps,
|
|
1074
|
+
id,
|
|
1075
|
+
children
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
if (!shouldRender) return null;
|
|
1079
|
+
return element;
|
|
1080
|
+
});
|
|
1081
|
+
ToastDescription.displayName = "ToastDescription";
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/positioner/ToastPositionerContext.mjs
|
|
1084
|
+
const ToastPositionerContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1085
|
+
ToastPositionerContext.displayName = "ToastPositionerContext";
|
|
1086
|
+
function useToastPositionerContext() {
|
|
1087
|
+
const context = React$1.useContext(ToastPositionerContext);
|
|
1088
|
+
if (context === void 0) throw new Error("Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.");
|
|
1089
|
+
return context;
|
|
1090
|
+
}
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/positioner/ToastPositioner.mjs
|
|
1093
|
+
/**
|
|
1094
|
+
* Positions the toast against the anchor.
|
|
1095
|
+
* Renders a `<div>` element.
|
|
1096
|
+
*
|
|
1097
|
+
* Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)
|
|
1098
|
+
*/
|
|
1099
|
+
const ToastPositioner = /*#__PURE__*/ React$1.forwardRef(function ToastPositioner(componentProps, forwardedRef) {
|
|
1100
|
+
const { toast, ...props } = componentProps;
|
|
1101
|
+
const store = useToastProviderContext();
|
|
1102
|
+
const positionerProps = toast.positionerProps ?? EMPTY_OBJECT;
|
|
1103
|
+
const { render, className, anchor: anchorProp = positionerProps.anchor, positionMethod = positionerProps.positionMethod ?? "absolute", side = positionerProps.side ?? "top", align = positionerProps.align ?? "center", sideOffset = positionerProps.sideOffset ?? 0, alignOffset = positionerProps.alignOffset ?? 0, collisionBoundary = positionerProps.collisionBoundary ?? "clipping-ancestors", collisionPadding = positionerProps.collisionPadding ?? 5, arrowPadding = positionerProps.arrowPadding ?? 5, sticky = positionerProps.sticky ?? false, disableAnchorTracking = positionerProps.disableAnchorTracking ?? false, collisionAvoidance = positionerProps.collisionAvoidance ?? POPUP_COLLISION_AVOIDANCE, style, ...elementProps } = props;
|
|
1104
|
+
const [positionerElement, setPositionerElement] = React$1.useState(null);
|
|
1105
|
+
const domIndex = store.useState("toastIndex", toast.id);
|
|
1106
|
+
const visibleIndex = store.useState("toastVisibleIndex", toast.id);
|
|
1107
|
+
const anchor = isElement(anchorProp) ? anchorProp : null;
|
|
1108
|
+
const positioning = useAnchorPositioning({
|
|
1109
|
+
anchor,
|
|
1110
|
+
positionMethod,
|
|
1111
|
+
floatingRootContext: useFloatingRootContext({
|
|
1112
|
+
open: true,
|
|
1113
|
+
onOpenChange: NOOP,
|
|
1114
|
+
elements: {
|
|
1115
|
+
floating: positionerElement,
|
|
1116
|
+
reference: anchor
|
|
1117
|
+
}
|
|
1118
|
+
}),
|
|
1119
|
+
mounted: true,
|
|
1120
|
+
side,
|
|
1121
|
+
sideOffset,
|
|
1122
|
+
align,
|
|
1123
|
+
alignOffset,
|
|
1124
|
+
collisionBoundary,
|
|
1125
|
+
collisionPadding,
|
|
1126
|
+
sticky,
|
|
1127
|
+
arrowPadding,
|
|
1128
|
+
disableAnchorTracking,
|
|
1129
|
+
keepMounted: true,
|
|
1130
|
+
collisionAvoidance
|
|
1131
|
+
});
|
|
1132
|
+
const element = usePositioner(componentProps, React$1.useMemo(() => ({
|
|
1133
|
+
side: positioning.side,
|
|
1134
|
+
align: positioning.align,
|
|
1135
|
+
anchorHidden: positioning.anchorHidden
|
|
1136
|
+
}), [
|
|
1137
|
+
positioning.side,
|
|
1138
|
+
positioning.align,
|
|
1139
|
+
positioning.anchorHidden
|
|
1140
|
+
]), {
|
|
1141
|
+
styles: {
|
|
1142
|
+
...positioning.positionerStyles,
|
|
1143
|
+
[ToastRootCssVars.index]: toast.transitionStatus === "ending" ? domIndex : visibleIndex
|
|
1144
|
+
},
|
|
1145
|
+
transitionStatus: toast.transitionStatus,
|
|
1146
|
+
props: elementProps,
|
|
1147
|
+
refs: [forwardedRef, setPositionerElement]
|
|
1148
|
+
});
|
|
1149
|
+
return /*#__PURE__*/ jsx(ToastPositionerContext.Provider, {
|
|
1150
|
+
value: positioning,
|
|
1151
|
+
children: element
|
|
1152
|
+
});
|
|
1153
|
+
});
|
|
1154
|
+
ToastPositioner.displayName = "ToastPositioner";
|
|
1155
|
+
//#endregion
|
|
1156
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/useToastManager.mjs
|
|
1157
|
+
/**
|
|
1158
|
+
* Returns the array of toasts and methods to manage them.
|
|
1159
|
+
*/
|
|
1160
|
+
function useToastManager() {
|
|
1161
|
+
const store = React$1.useContext(ToastContext);
|
|
1162
|
+
if (!store) throw new Error("Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
1163
|
+
const toasts = store.useState("toasts");
|
|
1164
|
+
return React$1.useMemo(() => ({
|
|
1165
|
+
toasts,
|
|
1166
|
+
add: store.addToast,
|
|
1167
|
+
close: store.closeToast,
|
|
1168
|
+
update: store.updateToast,
|
|
1169
|
+
promise: store.promiseToast
|
|
1170
|
+
}), [toasts, store]);
|
|
1171
|
+
}
|
|
1172
|
+
//#endregion
|
|
1173
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/toast/createToastManager.mjs
|
|
1174
|
+
/**
|
|
1175
|
+
* Creates a new toast manager.
|
|
1176
|
+
*/
|
|
1177
|
+
function createToastManager() {
|
|
1178
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1179
|
+
function emit(data) {
|
|
1180
|
+
listeners.forEach((listener) => listener(data));
|
|
1181
|
+
}
|
|
1182
|
+
return {
|
|
1183
|
+
" subscribe": function subscribe(listener) {
|
|
1184
|
+
listeners.add(listener);
|
|
1185
|
+
return () => {
|
|
1186
|
+
listeners.delete(listener);
|
|
1187
|
+
};
|
|
1188
|
+
},
|
|
1189
|
+
add(options) {
|
|
1190
|
+
const id = options.id || generateId("toast");
|
|
1191
|
+
emit({
|
|
1192
|
+
action: "add",
|
|
1193
|
+
options: {
|
|
1194
|
+
...options,
|
|
1195
|
+
id,
|
|
1196
|
+
transitionStatus: "starting"
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
return id;
|
|
1200
|
+
},
|
|
1201
|
+
close(id) {
|
|
1202
|
+
emit({
|
|
1203
|
+
action: "close",
|
|
1204
|
+
options: { id }
|
|
1205
|
+
});
|
|
1206
|
+
},
|
|
1207
|
+
update(id, updates) {
|
|
1208
|
+
emit({
|
|
1209
|
+
action: "update",
|
|
1210
|
+
options: {
|
|
1211
|
+
...updates,
|
|
1212
|
+
id
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
promise(promiseValue, options) {
|
|
1217
|
+
let handledPromise = promiseValue;
|
|
1218
|
+
emit({
|
|
1219
|
+
action: "promise",
|
|
1220
|
+
options: {
|
|
1221
|
+
...options,
|
|
1222
|
+
promise: promiseValue,
|
|
1223
|
+
setPromise(promise) {
|
|
1224
|
+
handledPromise = promise;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
return handledPromise;
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
//#endregion
|
|
1233
|
+
export { ToastDescription as a, ToastViewport as c, useToastPositionerContext as i, ToastProvider as l, useToastManager as n, ToastRoot as o, ToastPositioner as r, useToastRootContext as s, createToastManager as t, useToastProviderContext as u };
|