@aussieljk/forkbook 0.0.1-5 → 0.0.1-7
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/dist/_browser-chunks/{Color-GTF4GM7L.js → Color-2YRIFQLC.js} +1 -1
- package/dist/_browser-chunks/WithTooltip-4R5JMWZ7.js +196 -0
- package/dist/_browser-chunks/{chunk-MJY6ITYT.js → chunk-4EFKUJG2.js} +10 -10
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-DAUHYZUB.js} +550 -1621
- package/dist/_browser-chunks/chunk-E47B5255.js +1149 -0
- package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
- package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
- package/dist/_browser-chunks/{chunk-HOSBMS2F.js → chunk-HTL5ODCB.js} +1 -1
- package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
- package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/chunk-WVF42CP2.js +6027 -0
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
- package/dist/_node-chunks/{attached-runtime-IOE3BXIY.js → attached-runtime-WFZCCGUB.js} +29 -29
- package/dist/_node-chunks/{builder-manager-GDFEGD72.js → builder-manager-DHKHRZK4.js} +155 -148
- package/dist/_node-chunks/{chunk-M2QB5ALN.js → chunk-3ZCGT6VF.js} +6 -6
- package/dist/_node-chunks/{chunk-SUJXQU74.js → chunk-4HGC3G6B.js} +46 -15
- package/dist/_node-chunks/{chunk-WMQ2VCTF.js → chunk-5PYQ573S.js} +7 -7
- package/dist/_node-chunks/{chunk-TYCDPVIH.js → chunk-64JPAW3T.js} +6 -6
- package/dist/_node-chunks/chunk-6CB3XSQ2.js +495 -0
- package/dist/_node-chunks/{chunk-MHDKWHOA.js → chunk-6K3ZE4HN.js} +6 -6
- package/dist/_node-chunks/{chunk-3DCJB2D4.js → chunk-6QZ3PX5R.js} +6 -6
- package/dist/_node-chunks/{chunk-6DOJKR3V.js → chunk-7HVDL6M3.js} +29843 -51588
- package/dist/_node-chunks/chunk-7PMQPS5E.js +347 -0
- package/dist/_node-chunks/{chunk-L5CY6HKG.js → chunk-7V5AOV2J.js} +7 -7
- package/dist/_node-chunks/{chunk-AXJJB2K6.js → chunk-7VHCAGBJ.js} +8 -8
- package/dist/_node-chunks/{chunk-3DX6THMV.js → chunk-ATX7SHS7.js} +8 -8
- package/dist/_node-chunks/{chunk-SDXU22OH.js → chunk-BQC6WCUS.js} +6 -6
- package/dist/_node-chunks/{chunk-D6B2DRQZ.js → chunk-BR4WDRY6.js} +8 -8
- package/dist/_node-chunks/{chunk-SJZQ44OR.js → chunk-BRHJ4P3A.js} +6 -6
- package/dist/_node-chunks/{chunk-N4FLP7AO.js → chunk-CBBFNVFZ.js} +7 -7
- package/dist/_node-chunks/{chunk-PHXCOTMO.js → chunk-CDFQORVD.js} +34 -949
- package/dist/_node-chunks/{chunk-SR3BCYEH.js → chunk-CENNLCU7.js} +6 -6
- package/dist/_node-chunks/{chunk-OTFIQXHR.js → chunk-CNMMDQC3.js} +27 -50
- package/dist/_node-chunks/{chunk-E4C2H45J.js → chunk-DMDZPUHM.js} +6 -6
- package/dist/_node-chunks/{chunk-45LRLOYO.js → chunk-DT45EUDD.js} +60 -134
- package/dist/_node-chunks/{chunk-KQFHT7SW.js → chunk-EAL4RVEF.js} +6 -6
- package/dist/_node-chunks/chunk-EFFWFE6W.js +11 -0
- package/dist/_node-chunks/{chunk-MDGNN3FJ.js → chunk-ESCZ2NSB.js} +6 -6
- package/dist/_node-chunks/{chunk-T2I453AJ.js → chunk-ESZIQTUH.js} +7 -7
- package/dist/_node-chunks/{chunk-HWY2CAUH.js → chunk-F3SAYS4R.js} +6 -6
- package/dist/_node-chunks/{chunk-LSP54OYM.js → chunk-FTUQ7T3V.js} +25 -8
- package/dist/_node-chunks/{chunk-AAAUVDWT.js → chunk-FVFSSIGA.js} +10 -10
- package/dist/_node-chunks/{chunk-GS4VNNSS.js → chunk-G2AANC4A.js} +6 -6
- package/dist/_node-chunks/{chunk-SAAQFJL4.js → chunk-HUMAXGH2.js} +6 -6
- package/dist/_node-chunks/{chunk-A4XRNDN4.js → chunk-I535GEPH.js} +7 -7
- package/dist/_node-chunks/{chunk-CK4EHW3K.js → chunk-J3Q56GX3.js} +25 -25
- package/dist/_node-chunks/{chunk-U47PBQZ3.js → chunk-JDKYP7FW.js} +10 -10
- package/dist/_node-chunks/{chunk-7TUSIVWS.js → chunk-JED5F3H2.js} +6 -6
- package/dist/_node-chunks/{chunk-UM5G27IC.js → chunk-JMS4H7QB.js} +7 -7
- package/dist/_node-chunks/{chunk-GR65OLAH.js → chunk-JOSJ64KD.js} +7 -7
- package/dist/_node-chunks/{chunk-XUHEL63G.js → chunk-JPHSU5OI.js} +6 -6
- package/dist/_node-chunks/{chunk-NYWD5LYM.js → chunk-JQICISDD.js} +6 -6
- package/dist/_node-chunks/{chunk-I3DKGHVD.js → chunk-JTLOSDYL.js} +9 -9
- package/dist/_node-chunks/{chunk-5KAJVK4E.js → chunk-K5RUOW42.js} +7 -7
- package/dist/_node-chunks/{chunk-UKEJISQU.js → chunk-KHWCZDIW.js} +650 -9
- package/dist/_node-chunks/chunk-KWER36VB.js +20 -0
- package/dist/_node-chunks/{chunk-YTBTCM22.js → chunk-LJTP5PAJ.js} +6 -6
- package/dist/_node-chunks/chunk-LZYYZ62Y.js +19 -0
- package/dist/_node-chunks/{chunk-CGXW2HFE.js → chunk-M7ZVSBNU.js} +6 -6
- package/dist/_node-chunks/{chunk-BTFSFATC.js → chunk-MBIIJTGQ.js} +11 -10
- package/dist/_node-chunks/{chunk-VBSVLIXU.js → chunk-MF3AT3JQ.js} +6 -6
- package/dist/_node-chunks/{chunk-AX2ALHBK.js → chunk-MF5BYASO.js} +9 -6
- package/dist/_node-chunks/{chunk-JJNO3SFI.js → chunk-MJFMB4WD.js} +9 -9
- package/dist/_node-chunks/{chunk-E4TBS4MV.js → chunk-MRWBN46D.js} +8 -8
- package/dist/_node-chunks/{chunk-QQXFB4YA.js → chunk-MZQXEAI6.js} +9 -9
- package/dist/_node-chunks/{chunk-TZ2TZW2K.js → chunk-NLPC2DDQ.js} +6 -6
- package/dist/_node-chunks/{chunk-HCX5R46Q.js → chunk-NQAFLS5U.js} +8 -8
- package/dist/_node-chunks/{chunk-5LE7GXEC.js → chunk-NSZGBFPR.js} +6 -6
- package/dist/_node-chunks/{chunk-WHDCECIV.js → chunk-NUYBFTOU.js} +7 -7
- package/dist/_node-chunks/{chunk-RCPKLP3X.js → chunk-O7VJA7SM.js} +7 -7
- package/dist/_node-chunks/{chunk-2GY2FKLH.js → chunk-OGJ7LDX3.js} +7 -7
- package/dist/_node-chunks/{chunk-F4Q7OCCN.js → chunk-OWT6AVWK.js} +8 -8
- package/dist/_node-chunks/{chunk-LCXIUTOU.js → chunk-P3GOMPP3.js} +7 -7
- package/dist/_node-chunks/{chunk-KCAPE7OJ.js → chunk-PQLXHVWK.js} +6 -6
- package/dist/_node-chunks/{chunk-V45RRBTK.js → chunk-Q6QRFKHB.js} +8 -8
- package/dist/_node-chunks/{chunk-VJSOHPVD.js → chunk-QSP42ZBM.js} +6 -6
- package/dist/_node-chunks/{chunk-7XUQM6SR.js → chunk-QWDR5OWQ.js} +14 -14
- package/dist/_node-chunks/{chunk-YLKS7U3M.js → chunk-QWRQXG2V.js} +8 -8
- package/dist/_node-chunks/{chunk-4WO3GNZQ.js → chunk-R6AKCXPH.js} +6 -6
- package/dist/_node-chunks/{chunk-AXQ6LLSE.js → chunk-RCY7TLET.js} +8 -8
- package/dist/_node-chunks/chunk-RKKMQA6N.js +620 -0
- package/dist/_node-chunks/{chunk-BV3QRFE6.js → chunk-RZ7UEP4N.js} +6 -6
- package/dist/_node-chunks/{chunk-OSJFTZ5N.js → chunk-S3HB4EWT.js} +6 -6
- package/dist/_node-chunks/{chunk-QZVFIEOM.js → chunk-SHH7JROR.js} +6 -6
- package/dist/_node-chunks/{chunk-Q33BYVLY.js → chunk-SWHTDOB4.js} +7 -7
- package/dist/_node-chunks/{chunk-ZPPVG262.js → chunk-SZYMLCHF.js} +6 -6
- package/dist/_node-chunks/{chunk-ES5QZBSB.js → chunk-TOGDRW2W.js} +6 -6
- package/dist/_node-chunks/{chunk-J64XMUPF.js → chunk-U3E7E4Q2.js} +10 -10
- package/dist/_node-chunks/{chunk-RECGEABN.js → chunk-U6DHF3RM.js} +7 -7
- package/dist/_node-chunks/{chunk-OB2XHL53.js → chunk-UAG3XK32.js} +31 -30
- package/dist/_node-chunks/{chunk-BBD2KUV4.js → chunk-UF6Q6L5C.js} +22 -20
- package/dist/_node-chunks/chunk-UGXN7JTT.js +18 -0
- package/dist/_node-chunks/{chunk-EWAGCBER.js → chunk-UNCBLHIP.js} +8 -8
- package/dist/_node-chunks/chunk-UPJMGWMZ.js +25 -0
- package/dist/_node-chunks/chunk-UVV24PG4.js +69 -0
- package/dist/_node-chunks/{chunk-E6KXSYWR.js → chunk-WBB4NQ6H.js} +6 -6
- package/dist/_node-chunks/{chunk-B2IOB2V3.js → chunk-WHOF2BJB.js} +7 -7
- package/dist/_node-chunks/{chunk-FA36CEN4.js → chunk-WME5NEJA.js} +6 -6
- package/dist/_node-chunks/{chunk-BFZG4UTW.js → chunk-X63YMAHP.js} +7 -7
- package/dist/_node-chunks/chunk-Y2GHAOKI.js +25 -0
- package/dist/_node-chunks/{chunk-AXG3EMKS.js → chunk-Y6G64J5S.js} +7 -15
- package/dist/_node-chunks/chunk-YVIPYJ53.js +2609 -0
- package/dist/_node-chunks/{chunk-NDGTNFUN.js → chunk-YZWUD7I5.js} +16 -13
- package/dist/_node-chunks/{chunk-VN3A5CEH.js → chunk-ZIDIYSJQ.js} +7 -7
- package/dist/_node-chunks/chunk-ZSGOW4WQ.js +20 -0
- package/dist/_node-chunks/dist-5EG56KTF.js +16 -0
- package/dist/_node-chunks/dist-UEXSNGGQ.js +27 -0
- package/dist/_node-chunks/{local-runtime-RW6AAWSX.js → local-runtime-UN5QK2SE.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-BKWCT6CB.js → mdx-plugin-6M6CMNL3.js} +2263 -130
- package/dist/_node-chunks/{monorepo-ZFJ6HM34.js → monorepo-253VKW4B.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-C3EW4VJW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-3ZOE54OQ.js} +11 -11
- package/dist/_node-chunks/optimized-tests-JSWLRMEI.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-2ZMJNCBS.js → pattern-copy-play-CCCJRMSL.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-VMANBHPR.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-RT5Z62RV.js → rehype-external-links-LJTPLCGD.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-H5TWHJ6G.js → rehype-slug-KQI7ULEZ.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-DYLWZGE4.js → relaxed-limits-MUE2NI7S.js} +11 -11
- package/dist/_node-chunks/{run-65LLGSVR.js → run-PGZMPNMS.js} +246 -13
- package/dist/_node-chunks/{run-BQQLK454.js → run-SYLR25HA.js} +17 -17
- package/dist/_node-chunks/session-id-J4A25UQ6.js +23 -0
- package/dist/_node-chunks/{setup-NEO7XX66.js → setup-XZWSUYPG.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-6P3FZQTY.js → vitest.config.4.template-T25YYRGV.js} +7 -7
- package/dist/actions/decorator.js +2 -1
- package/dist/actions/index.js +2 -1
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +6 -5
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.js +28 -14
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +3 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +3 -2
- package/dist/addon-links/react/index.js +2 -1
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +21 -44
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +2 -2
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +15 -16
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +17 -17
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/bin/core.js +61 -60
- package/dist/bin/dispatcher.js +16 -11
- package/dist/bin/loader.js +16 -15
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-Jf7j2Ot0.d.ts → chunk-BGhyFTJO.d.ts} +1 -1
- package/dist/{chunk-Ce6uhJuR.d.ts → chunk-B_ZhEPlo.d.ts} +1 -1
- package/dist/{chunk-CZHsX9Zo.d.ts → chunk-CMaYrou5.d.ts} +1 -1
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
- package/dist/{chunk-DpljNJTz.d.ts → chunk-LrH1y9J2.d.ts} +39 -0
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +42 -4952
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +1 -1
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.js +3 -1
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +35 -37
- package/dist/components/index.d.ts +14 -231
- package/dist/components/index.js +2512 -8359
- package/dist/core-events/index.d.ts +3 -2
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +2 -2
- package/dist/core-server/index.js +450 -147
- package/dist/core-server/presets/common-manager.js +62 -866
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +39 -40
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +1 -1
- package/dist/csf/index.js +27 -93
- package/dist/csf-tools/index.d.ts +14 -12
- package/dist/csf-tools/index.js +14 -14
- package/dist/instrumenter/index.js +3 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BgVwdR45.js → globals-runtime-4fCHtNC6.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DW1HVuLt.js → globals-runtime-BKPOYSwp.js} +410 -379
- package/dist/manager/_manager-chunks/{globals-runtime-zVfMhZAt.js → globals-runtime-BMIT8BJb.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CUBVmgcG.js → globals-runtime-BO0pfoqL.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-Bke4A4DG.js → globals-runtime-BZKYJxYC.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-D_YKR9nf.js → globals-runtime-Bpc_ftuT.js} +1252 -539
- package/dist/manager/_manager-chunks/{globals-runtime-DCOX9nD5.js → globals-runtime-CBviMKtt.js} +1 -17
- package/dist/manager/_manager-chunks/{globals-runtime-CTB3rhS1.js → globals-runtime-CI-C7ncS.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-Cr3nYYcT.js → globals-runtime-CI_p54Ha.js} +59 -60
- package/dist/manager/_manager-chunks/{globals-runtime-CiLcg4q9.js → globals-runtime-CTyYXvUm.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DqNrRmOM.js → globals-runtime-CoCzM1V_.js} +93 -2146
- package/dist/manager/_manager-chunks/{globals-runtime-CXKb33hg.js → globals-runtime-CzEhVGVp.js} +141 -54
- package/dist/manager/_manager-chunks/{globals-runtime-CF4o9_wT.js → globals-runtime-D82vqOGq.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-ALpzCL93.js → globals-runtime-DB8fVA5g.js} +2 -145
- package/dist/manager/_manager-chunks/{globals-runtime-DMvB3-IM.js → globals-runtime-DMq1Phbl.js} +153 -141
- package/dist/manager/_manager-chunks/globals-runtime-DOPUchia.js +5282 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BcNHymiF.js → globals-runtime-Dbt08xWQ.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-m07udJ_K.js → globals-runtime-kmPSyf3j.js} +637 -1730
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-DrjpEyLM.js → runtime-B4U0u9p4.js} +5 -147
- package/dist/manager/_manager-chunks/{runtime-B-eSQdxk.js → runtime-BM30BmeT.js} +503 -44
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-a5zd7km2.js → runtime-Cf0p9DUx.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-Cdz2BHhM.js → runtime-D-nYLsdk.js} +57 -34
- package/dist/manager/_manager-chunks/runtime-D09XMY6V.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-Bldwclun.js → runtime-DvrwKw7z.js} +92 -303
- package/dist/manager/_manager-chunks/{runtime-DGHNKNQl.js → runtime-DzxaTqVN.js} +10 -29
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-Cmu7D8A0.js → runtime-ecY5qnmo.js} +193 -184
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +22 -28
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +16 -11
- package/dist/nextjs-vite/index.js +3 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +93 -14
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +1 -2
- package/dist/nextjs-vite-plugin/index.js +12 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.d.ts +65 -72
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +11 -13
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
- package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
- package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
- package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +2 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.js +25 -211
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/withStorybook.js +11 -10
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.js +3 -1
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +808 -573
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.js +22 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +21 -44
- package/dist/_browser-chunks/WithTooltip-V55S6YCY.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
- package/dist/_node-chunks/chunk-6QQTZT3Z.js +0 -19
- package/dist/_node-chunks/chunk-BRD332PB.js +0 -3008
- package/dist/_node-chunks/chunk-E2XKJLXK.js +0 -4731
- package/dist/_node-chunks/chunk-F2LQJXAB.js +0 -29
- package/dist/_node-chunks/chunk-MCZZMBPA.js +0 -20
- package/dist/_node-chunks/chunk-MMFUHYSU.js +0 -23
- package/dist/_node-chunks/chunk-UGFY5LEG.js +0 -18
- package/dist/_node-chunks/chunk-UO5ZOCSQ.js +0 -662
- package/dist/_node-chunks/chunk-UW35FCXF.js +0 -20
- package/dist/_node-chunks/chunk-VMUXW2E2.js +0 -5414
- package/dist/_node-chunks/chunk-VNXE7UJL.js +0 -51
- package/dist/_node-chunks/chunk-VRJJ43P2.js +0 -11
- package/dist/_node-chunks/chunk-WCJUS7OC.js +0 -1877
- package/dist/_node-chunks/chunk-WMBMSNB7.js +0 -36
- package/dist/_node-chunks/chunk-YV2QBXU6.js +0 -3823
- package/dist/_node-chunks/chunk-ZZNBVMBU.js +0 -25
- package/dist/_node-chunks/dist-VFUGPNLK.js +0 -16
- package/dist/_node-chunks/globby-N7LO32D3.js +0 -2884
- package/dist/_node-chunks/jiti-SJDZ7LQB.js +0 -3848
- package/dist/_node-chunks/lib-4HD6QL5R.js +0 -366
- package/dist/_node-chunks/optimized-tests-LVKXZ3HQ.js +0 -22
- package/dist/_node-chunks/postinstallAddon-I6MAL6PW.js +0 -20
- package/dist/_node-chunks/session-id-6Z2RXBTG.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-Bon7UvQk.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DDOIxI_l.js +0 -1584
- package/dist/manager/_manager-chunks/runtime-CuJiHYCp.js +0 -22
- package/dist/manager/_manager-chunks/runtime-DFhLVh8q.js +0 -456
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
|
@@ -2,102 +2,17 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-IMSF75WX.js";
|
|
4
4
|
|
|
5
|
-
// ../../node_modules/@base-ui/react/tabs/index.parts.mjs
|
|
6
|
-
var index_parts_exports = {};
|
|
7
|
-
__export(index_parts_exports, {
|
|
8
|
-
Indicator: () => TabsIndicator,
|
|
9
|
-
List: () => TabsList,
|
|
10
|
-
Panel: () => TabsPanel,
|
|
11
|
-
Root: () => TabsRoot,
|
|
12
|
-
Tab: () => TabsTab
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// ../../node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
|
|
16
|
-
import * as React11 from "react";
|
|
17
|
-
|
|
18
|
-
// ../../node_modules/@base-ui/utils/useControlled.mjs
|
|
19
|
-
import * as React from "react";
|
|
20
|
-
|
|
21
|
-
// ../../node_modules/@base-ui/utils/createLogOnce.mjs
|
|
22
|
-
var loggedMessages;
|
|
23
|
-
process.env.NODE_ENV !== "production" && (loggedMessages = /* @__PURE__ */ new Set());
|
|
24
|
-
function createLogOnce(severity, prefix) {
|
|
25
|
-
return function(...messages) {
|
|
26
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27
|
-
let message = messages.join(" "), output = prefix ? `${prefix}: ${message}` : message, key = `${severity}:${output}`;
|
|
28
|
-
loggedMessages.has(key) || (loggedMessages.add(key), severity === "warn" ? console.warn(output) : console.error(output));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ../../node_modules/@base-ui/utils/error.mjs
|
|
34
|
-
var error = createLogOnce("error", "Base UI");
|
|
35
|
-
|
|
36
|
-
// ../../node_modules/@base-ui/utils/useControlled.mjs
|
|
37
|
-
function useControlled({
|
|
38
|
-
controlled,
|
|
39
|
-
default: defaultProp,
|
|
40
|
-
name,
|
|
41
|
-
state = "value"
|
|
42
|
-
}) {
|
|
43
|
-
let {
|
|
44
|
-
current: isControlled
|
|
45
|
-
} = React.useRef(controlled !== void 0), [valueState, setValue] = React.useState(() => defaultProp), value = isControlled && controlled !== void 0 ? controlled : valueState;
|
|
46
|
-
if (process.env.NODE_ENV !== "production") {
|
|
47
|
-
React.useEffect(() => {
|
|
48
|
-
isControlled !== (controlled !== void 0) && error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
49
|
-
`));
|
|
50
|
-
}, [state, name, controlled]);
|
|
51
|
-
let {
|
|
52
|
-
current: defaultValue
|
|
53
|
-
} = React.useRef(defaultProp);
|
|
54
|
-
React.useEffect(() => {
|
|
55
|
-
!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp) && error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join(`
|
|
56
|
-
`));
|
|
57
|
-
}, [defaultProp]);
|
|
58
|
-
}
|
|
59
|
-
let setValueIfUncontrolled = React.useCallback((newValue) => {
|
|
60
|
-
isControlled || setValue(newValue);
|
|
61
|
-
}, []);
|
|
62
|
-
return [value, setValueIfUncontrolled];
|
|
63
|
-
}
|
|
64
|
-
function serializeToDevModeString(input) {
|
|
65
|
-
let nextId = 0, seen = /* @__PURE__ */ new WeakMap();
|
|
66
|
-
try {
|
|
67
|
-
return JSON.stringify(input, function(key, value) {
|
|
68
|
-
if (!(key === "_owner" && this != null && typeof this == "object" && "$$typeof" in this)) {
|
|
69
|
-
if (typeof value == "bigint")
|
|
70
|
-
return `__bigint__:${value}`;
|
|
71
|
-
if (value !== null && typeof value == "object") {
|
|
72
|
-
let id = seen.get(value);
|
|
73
|
-
if (id !== void 0)
|
|
74
|
-
return `__object__:${id}`;
|
|
75
|
-
seen.set(value, nextId), nextId += 1;
|
|
76
|
-
}
|
|
77
|
-
return value;
|
|
78
|
-
}
|
|
79
|
-
}) ?? `__top__:${typeof input}`;
|
|
80
|
-
} catch {
|
|
81
|
-
return "__unserializable__";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ../../node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
|
|
86
|
-
import * as React2 from "react";
|
|
87
|
-
var noop = () => {
|
|
88
|
-
}, useIsoLayoutEffect = typeof document < "u" ? React2.useLayoutEffect : noop;
|
|
89
|
-
|
|
90
5
|
// ../../node_modules/@base-ui/utils/safeReact.mjs
|
|
91
|
-
import * as
|
|
6
|
+
import * as React from "react";
|
|
92
7
|
var SafeReact = {
|
|
93
|
-
...
|
|
8
|
+
...React
|
|
94
9
|
};
|
|
95
10
|
|
|
96
11
|
// ../../node_modules/@base-ui/utils/useRefWithInit.mjs
|
|
97
|
-
import * as
|
|
12
|
+
import * as React2 from "react";
|
|
98
13
|
var UNINITIALIZED = {};
|
|
99
14
|
function useRefWithInit(init, initArg) {
|
|
100
|
-
let ref =
|
|
15
|
+
let ref = React2.useRef(UNINITIALIZED);
|
|
101
16
|
return ref.current === UNINITIALIZED && (ref.current = init(initArg)), ref;
|
|
102
17
|
}
|
|
103
18
|
|
|
@@ -130,8 +45,17 @@ function assertNotCalled() {
|
|
|
130
45
|
);
|
|
131
46
|
}
|
|
132
47
|
|
|
48
|
+
// ../../node_modules/@base-ui/utils/formatErrorMessage.mjs
|
|
49
|
+
function createFormatErrorMessage(baseUrl, prefix) {
|
|
50
|
+
return function(code, ...args) {
|
|
51
|
+
let url = new URL(baseUrl);
|
|
52
|
+
return url.searchParams.set("code", code.toString()), args.forEach((arg) => url.searchParams.append("args[]", arg)), `${prefix} error #${code}; visit ${url} for the full message.`;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var formatErrorMessage = createFormatErrorMessage("https://base-ui.com/production-error", "Base UI"), formatErrorMessage_default = formatErrorMessage;
|
|
56
|
+
|
|
133
57
|
// ../../node_modules/@base-ui/react/internals/useRenderElement.mjs
|
|
134
|
-
import * as
|
|
58
|
+
import * as React5 from "react";
|
|
135
59
|
|
|
136
60
|
// ../../node_modules/@base-ui/utils/useMergedRefs.mjs
|
|
137
61
|
function useMergedRefs(a, b, c, d) {
|
|
@@ -153,7 +77,7 @@ function didChange(forkRef, a, b, c, d) {
|
|
|
153
77
|
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
|
|
154
78
|
}
|
|
155
79
|
function didChangeN(forkRef, newRefs) {
|
|
156
|
-
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref,
|
|
80
|
+
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
|
|
157
81
|
}
|
|
158
82
|
function update(forkRef, refs) {
|
|
159
83
|
if (forkRef.refs = refs, refs.every((ref) => ref == null)) {
|
|
@@ -202,18 +126,18 @@ function update(forkRef, refs) {
|
|
|
202
126
|
}
|
|
203
127
|
|
|
204
128
|
// ../../node_modules/@base-ui/utils/getReactElementRef.mjs
|
|
205
|
-
import * as
|
|
129
|
+
import * as React4 from "react";
|
|
206
130
|
|
|
207
131
|
// ../../node_modules/@base-ui/utils/reactVersion.mjs
|
|
208
|
-
import * as
|
|
209
|
-
var majorVersion = parseInt(
|
|
132
|
+
import * as React3 from "react";
|
|
133
|
+
var majorVersion = parseInt(React3.version, 10);
|
|
210
134
|
function isReactVersionAtLeast(reactVersionToCheck) {
|
|
211
135
|
return majorVersion >= reactVersionToCheck;
|
|
212
136
|
}
|
|
213
137
|
|
|
214
138
|
// ../../node_modules/@base-ui/utils/getReactElementRef.mjs
|
|
215
139
|
function getReactElementRef(element) {
|
|
216
|
-
if (!
|
|
140
|
+
if (!React4.isValidElement(element))
|
|
217
141
|
return null;
|
|
218
142
|
let reactElement = element, propsWithRef = reactElement.props;
|
|
219
143
|
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
|
|
@@ -232,6 +156,18 @@ function mergeObjects(a, b) {
|
|
|
232
156
|
};
|
|
233
157
|
}
|
|
234
158
|
|
|
159
|
+
// ../../node_modules/@base-ui/utils/createLogOnce.mjs
|
|
160
|
+
var loggedMessages;
|
|
161
|
+
process.env.NODE_ENV !== "production" && (loggedMessages = /* @__PURE__ */ new Set());
|
|
162
|
+
function createLogOnce(severity, prefix) {
|
|
163
|
+
return function(...messages) {
|
|
164
|
+
if (process.env.NODE_ENV !== "production") {
|
|
165
|
+
let message = messages.join(" "), output = prefix ? `${prefix}: ${message}` : message, key = `${severity}:${output}`;
|
|
166
|
+
loggedMessages.has(key) || (loggedMessages.add(key), severity === "warn" ? console.warn(output) : console.error(output));
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
235
171
|
// ../../node_modules/@base-ui/utils/warn.mjs
|
|
236
172
|
var warn = createLogOnce("warn", "Base UI");
|
|
237
173
|
|
|
@@ -378,9 +314,9 @@ function useRenderElementProps(componentProps, params, renderProp) {
|
|
|
378
314
|
state = EMPTY_OBJECT,
|
|
379
315
|
ref,
|
|
380
316
|
props,
|
|
381
|
-
stateAttributesMapping
|
|
317
|
+
stateAttributesMapping,
|
|
382
318
|
enabled = !0
|
|
383
|
-
} = params, className = enabled ? resolveClassName(classNameProp, state) : void 0, style = enabled ? resolveStyle(styleProp, state) : void 0, stateProps = enabled ? getStateAttributesProps(state,
|
|
319
|
+
} = params, className = enabled ? resolveClassName(classNameProp, state) : void 0, style = enabled ? resolveStyle(styleProp, state) : void 0, stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT, resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0, outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
|
|
384
320
|
return typeof document < "u" && (enabled ? Array.isArray(ref) ? outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]) : outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref) : useMergedRefs(null, null)), enabled ? (className !== void 0 && (outProps.className = mergeClassNames(outProps.className, className)), style !== void 0 && (outProps.style = mergeObjects(outProps.style, style)), outProps) : EMPTY_OBJECT;
|
|
385
321
|
}
|
|
386
322
|
function resolveRenderFunctionProps(props) {
|
|
@@ -390,18 +326,18 @@ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), COMPONENT_IDENTI
|
|
|
390
326
|
function unwrapLazyRenderProp(render) {
|
|
391
327
|
if (render?.$$typeof !== REACT_LAZY_TYPE)
|
|
392
328
|
return render;
|
|
393
|
-
let unwrapped =
|
|
394
|
-
return
|
|
329
|
+
let unwrapped = React5.Children.toArray(render)[0];
|
|
330
|
+
return React5.isValidElement(unwrapped) ? unwrapped : render;
|
|
395
331
|
}
|
|
396
332
|
function evaluateRenderProp(element, render, props, state) {
|
|
397
333
|
if (render) {
|
|
398
334
|
if (typeof render == "function")
|
|
399
335
|
return process.env.NODE_ENV !== "production" && warnIfRenderPropLooksLikeComponent(render), render(props, state);
|
|
400
336
|
let mergedProps = mergeProps(props, render.props);
|
|
401
|
-
if (mergedProps.ref = props.ref, process.env.NODE_ENV !== "production" && !
|
|
337
|
+
if (mergedProps.ref = props.ref, process.env.NODE_ENV !== "production" && !React5.isValidElement(render))
|
|
402
338
|
throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join(`
|
|
403
339
|
`));
|
|
404
|
-
return
|
|
340
|
+
return React5.cloneElement(render, mergedProps);
|
|
405
341
|
}
|
|
406
342
|
return renderTag(element, props);
|
|
407
343
|
}
|
|
@@ -418,382 +354,43 @@ function renderTag(Tag, props) {
|
|
|
418
354
|
alt: "",
|
|
419
355
|
...props,
|
|
420
356
|
key: props.key
|
|
421
|
-
}) :
|
|
357
|
+
}) : React5.createElement(Tag, props);
|
|
422
358
|
}
|
|
423
359
|
|
|
424
|
-
// ../../node_modules/@base-ui/
|
|
425
|
-
import * as
|
|
426
|
-
|
|
427
|
-
// ../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
|
|
428
|
-
import * as React8 from "react";
|
|
429
|
-
var CompositeListContext = React8.createContext({
|
|
430
|
-
register: () => {
|
|
431
|
-
},
|
|
432
|
-
unregister: () => {
|
|
433
|
-
},
|
|
434
|
-
subscribeMapChange: () => () => {
|
|
435
|
-
},
|
|
436
|
-
nextIndexRef: {
|
|
437
|
-
current: 0
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
|
-
process.env.NODE_ENV !== "production" && (CompositeListContext.displayName = "CompositeListContext");
|
|
441
|
-
function useCompositeListContext() {
|
|
442
|
-
return React8.useContext(CompositeListContext);
|
|
443
|
-
}
|
|
360
|
+
// ../../node_modules/@base-ui/utils/useId.mjs
|
|
361
|
+
import * as React7 from "react";
|
|
444
362
|
|
|
445
|
-
// ../../node_modules/@base-ui/
|
|
446
|
-
import
|
|
447
|
-
function
|
|
448
|
-
let {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
labelsRef,
|
|
452
|
-
onMapChange: onMapChangeProp
|
|
453
|
-
} = props, onMapChange = useStableCallback(onMapChangeProp), [, setMapTick] = React9.useState(0), listeners = useRefWithInit(createListeners).current, map = useRefWithInit(createMap).current, nextIndexRef = React9.useRef(0), isDirtyRef = React9.useRef(!0), itemsRef = React9.useRef(null), mutationObserverRef = React9.useRef(null), scheduleMapUpdate = useStableCallback(() => {
|
|
454
|
-
isDirtyRef.current || (isDirtyRef.current = !0, setMapTick((tick) => tick + 1));
|
|
455
|
-
}), register = useStableCallback((node, registration) => {
|
|
456
|
-
map.set(node, registration), scheduleMapUpdate();
|
|
457
|
-
}), unregister = useStableCallback((node) => {
|
|
458
|
-
map.delete(node), scheduleMapUpdate();
|
|
459
|
-
}), syncRefs = useStableCallback((items) => {
|
|
460
|
-
let nextMap = /* @__PURE__ */ new Map();
|
|
461
|
-
return elementsRef.current.length = 0, labelsRef && (labelsRef.current.length = 0), items.forEach((item) => {
|
|
462
|
-
nextMap.set(item.element, {
|
|
463
|
-
...item.registration.metadata ?? {},
|
|
464
|
-
index: item.index
|
|
465
|
-
}), elementsRef.current[item.index] = item.element, labelsRef && (labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent);
|
|
466
|
-
}), nextIndexRef.current = elementsRef.current.length, nextMap;
|
|
467
|
-
});
|
|
468
|
-
function observe(sortedNodes) {
|
|
469
|
-
if (mutationObserverRef.current?.disconnect(), mutationObserverRef.current = null, typeof MutationObserver != "function" || sortedNodes.length < 2)
|
|
470
|
-
return;
|
|
471
|
-
let mutationObserver = new MutationObserver((entries) => {
|
|
472
|
-
if (!hasMovedNode(entries))
|
|
473
|
-
return;
|
|
474
|
-
let previousConnectedNode = null;
|
|
475
|
-
for (let node of sortedNodes)
|
|
476
|
-
if (node.isConnected) {
|
|
477
|
-
if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
|
|
478
|
-
mutationObserver.disconnect(), scheduleMapUpdate();
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
previousConnectedNode = node;
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
mutationObserverRef.current = mutationObserver;
|
|
485
|
-
let roots = /* @__PURE__ */ new Set();
|
|
486
|
-
for (let i = 1; i < sortedNodes.length; i += 1) {
|
|
487
|
-
let root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
|
|
488
|
-
root && roots.add(root);
|
|
489
|
-
}
|
|
490
|
-
roots.forEach((root) => mutationObserver.observe(root, {
|
|
491
|
-
childList: !0
|
|
492
|
-
}));
|
|
493
|
-
}
|
|
494
|
-
let flush = useStableCallback(() => {
|
|
495
|
-
let [items, automaticNodes] = getCompositeListSnapshot(map), nextMap = syncRefs(items), previousItems = itemsRef.current, changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => {
|
|
496
|
-
let previousItem = previousItems[index2];
|
|
497
|
-
return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
|
|
498
|
-
});
|
|
499
|
-
observe(automaticNodes), itemsRef.current = items, isDirtyRef.current = !1, changed && (listeners.forEach((listener) => listener(nextMap)), onMapChange(nextMap));
|
|
500
|
-
});
|
|
501
|
-
useIsoLayoutEffect(() => (!isDirtyRef.current && itemsRef.current && syncRefs(itemsRef.current), () => {
|
|
502
|
-
elementsRef.current = [], labelsRef && (labelsRef.current = []);
|
|
503
|
-
}), [elementsRef, labelsRef, syncRefs]), useIsoLayoutEffect(() => {
|
|
504
|
-
isDirtyRef.current && flush();
|
|
505
|
-
}), useIsoLayoutEffect(() => () => {
|
|
506
|
-
mutationObserverRef.current?.disconnect(), isDirtyRef.current = !0;
|
|
363
|
+
// ../../node_modules/@base-ui/utils/useForcedRerendering.mjs
|
|
364
|
+
import * as React6 from "react";
|
|
365
|
+
function useForcedRerendering() {
|
|
366
|
+
let [, setState] = React6.useState({});
|
|
367
|
+
return React6.useCallback(() => {
|
|
368
|
+
setState({});
|
|
507
369
|
}, []);
|
|
508
|
-
let subscribeMapChange = useStableCallback((fn) => (listeners.add(fn), () => {
|
|
509
|
-
listeners.delete(fn);
|
|
510
|
-
})), contextValue = React9.useMemo(() => ({
|
|
511
|
-
register,
|
|
512
|
-
unregister,
|
|
513
|
-
subscribeMapChange,
|
|
514
|
-
nextIndexRef
|
|
515
|
-
}), [register, unregister, subscribeMapChange, nextIndexRef]);
|
|
516
|
-
return _jsx(CompositeListContext.Provider, {
|
|
517
|
-
value: contextValue,
|
|
518
|
-
children
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
function createMap() {
|
|
522
|
-
return /* @__PURE__ */ new Map();
|
|
523
|
-
}
|
|
524
|
-
function createListeners() {
|
|
525
|
-
return /* @__PURE__ */ new Set();
|
|
526
|
-
}
|
|
527
|
-
function getCompositeListSnapshot(map) {
|
|
528
|
-
let reservedIndices = /* @__PURE__ */ new Set(), items = [], automaticItems = [];
|
|
529
|
-
map.forEach((registration, node) => {
|
|
530
|
-
if (!node.isConnected)
|
|
531
|
-
return;
|
|
532
|
-
let index2 = registration.index, item = {
|
|
533
|
-
index: index2 ?? -1,
|
|
534
|
-
element: node,
|
|
535
|
-
registration
|
|
536
|
-
};
|
|
537
|
-
index2 === null ? automaticItems.push(item) : index2 >= 0 && (reservedIndices.add(index2), items.push(item));
|
|
538
|
-
});
|
|
539
|
-
let nextAutomaticIndex = 0;
|
|
540
|
-
return automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element)), automaticItems.forEach((item) => {
|
|
541
|
-
for (; reservedIndices.has(nextAutomaticIndex); )
|
|
542
|
-
nextAutomaticIndex += 1;
|
|
543
|
-
item.index = nextAutomaticIndex, items.push(item), nextAutomaticIndex += 1;
|
|
544
|
-
}), reservedIndices.size > 0 && items.sort((a, b) => a.index - b.index), [items, automaticItems.map((item) => item.element)];
|
|
545
|
-
}
|
|
546
|
-
function getCommonAncestor(firstNode, lastNode) {
|
|
547
|
-
let ancestor = firstNode.parentElement;
|
|
548
|
-
for (; ancestor && !ancestor.contains(lastNode); )
|
|
549
|
-
ancestor = ancestor.parentElement;
|
|
550
|
-
return ancestor;
|
|
551
|
-
}
|
|
552
|
-
function hasMovedNode(entries) {
|
|
553
|
-
for (let entry of entries)
|
|
554
|
-
for (let i = 0; i < entry.removedNodes.length; i += 1)
|
|
555
|
-
if (entry.removedNodes[i].isConnected)
|
|
556
|
-
return !0;
|
|
557
|
-
return !1;
|
|
558
|
-
}
|
|
559
|
-
function sortByDocumentPosition(a, b) {
|
|
560
|
-
return a.nextElementSibling === b ? -1 : b.nextElementSibling === a ? 1 : a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
// ../../node_modules/@base-ui/utils/formatErrorMessage.mjs
|
|
564
|
-
function createFormatErrorMessage(baseUrl, prefix) {
|
|
565
|
-
return function(code, ...args) {
|
|
566
|
-
let url = new URL(baseUrl);
|
|
567
|
-
return url.searchParams.set("code", code.toString()), args.forEach((arg) => url.searchParams.append("args[]", arg)), `${prefix} error #${code}; visit ${url} for the full message.`;
|
|
568
|
-
};
|
|
569
370
|
}
|
|
570
|
-
var formatErrorMessage = createFormatErrorMessage("https://base-ui.com/production-error", "Base UI"), formatErrorMessage_default = formatErrorMessage;
|
|
571
371
|
|
|
572
|
-
// ../../node_modules/@base-ui/
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>." : formatErrorMessage_default(64));
|
|
580
|
-
return context;
|
|
372
|
+
// ../../node_modules/@base-ui/utils/useId.mjs
|
|
373
|
+
var globalId = 0;
|
|
374
|
+
function useGlobalId(idOverride, prefix = "mui") {
|
|
375
|
+
let defaultId = React7.useRef(void 0), forceRerender = useForcedRerendering(), id = idOverride ?? defaultId.current;
|
|
376
|
+
return React7.useEffect(() => {
|
|
377
|
+
defaultId.current == null && (globalId += 1, defaultId.current = `${prefix}-${globalId}`, idOverride == null && forceRerender());
|
|
378
|
+
}, [idOverride, prefix, forceRerender]), id;
|
|
581
379
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
[activationDirection]: dir
|
|
590
|
-
})
|
|
591
|
-
};
|
|
592
|
-
|
|
593
|
-
// ../../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
|
|
594
|
-
function createChangeEventDetails(reason, event, trigger, customProperties) {
|
|
595
|
-
let canceled = !1, allowPropagation = !1, custom = customProperties ?? EMPTY_OBJECT;
|
|
596
|
-
return {
|
|
597
|
-
reason,
|
|
598
|
-
event: event ?? new Event("base-ui"),
|
|
599
|
-
cancel() {
|
|
600
|
-
canceled = !0;
|
|
601
|
-
},
|
|
602
|
-
allowPropagation() {
|
|
603
|
-
allowPropagation = !0;
|
|
604
|
-
},
|
|
605
|
-
get isCanceled() {
|
|
606
|
-
return canceled;
|
|
607
|
-
},
|
|
608
|
-
get isPropagationAllowed() {
|
|
609
|
-
return allowPropagation;
|
|
610
|
-
},
|
|
611
|
-
trigger,
|
|
612
|
-
...custom
|
|
613
|
-
};
|
|
380
|
+
var maybeReactUseId = SafeReact.useId;
|
|
381
|
+
function useId(idOverride, prefix) {
|
|
382
|
+
if (maybeReactUseId !== void 0) {
|
|
383
|
+
let reactId = maybeReactUseId();
|
|
384
|
+
return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
|
|
385
|
+
}
|
|
386
|
+
return useGlobalId(idOverride, prefix);
|
|
614
387
|
}
|
|
615
388
|
|
|
616
|
-
// ../../node_modules/@base-ui/react/internals/
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
cancelOpen: () => cancelOpen,
|
|
620
|
-
chipRemovePress: () => chipRemovePress,
|
|
621
|
-
clearPress: () => clearPress,
|
|
622
|
-
closePress: () => closePress,
|
|
623
|
-
closeWatcher: () => closeWatcher,
|
|
624
|
-
decrementPress: () => decrementPress,
|
|
625
|
-
disabled: () => disabled,
|
|
626
|
-
drag: () => drag,
|
|
627
|
-
escapeKey: () => escapeKey,
|
|
628
|
-
focusOut: () => focusOut,
|
|
629
|
-
imperativeAction: () => imperativeAction,
|
|
630
|
-
incrementPress: () => incrementPress,
|
|
631
|
-
initial: () => initial,
|
|
632
|
-
inputBlur: () => inputBlur,
|
|
633
|
-
inputChange: () => inputChange,
|
|
634
|
-
inputClear: () => inputClear,
|
|
635
|
-
inputPaste: () => inputPaste,
|
|
636
|
-
inputPress: () => inputPress,
|
|
637
|
-
itemPress: () => itemPress,
|
|
638
|
-
keyboard: () => keyboard,
|
|
639
|
-
linkPress: () => linkPress,
|
|
640
|
-
listNavigation: () => listNavigation,
|
|
641
|
-
missing: () => missing,
|
|
642
|
-
none: () => none,
|
|
643
|
-
outsidePress: () => outsidePress,
|
|
644
|
-
pointer: () => pointer,
|
|
645
|
-
popupClose: () => popupClose,
|
|
646
|
-
scrub: () => scrub,
|
|
647
|
-
siblingOpen: () => siblingOpen,
|
|
648
|
-
swipe: () => swipe,
|
|
649
|
-
trackPress: () => trackPress,
|
|
650
|
-
triggerFocus: () => triggerFocus,
|
|
651
|
-
triggerHover: () => triggerHover,
|
|
652
|
-
triggerPress: () => triggerPress,
|
|
653
|
-
wheel: () => wheel,
|
|
654
|
-
windowResize: () => windowResize
|
|
655
|
-
});
|
|
656
|
-
var none = "none", triggerPress = "trigger-press", triggerHover = "trigger-hover", triggerFocus = "trigger-focus", outsidePress = "outside-press", itemPress = "item-press", closePress = "close-press", linkPress = "link-press", clearPress = "clear-press", chipRemovePress = "chip-remove-press", trackPress = "track-press", incrementPress = "increment-press", decrementPress = "decrement-press", inputChange = "input-change", inputClear = "input-clear", inputBlur = "input-blur", inputPaste = "input-paste", inputPress = "input-press", focusOut = "focus-out", escapeKey = "escape-key", closeWatcher = "close-watcher", listNavigation = "list-navigation", keyboard = "keyboard", pointer = "pointer", drag = "drag", wheel = "wheel", scrub = "scrub", popupClose = "popup-close", cancelOpen = "cancel-open", siblingOpen = "sibling-open", disabled = "disabled", missing = "missing", initial = "initial", imperativeAction = "imperative-action", swipe = "swipe", windowResize = "window-resize";
|
|
657
|
-
|
|
658
|
-
// ../../node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
|
|
659
|
-
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
660
|
-
var TabsRoot = React11.forwardRef(function(componentProps, forwardedRef) {
|
|
661
|
-
let {
|
|
662
|
-
className,
|
|
663
|
-
defaultValue: defaultValueProp = 0,
|
|
664
|
-
onValueChange: onValueChangeProp,
|
|
665
|
-
orientation = "horizontal",
|
|
666
|
-
render,
|
|
667
|
-
value: valueProp,
|
|
668
|
-
style,
|
|
669
|
-
...elementProps
|
|
670
|
-
} = componentProps, hasExplicitDefaultValueProp = componentProps.defaultValue !== void 0, tabPanelRefs = React11.useRef([]), [mountedTabPanels, setMountedTabPanels] = React11.useState(() => /* @__PURE__ */ new Map()), [value, setValue] = useControlled({
|
|
671
|
-
controlled: valueProp,
|
|
672
|
-
default: defaultValueProp,
|
|
673
|
-
name: "Tabs",
|
|
674
|
-
state: "value"
|
|
675
|
-
}), isControlled = valueProp !== void 0, [tabMap, setTabMap] = React11.useState(() => /* @__PURE__ */ new Map()), lastKnownTabElementRef = React11.useRef(void 0), getTabElementBySelectedValue = React11.useCallback((selectedValue) => findTabElement(tabMap, selectedValue), [tabMap]), [activationDirectionState, setActivationDirectionState] = React11.useState(() => ({
|
|
676
|
-
previousValue: value,
|
|
677
|
-
tabActivationDirection: "none"
|
|
678
|
-
})), {
|
|
679
|
-
previousValue,
|
|
680
|
-
tabActivationDirection: committedTabActivationDirection
|
|
681
|
-
} = activationDirectionState, tabActivationDirection = committedTabActivationDirection, directionComputationIncomplete = !1;
|
|
682
|
-
previousValue !== value && (tabActivationDirection = computeActivationDirection(previousValue, value, orientation, tabMap), directionComputationIncomplete = previousValue != null && value != null && getTabElementBySelectedValue(value) == null);
|
|
683
|
-
let nextPreviousValue = directionComputationIncomplete ? previousValue : value, shouldSyncActivationDirectionState = previousValue !== nextPreviousValue || committedTabActivationDirection !== tabActivationDirection;
|
|
684
|
-
useIsoLayoutEffect(() => {
|
|
685
|
-
shouldSyncActivationDirectionState && setActivationDirectionState({
|
|
686
|
-
previousValue: nextPreviousValue,
|
|
687
|
-
tabActivationDirection
|
|
688
|
-
});
|
|
689
|
-
}, [nextPreviousValue, shouldSyncActivationDirectionState, tabActivationDirection]);
|
|
690
|
-
let onValueChange = useStableCallback((newValue, eventDetails) => {
|
|
691
|
-
let activationDirection2 = computeActivationDirection(value, newValue, orientation, tabMap);
|
|
692
|
-
eventDetails.activationDirection = activationDirection2, onValueChangeProp?.(newValue, eventDetails), !eventDetails.isCanceled && setValue(() => newValue);
|
|
693
|
-
}), notifyAutomaticValueChange = useStableCallback((nextValue, reason) => {
|
|
694
|
-
onValueChangeProp?.(nextValue, createChangeEventDetails(reason, void 0, void 0, {
|
|
695
|
-
activationDirection: "none"
|
|
696
|
-
}));
|
|
697
|
-
}), registerMountedTabPanel = useStableCallback((panelValue, panelId) => (setMountedTabPanels((prev) => {
|
|
698
|
-
let next = new Map(prev);
|
|
699
|
-
return next.set(panelValue, panelId), next;
|
|
700
|
-
}), () => {
|
|
701
|
-
setMountedTabPanels((prev) => {
|
|
702
|
-
if (prev.get(panelValue) !== panelId)
|
|
703
|
-
return prev;
|
|
704
|
-
let next = new Map(prev);
|
|
705
|
-
return next.delete(panelValue), next;
|
|
706
|
-
});
|
|
707
|
-
})), getTabPanelIdByValue = React11.useCallback((tabValue) => mountedTabPanels.get(tabValue), [mountedTabPanels]), getTabIdByPanelValue = React11.useCallback((tabPanelValue) => {
|
|
708
|
-
for (let tabMetadata of tabMap.values())
|
|
709
|
-
if (tabPanelValue === tabMetadata.value)
|
|
710
|
-
return tabMetadata.id;
|
|
711
|
-
}, [tabMap]), tabsContextValue = React11.useMemo(() => ({
|
|
712
|
-
getTabElementBySelectedValue,
|
|
713
|
-
getTabIdByPanelValue,
|
|
714
|
-
getTabPanelIdByValue,
|
|
715
|
-
onValueChange,
|
|
716
|
-
orientation,
|
|
717
|
-
registerMountedTabPanel,
|
|
718
|
-
setTabMap,
|
|
719
|
-
tabActivationDirection,
|
|
720
|
-
value
|
|
721
|
-
}), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, tabActivationDirection, value]), selectedTabMetadata = React11.useMemo(() => {
|
|
722
|
-
for (let tabMetadata of tabMap.values())
|
|
723
|
-
if (tabMetadata.value === value)
|
|
724
|
-
return tabMetadata;
|
|
725
|
-
}, [tabMap, value]), firstEnabledTabValue = React11.useMemo(() => {
|
|
726
|
-
for (let tabMetadata of tabMap.values())
|
|
727
|
-
if (!tabMetadata.disabled)
|
|
728
|
-
return tabMetadata.value;
|
|
729
|
-
}, [tabMap]), shouldNotifyInitialValueChangeRef = React11.useRef(!hasExplicitDefaultValueProp), initialDefaultValueRef = React11.useRef(defaultValueProp), shouldHonorDisabledDefaultValueRef = React11.useRef(hasExplicitDefaultValueProp), didRegisterTabsRef = React11.useRef(!1);
|
|
730
|
-
useIsoLayoutEffect(() => {
|
|
731
|
-
if (isControlled)
|
|
732
|
-
return;
|
|
733
|
-
function commitAutomaticValueChange(fallbackValue, fallbackReason) {
|
|
734
|
-
setValue(() => fallbackValue), setActivationDirectionState({
|
|
735
|
-
previousValue: fallbackValue,
|
|
736
|
-
tabActivationDirection: "none"
|
|
737
|
-
}), notifyAutomaticValueChange(fallbackValue, fallbackReason), shouldNotifyInitialValueChangeRef.current = !1;
|
|
738
|
-
}
|
|
739
|
-
if (tabMap.size === 0) {
|
|
740
|
-
didRegisterTabsRef.current && value !== null && !lastKnownTabElementRef.current?.isConnected && commitAutomaticValueChange(null, reason_parts_exports.missing);
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
didRegisterTabsRef.current = !0, lastKnownTabElementRef.current = tabMap.keys().next().value;
|
|
744
|
-
let selectionIsDisabled = selectedTabMetadata?.disabled, selectionIsMissing = selectedTabMetadata == null && value !== null;
|
|
745
|
-
if (!selectionIsDisabled && value === initialDefaultValueRef.current && (shouldHonorDisabledDefaultValueRef.current = !1), shouldHonorDisabledDefaultValueRef.current && selectionIsDisabled && value === initialDefaultValueRef.current)
|
|
746
|
-
return;
|
|
747
|
-
let shouldNotifyInitialValueChange = shouldNotifyInitialValueChangeRef.current;
|
|
748
|
-
if (selectionIsDisabled || selectionIsMissing) {
|
|
749
|
-
let fallbackValue = firstEnabledTabValue ?? null;
|
|
750
|
-
if (value === fallbackValue) {
|
|
751
|
-
shouldNotifyInitialValueChangeRef.current = !1;
|
|
752
|
-
return;
|
|
753
|
-
}
|
|
754
|
-
let fallbackReason = reason_parts_exports.missing;
|
|
755
|
-
shouldNotifyInitialValueChange ? fallbackReason = reason_parts_exports.initial : selectionIsDisabled && (fallbackReason = reason_parts_exports.disabled), commitAutomaticValueChange(fallbackValue, fallbackReason);
|
|
756
|
-
return;
|
|
757
|
-
}
|
|
758
|
-
shouldNotifyInitialValueChange && selectedTabMetadata != null && (notifyAutomaticValueChange(value, reason_parts_exports.initial), shouldNotifyInitialValueChangeRef.current = !1);
|
|
759
|
-
}, [firstEnabledTabValue, isControlled, notifyAutomaticValueChange, selectedTabMetadata, setValue, tabMap, value]);
|
|
760
|
-
let element = useRenderElement("div", componentProps, {
|
|
761
|
-
state: {
|
|
762
|
-
orientation,
|
|
763
|
-
tabActivationDirection
|
|
764
|
-
},
|
|
765
|
-
ref: forwardedRef,
|
|
766
|
-
props: elementProps,
|
|
767
|
-
stateAttributesMapping: tabsStateAttributesMapping
|
|
768
|
-
});
|
|
769
|
-
return _jsx2(TabsRootContext.Provider, {
|
|
770
|
-
value: tabsContextValue,
|
|
771
|
-
children: _jsx2(CompositeList, {
|
|
772
|
-
elementsRef: tabPanelRefs,
|
|
773
|
-
children: element
|
|
774
|
-
})
|
|
775
|
-
});
|
|
776
|
-
});
|
|
777
|
-
process.env.NODE_ENV !== "production" && (TabsRoot.displayName = "TabsRoot");
|
|
778
|
-
function findTabElement(tabMap, value) {
|
|
779
|
-
for (let [tabElement, tabMetadata] of tabMap.entries())
|
|
780
|
-
if (value === tabMetadata.value)
|
|
781
|
-
return tabElement;
|
|
782
|
-
return null;
|
|
783
|
-
}
|
|
784
|
-
function computeActivationDirection(oldValue, newValue, orientation, tabMap) {
|
|
785
|
-
if (oldValue == null || newValue == null)
|
|
786
|
-
return "none";
|
|
787
|
-
let [positionProp, backward, forward] = orientation === "horizontal" ? ["left", "left", "right"] : ["top", "up", "down"], oldTab = findTabElement(tabMap, oldValue), newTab = findTabElement(tabMap, newValue);
|
|
788
|
-
if (oldTab == null || newTab == null)
|
|
789
|
-
return oldTab !== newTab && (typeof oldValue == "number" || typeof oldValue == "string") && typeof oldValue == typeof newValue ? newValue > oldValue ? forward : backward : "none";
|
|
790
|
-
let oldPosition = oldTab.getBoundingClientRect()[positionProp], newPosition = newTab.getBoundingClientRect()[positionProp];
|
|
791
|
-
return newPosition < oldPosition ? backward : newPosition > oldPosition ? forward : "none";
|
|
389
|
+
// ../../node_modules/@base-ui/react/internals/useBaseUiId.mjs
|
|
390
|
+
function useBaseUiId(idOverride) {
|
|
391
|
+
return useId(idOverride, "base-ui");
|
|
792
392
|
}
|
|
793
393
|
|
|
794
|
-
// ../../node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
|
|
795
|
-
import * as React20 from "react";
|
|
796
|
-
|
|
797
394
|
// ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
798
395
|
function hasWindow() {
|
|
799
396
|
return typeof window < "u";
|
|
@@ -909,61 +506,350 @@ function getFrameElement(win) {
|
|
|
909
506
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
910
507
|
}
|
|
911
508
|
|
|
912
|
-
// ../../node_modules/@base-ui/utils/
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
509
|
+
// ../../node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
|
|
510
|
+
var CommonPopupDataAttributes_exports = {};
|
|
511
|
+
__export(CommonPopupDataAttributes_exports, {
|
|
512
|
+
align: () => align,
|
|
513
|
+
anchorHidden: () => anchorHidden,
|
|
514
|
+
closed: () => closed,
|
|
515
|
+
endingStyle: () => endingStyle2,
|
|
516
|
+
open: () => open,
|
|
517
|
+
side: () => side,
|
|
518
|
+
startingStyle: () => startingStyle2
|
|
519
|
+
});
|
|
916
520
|
|
|
917
|
-
// ../../node_modules/@base-ui/
|
|
918
|
-
|
|
521
|
+
// ../../node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
|
|
522
|
+
var TransitionStatusDataAttributes_exports = {};
|
|
523
|
+
__export(TransitionStatusDataAttributes_exports, {
|
|
524
|
+
endingStyle: () => endingStyle,
|
|
525
|
+
startingStyle: () => startingStyle
|
|
526
|
+
});
|
|
527
|
+
var startingStyle = "data-starting-style", endingStyle = "data-ending-style";
|
|
919
528
|
|
|
920
|
-
// ../../node_modules/@base-ui/utils/
|
|
921
|
-
|
|
922
|
-
function useForcedRerendering() {
|
|
923
|
-
let [, setState] = React12.useState({});
|
|
924
|
-
return React12.useCallback(() => {
|
|
925
|
-
setState({});
|
|
926
|
-
}, []);
|
|
927
|
-
}
|
|
529
|
+
// ../../node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
|
|
530
|
+
var open = "data-open", closed = "data-closed", startingStyle2 = startingStyle, endingStyle2 = endingStyle, anchorHidden = "data-anchor-hidden", side = "data-side", align = "data-align";
|
|
928
531
|
|
|
929
|
-
// ../../node_modules/@base-ui/utils/
|
|
930
|
-
var
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
532
|
+
// ../../node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
|
|
533
|
+
var CommonTriggerDataAttributes_exports = {};
|
|
534
|
+
__export(CommonTriggerDataAttributes_exports, {
|
|
535
|
+
popupOpen: () => popupOpen,
|
|
536
|
+
pressed: () => pressed
|
|
537
|
+
});
|
|
538
|
+
var popupOpen = "data-popup-open", pressed = "data-pressed";
|
|
539
|
+
|
|
540
|
+
// ../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
|
|
541
|
+
var STARTING_HOOK = {
|
|
542
|
+
[startingStyle]: ""
|
|
543
|
+
}, ENDING_HOOK = {
|
|
544
|
+
[endingStyle]: ""
|
|
545
|
+
}, transitionStatusMapping = {
|
|
546
|
+
transitionStatus(value) {
|
|
547
|
+
return value === "starting" ? STARTING_HOOK : value === "ending" ? ENDING_HOOK : null;
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
// ../../node_modules/@base-ui/react/utils/popupStateMapping.mjs
|
|
552
|
+
var TRIGGER_HOOK = {
|
|
553
|
+
[popupOpen]: ""
|
|
554
|
+
}, PRESSABLE_TRIGGER_HOOK = {
|
|
555
|
+
[popupOpen]: "",
|
|
556
|
+
[pressed]: ""
|
|
557
|
+
}, POPUP_OPEN_HOOK = {
|
|
558
|
+
[open]: ""
|
|
559
|
+
}, POPUP_CLOSED_HOOK = {
|
|
560
|
+
[closed]: ""
|
|
561
|
+
}, ANCHOR_HIDDEN_HOOK = {
|
|
562
|
+
[anchorHidden]: ""
|
|
563
|
+
}, triggerOpenStateMapping = {
|
|
564
|
+
open(value) {
|
|
565
|
+
return value ? TRIGGER_HOOK : null;
|
|
566
|
+
}
|
|
567
|
+
}, pressableTriggerOpenStateMapping = {
|
|
568
|
+
open(value) {
|
|
569
|
+
return value ? PRESSABLE_TRIGGER_HOOK : null;
|
|
570
|
+
}
|
|
571
|
+
}, popupStateMapping = {
|
|
572
|
+
open(value) {
|
|
573
|
+
return value ? POPUP_OPEN_HOOK : POPUP_CLOSED_HOOK;
|
|
574
|
+
},
|
|
575
|
+
anchorHidden(value) {
|
|
576
|
+
return value ? ANCHOR_HIDDEN_HOOK : null;
|
|
577
|
+
}
|
|
578
|
+
}, popupTransitionStateMapping = {
|
|
579
|
+
...popupStateMapping,
|
|
580
|
+
...transitionStatusMapping
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
// ../../node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
|
|
584
|
+
var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen, triggerDisabled = "data-trigger-disabled";
|
|
585
|
+
|
|
586
|
+
// ../../node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
|
|
587
|
+
function createChangeEventDetails(reason, event, trigger, customProperties) {
|
|
588
|
+
let canceled = !1, allowPropagation = !1, custom = customProperties ?? EMPTY_OBJECT;
|
|
589
|
+
return {
|
|
590
|
+
reason,
|
|
591
|
+
event: event ?? new Event("base-ui"),
|
|
592
|
+
cancel() {
|
|
593
|
+
canceled = !0;
|
|
594
|
+
},
|
|
595
|
+
allowPropagation() {
|
|
596
|
+
allowPropagation = !0;
|
|
597
|
+
},
|
|
598
|
+
get isCanceled() {
|
|
599
|
+
return canceled;
|
|
600
|
+
},
|
|
601
|
+
get isPropagationAllowed() {
|
|
602
|
+
return allowPropagation;
|
|
603
|
+
},
|
|
604
|
+
trigger,
|
|
605
|
+
...custom
|
|
606
|
+
};
|
|
936
607
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
608
|
+
|
|
609
|
+
// ../../node_modules/@base-ui/react/internals/reason-parts.mjs
|
|
610
|
+
var reason_parts_exports = {};
|
|
611
|
+
__export(reason_parts_exports, {
|
|
612
|
+
cancelOpen: () => cancelOpen,
|
|
613
|
+
chipRemovePress: () => chipRemovePress,
|
|
614
|
+
clearPress: () => clearPress,
|
|
615
|
+
closePress: () => closePress,
|
|
616
|
+
closeWatcher: () => closeWatcher,
|
|
617
|
+
decrementPress: () => decrementPress,
|
|
618
|
+
disabled: () => disabled,
|
|
619
|
+
drag: () => drag,
|
|
620
|
+
escapeKey: () => escapeKey,
|
|
621
|
+
focusOut: () => focusOut,
|
|
622
|
+
imperativeAction: () => imperativeAction,
|
|
623
|
+
incrementPress: () => incrementPress,
|
|
624
|
+
initial: () => initial,
|
|
625
|
+
inputBlur: () => inputBlur,
|
|
626
|
+
inputChange: () => inputChange,
|
|
627
|
+
inputClear: () => inputClear,
|
|
628
|
+
inputPaste: () => inputPaste,
|
|
629
|
+
inputPress: () => inputPress,
|
|
630
|
+
itemPress: () => itemPress,
|
|
631
|
+
keyboard: () => keyboard,
|
|
632
|
+
linkPress: () => linkPress,
|
|
633
|
+
listNavigation: () => listNavigation,
|
|
634
|
+
missing: () => missing,
|
|
635
|
+
none: () => none,
|
|
636
|
+
outsidePress: () => outsidePress,
|
|
637
|
+
pointer: () => pointer,
|
|
638
|
+
popupClose: () => popupClose,
|
|
639
|
+
scrub: () => scrub,
|
|
640
|
+
siblingOpen: () => siblingOpen,
|
|
641
|
+
swipe: () => swipe,
|
|
642
|
+
trackPress: () => trackPress,
|
|
643
|
+
triggerFocus: () => triggerFocus,
|
|
644
|
+
triggerHover: () => triggerHover,
|
|
645
|
+
triggerPress: () => triggerPress,
|
|
646
|
+
wheel: () => wheel,
|
|
647
|
+
windowResize: () => windowResize
|
|
648
|
+
});
|
|
649
|
+
var none = "none", triggerPress = "trigger-press", triggerHover = "trigger-hover", triggerFocus = "trigger-focus", outsidePress = "outside-press", itemPress = "item-press", closePress = "close-press", linkPress = "link-press", clearPress = "clear-press", chipRemovePress = "chip-remove-press", trackPress = "track-press", incrementPress = "increment-press", decrementPress = "decrement-press", inputChange = "input-change", inputClear = "input-clear", inputBlur = "input-blur", inputPaste = "input-paste", inputPress = "input-press", focusOut = "focus-out", escapeKey = "escape-key", closeWatcher = "close-watcher", listNavigation = "list-navigation", keyboard = "keyboard", pointer = "pointer", drag = "drag", wheel = "wheel", scrub = "scrub", popupClose = "popup-close", cancelOpen = "cancel-open", siblingOpen = "sibling-open", disabled = "disabled", missing = "missing", initial = "initial", imperativeAction = "imperative-action", swipe = "swipe", windowResize = "window-resize";
|
|
650
|
+
|
|
651
|
+
// ../../node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
|
|
652
|
+
import * as React9 from "react";
|
|
653
|
+
|
|
654
|
+
// ../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
655
|
+
import * as ReactDOM from "react-dom";
|
|
656
|
+
|
|
657
|
+
// ../../node_modules/@base-ui/utils/useOnMount.mjs
|
|
658
|
+
import * as React8 from "react";
|
|
659
|
+
function useOnMount(fn) {
|
|
660
|
+
React8.useEffect(fn, EMPTY_ARRAY);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// ../../node_modules/@base-ui/utils/useAnimationFrame.mjs
|
|
664
|
+
var EMPTY = null, LAST_RAF = globalThis.requestAnimationFrame, Scheduler = class {
|
|
665
|
+
/* This implementation uses an array as a backing data-structure for frame callbacks.
|
|
666
|
+
* It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
|
|
667
|
+
* never calls the native `cancelAnimationFrame` if there are no frames left. This can
|
|
668
|
+
* be much more efficient if there is a call pattern that alterns as
|
|
669
|
+
* "request-cancel-request-cancel-…".
|
|
670
|
+
* But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
|
|
671
|
+
* frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
|
|
672
|
+
callbacks = [];
|
|
673
|
+
callbacksCount = 0;
|
|
674
|
+
nextId = 1;
|
|
675
|
+
startId = 1;
|
|
676
|
+
isScheduled = !1;
|
|
677
|
+
tick = (timestamp) => {
|
|
678
|
+
this.isScheduled = !1;
|
|
679
|
+
let currentCallbacks = this.callbacks, currentCallbacksCount = this.callbacksCount;
|
|
680
|
+
if (this.callbacks = [], this.callbacksCount = 0, this.startId = this.nextId, currentCallbacksCount > 0)
|
|
681
|
+
for (let i = 0; i < currentCallbacks.length; i += 1)
|
|
682
|
+
currentCallbacks[i]?.(timestamp);
|
|
683
|
+
};
|
|
684
|
+
request(fn) {
|
|
685
|
+
let id = this.nextId;
|
|
686
|
+
this.nextId += 1, this.callbacks.push(fn), this.callbacksCount += 1;
|
|
687
|
+
let didRAFChange = process.env.NODE_ENV !== "production" && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, !0);
|
|
688
|
+
return (!this.isScheduled || didRAFChange) && (requestAnimationFrame(this.tick), this.isScheduled = !0), id;
|
|
942
689
|
}
|
|
943
|
-
|
|
690
|
+
cancel(id) {
|
|
691
|
+
let index = id - this.startId;
|
|
692
|
+
index < 0 || index >= this.callbacks.length || this.callbacks[index] !== null && (this.callbacks[index] = null, this.callbacksCount -= 1);
|
|
693
|
+
}
|
|
694
|
+
}, scheduler = new Scheduler();
|
|
695
|
+
var AnimationFrame = class _AnimationFrame {
|
|
696
|
+
static create() {
|
|
697
|
+
return new _AnimationFrame();
|
|
698
|
+
}
|
|
699
|
+
static request(fn) {
|
|
700
|
+
return scheduler.request(fn);
|
|
701
|
+
}
|
|
702
|
+
static cancel(id) {
|
|
703
|
+
return scheduler.cancel(id);
|
|
704
|
+
}
|
|
705
|
+
currentId = EMPTY;
|
|
706
|
+
/**
|
|
707
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
708
|
+
*/
|
|
709
|
+
request(fn) {
|
|
710
|
+
this.cancel(), this.currentId = scheduler.request(() => {
|
|
711
|
+
this.currentId = EMPTY, fn();
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
cancel = () => {
|
|
715
|
+
this.currentId !== EMPTY && (scheduler.cancel(this.currentId), this.currentId = EMPTY);
|
|
716
|
+
};
|
|
717
|
+
disposeEffect = () => this.cancel;
|
|
718
|
+
};
|
|
719
|
+
function useAnimationFrame() {
|
|
720
|
+
let timeout = useRefWithInit(AnimationFrame.create).current;
|
|
721
|
+
return useOnMount(timeout.disposeEffect), timeout;
|
|
944
722
|
}
|
|
945
723
|
|
|
946
|
-
// ../../node_modules/@base-ui/react/
|
|
947
|
-
function
|
|
948
|
-
return
|
|
724
|
+
// ../../node_modules/@base-ui/react/utils/resolveRef.mjs
|
|
725
|
+
function resolveRef(maybeRef) {
|
|
726
|
+
return maybeRef == null ? maybeRef : "current" in maybeRef ? maybeRef.current : maybeRef;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// ../../node_modules/@base-ui/react/utils/getFiniteAnimations.mjs
|
|
730
|
+
function getFiniteAnimations(element, options) {
|
|
731
|
+
return element.getAnimations(options).filter((animation) => {
|
|
732
|
+
let timing = animation.effect?.getTiming();
|
|
733
|
+
return timing?.duration !== 1 / 0 && timing?.iterations !== 1 / 0;
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// ../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
738
|
+
var pendingCallbacks = null;
|
|
739
|
+
function flushBeforePaint(fn) {
|
|
740
|
+
if (!pendingCallbacks) {
|
|
741
|
+
let callbacks = [];
|
|
742
|
+
pendingCallbacks = callbacks, queueMicrotask(() => {
|
|
743
|
+
pendingCallbacks = null, ReactDOM.flushSync(() => {
|
|
744
|
+
for (let callback of callbacks)
|
|
745
|
+
callback();
|
|
746
|
+
});
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
pendingCallbacks.push(fn);
|
|
750
|
+
}
|
|
751
|
+
function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = !1, batch = !1) {
|
|
752
|
+
let frame = useAnimationFrame();
|
|
753
|
+
return useStableCallback((fnToExecute, signal = null) => {
|
|
754
|
+
frame.cancel();
|
|
755
|
+
let element = resolveRef(elementOrRef);
|
|
756
|
+
if (element == null)
|
|
757
|
+
return;
|
|
758
|
+
let resolvedElement = element, done = () => {
|
|
759
|
+
if (!batch) {
|
|
760
|
+
ReactDOM.flushSync(fnToExecute);
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
flushBeforePaint(() => {
|
|
764
|
+
signal?.aborted || fnToExecute();
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
if (typeof resolvedElement.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
768
|
+
fnToExecute();
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
function exec() {
|
|
772
|
+
Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => {
|
|
773
|
+
signal?.aborted || done();
|
|
774
|
+
}, () => {
|
|
775
|
+
if (signal?.aborted)
|
|
776
|
+
return;
|
|
777
|
+
if (getFiniteAnimations(resolvedElement).some((animation) => animation.pending || animation.playState !== "finished")) {
|
|
778
|
+
exec();
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
done();
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
if (waitForStartingStyleRemoved) {
|
|
785
|
+
let startingStyleAttribute = startingStyle;
|
|
786
|
+
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
787
|
+
frame.request(exec);
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
let attributeObserver = new MutationObserver(() => {
|
|
791
|
+
resolvedElement.hasAttribute(startingStyleAttribute) || (attributeObserver.disconnect(), exec());
|
|
792
|
+
});
|
|
793
|
+
attributeObserver.observe(resolvedElement, {
|
|
794
|
+
attributes: !0,
|
|
795
|
+
attributeFilter: [startingStyleAttribute]
|
|
796
|
+
}), signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
|
|
797
|
+
once: !0
|
|
798
|
+
});
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
frame.request(exec);
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// ../../node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
|
|
806
|
+
function useOpenChangeComplete(parameters) {
|
|
807
|
+
let {
|
|
808
|
+
enabled = !0,
|
|
809
|
+
open: open2,
|
|
810
|
+
ref,
|
|
811
|
+
batch = !1,
|
|
812
|
+
onComplete: onCompleteParam
|
|
813
|
+
} = parameters, onComplete = useStableCallback(onCompleteParam), runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
|
|
814
|
+
React9.useEffect(() => {
|
|
815
|
+
if (!enabled)
|
|
816
|
+
return;
|
|
817
|
+
let abortController = new AbortController();
|
|
818
|
+
return runOnceAnimationsFinish(onComplete, abortController.signal), () => {
|
|
819
|
+
abortController.abort();
|
|
820
|
+
};
|
|
821
|
+
}, [enabled, open2, onComplete, runOnceAnimationsFinish]);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
// ../../node_modules/@base-ui/utils/inertValue.mjs
|
|
825
|
+
function inertValue(value) {
|
|
826
|
+
return isReactVersionAtLeast(19) ? value : value ? "true" : void 0;
|
|
949
827
|
}
|
|
950
828
|
|
|
951
829
|
// ../../node_modules/@base-ui/react/internals/use-button/useButton.mjs
|
|
952
|
-
import * as
|
|
830
|
+
import * as React13 from "react";
|
|
831
|
+
|
|
832
|
+
// ../../node_modules/@base-ui/utils/error.mjs
|
|
833
|
+
var error = createLogOnce("error", "Base UI");
|
|
834
|
+
|
|
835
|
+
// ../../node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
|
|
836
|
+
import * as React10 from "react";
|
|
837
|
+
var noop = () => {
|
|
838
|
+
}, useIsoLayoutEffect = typeof document < "u" ? React10.useLayoutEffect : noop;
|
|
953
839
|
|
|
954
840
|
// ../../node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
|
|
955
|
-
import * as
|
|
956
|
-
var CompositeRootContext =
|
|
841
|
+
import * as React11 from "react";
|
|
842
|
+
var CompositeRootContext = React11.createContext(void 0);
|
|
957
843
|
process.env.NODE_ENV !== "production" && (CompositeRootContext.displayName = "CompositeRootContext");
|
|
958
844
|
function useCompositeRootContext(optional = !1) {
|
|
959
|
-
let context =
|
|
845
|
+
let context = React11.useContext(CompositeRootContext);
|
|
960
846
|
if (context === void 0 && !optional)
|
|
961
847
|
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
|
|
962
848
|
return context;
|
|
963
849
|
}
|
|
964
850
|
|
|
965
851
|
// ../../node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
|
|
966
|
-
import * as
|
|
852
|
+
import * as React12 from "react";
|
|
967
853
|
function useFocusableWhenDisabled(parameters) {
|
|
968
854
|
let {
|
|
969
855
|
focusableWhenDisabled,
|
|
@@ -973,7 +859,7 @@ function useFocusableWhenDisabled(parameters) {
|
|
|
973
859
|
isNativeButton
|
|
974
860
|
} = parameters, isFocusableComposite = composite && focusableWhenDisabled !== !1, isNonFocusableComposite = composite && focusableWhenDisabled === !1;
|
|
975
861
|
return {
|
|
976
|
-
props:
|
|
862
|
+
props: React12.useMemo(() => {
|
|
977
863
|
let additionalProps = {
|
|
978
864
|
// allow Tabbing away from focusableWhenDisabled elements
|
|
979
865
|
onKeyDown(event) {
|
|
@@ -985,6 +871,11 @@ function useFocusableWhenDisabled(parameters) {
|
|
|
985
871
|
};
|
|
986
872
|
}
|
|
987
873
|
|
|
874
|
+
// ../../node_modules/@base-ui/utils/owner.mjs
|
|
875
|
+
function ownerDocument(node) {
|
|
876
|
+
return node?.ownerDocument || document;
|
|
877
|
+
}
|
|
878
|
+
|
|
988
879
|
// ../../node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
|
|
989
880
|
function dispatchClickWithModifiers(target, sourceEvent, {
|
|
990
881
|
detail = 0,
|
|
@@ -1011,7 +902,7 @@ function useButton(parameters = {}) {
|
|
|
1011
902
|
tabIndex = 0,
|
|
1012
903
|
native: isNativeButton = !0,
|
|
1013
904
|
composite: compositeProp
|
|
1014
|
-
} = parameters, elementRef =
|
|
905
|
+
} = parameters, elementRef = React13.useRef(null), compositeRootContext = useCompositeRootContext(!0), isCompositeItem = compositeProp ?? compositeRootContext !== void 0, {
|
|
1015
906
|
props: focusableWhenDisabledProps
|
|
1016
907
|
} = useFocusableWhenDisabled({
|
|
1017
908
|
focusableWhenDisabled,
|
|
@@ -1020,7 +911,7 @@ function useButton(parameters = {}) {
|
|
|
1020
911
|
tabIndex,
|
|
1021
912
|
isNativeButton
|
|
1022
913
|
});
|
|
1023
|
-
process.env.NODE_ENV !== "production" &&
|
|
914
|
+
process.env.NODE_ENV !== "production" && React13.useEffect(() => {
|
|
1024
915
|
if (!elementRef.current)
|
|
1025
916
|
return;
|
|
1026
917
|
let isButtonTag = isButtonElement(elementRef.current);
|
|
@@ -1034,12 +925,12 @@ function useButton(parameters = {}) {
|
|
|
1034
925
|
error(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${ownerStackMessage}`);
|
|
1035
926
|
}
|
|
1036
927
|
}, [isNativeButton]);
|
|
1037
|
-
let updateDisabled =
|
|
928
|
+
let updateDisabled = React13.useCallback(() => {
|
|
1038
929
|
let element = elementRef.current;
|
|
1039
930
|
isButtonElement(element) && isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled && (element.disabled = !1);
|
|
1040
931
|
}, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
|
|
1041
932
|
useIsoLayoutEffect(updateDisabled, [updateDisabled]);
|
|
1042
|
-
let getButtonProps =
|
|
933
|
+
let getButtonProps = React13.useCallback((externalProps = {}) => {
|
|
1043
934
|
let {
|
|
1044
935
|
onClick: externalOnClick,
|
|
1045
936
|
onMouseDown: externalOnMouseDown,
|
|
@@ -1111,93 +1002,6 @@ function isValidLinkElement(elem) {
|
|
|
1111
1002
|
return isHTMLElement(elem) && elem.tagName === "A" && !!elem.href;
|
|
1112
1003
|
}
|
|
1113
1004
|
|
|
1114
|
-
// ../../node_modules/@base-ui/react/internals/composite/constants.mjs
|
|
1115
|
-
var ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
|
|
1116
|
-
|
|
1117
|
-
// ../../node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
|
|
1118
|
-
import * as React18 from "react";
|
|
1119
|
-
|
|
1120
|
-
// ../../node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
|
|
1121
|
-
import * as React17 from "react";
|
|
1122
|
-
function useCompositeListItem(params = {}) {
|
|
1123
|
-
let {
|
|
1124
|
-
guess,
|
|
1125
|
-
label,
|
|
1126
|
-
metadata,
|
|
1127
|
-
textRef,
|
|
1128
|
-
index: externalIndex
|
|
1129
|
-
} = params, {
|
|
1130
|
-
register,
|
|
1131
|
-
unregister,
|
|
1132
|
-
subscribeMapChange,
|
|
1133
|
-
nextIndexRef
|
|
1134
|
-
} = useCompositeListContext(), indexRef = React17.useRef(-1), [internalIndex, setInternalIndex] = React17.useState(externalIndex == null && guess ? () => {
|
|
1135
|
-
if (indexRef.current === -1) {
|
|
1136
|
-
let newIndex = nextIndexRef.current;
|
|
1137
|
-
nextIndexRef.current += 1, indexRef.current = newIndex;
|
|
1138
|
-
}
|
|
1139
|
-
return indexRef.current;
|
|
1140
|
-
} : -1), index2 = externalIndex ?? internalIndex, componentRef = React17.useRef(null), ref = React17.useCallback((node) => {
|
|
1141
|
-
let previousNode = componentRef.current;
|
|
1142
|
-
previousNode && unregister(previousNode), componentRef.current = node, node && register(node, {
|
|
1143
|
-
metadata: metadata ?? null,
|
|
1144
|
-
index: externalIndex ?? null,
|
|
1145
|
-
label,
|
|
1146
|
-
textRef
|
|
1147
|
-
});
|
|
1148
|
-
}, [externalIndex, register, unregister, metadata, label, textRef]);
|
|
1149
|
-
return useIsoLayoutEffect(() => {
|
|
1150
|
-
if (externalIndex == null)
|
|
1151
|
-
return subscribeMapChange((map) => {
|
|
1152
|
-
let i = componentRef.current ? map.get(componentRef.current)?.index : null;
|
|
1153
|
-
i != null && setInternalIndex(i);
|
|
1154
|
-
});
|
|
1155
|
-
}, [externalIndex, subscribeMapChange]), {
|
|
1156
|
-
ref,
|
|
1157
|
-
index: index2
|
|
1158
|
-
};
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// ../../node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
|
|
1162
|
-
function useCompositeItem(params = {}) {
|
|
1163
|
-
let {
|
|
1164
|
-
highlightItemOnHover,
|
|
1165
|
-
highlightedIndex,
|
|
1166
|
-
onHighlightedIndexChange
|
|
1167
|
-
} = useCompositeRootContext(), {
|
|
1168
|
-
ref,
|
|
1169
|
-
index: index2
|
|
1170
|
-
} = useCompositeListItem(params), isHighlighted = highlightedIndex === index2, itemRef = React18.useRef(null), mergedRef = useMergedRefs(ref, itemRef);
|
|
1171
|
-
return {
|
|
1172
|
-
compositeProps: {
|
|
1173
|
-
tabIndex: isHighlighted ? 0 : -1,
|
|
1174
|
-
onFocus() {
|
|
1175
|
-
onHighlightedIndexChange(index2);
|
|
1176
|
-
},
|
|
1177
|
-
onMouseMove() {
|
|
1178
|
-
let item = itemRef.current;
|
|
1179
|
-
if (!highlightItemOnHover || !item)
|
|
1180
|
-
return;
|
|
1181
|
-
let disabled2 = item.hasAttribute("disabled") || item.ariaDisabled === "true";
|
|
1182
|
-
!isHighlighted && !disabled2 && item.focus();
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
|
-
compositeRef: mergedRef,
|
|
1186
|
-
index: index2
|
|
1187
|
-
};
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
// ../../node_modules/@base-ui/react/tabs/list/TabsListContext.mjs
|
|
1191
|
-
import * as React19 from "react";
|
|
1192
|
-
var TabsListContext = React19.createContext(void 0);
|
|
1193
|
-
process.env.NODE_ENV !== "production" && (TabsListContext.displayName = "TabsListContext");
|
|
1194
|
-
function useTabsListContext() {
|
|
1195
|
-
let context = React19.useContext(TabsListContext);
|
|
1196
|
-
if (context === void 0)
|
|
1197
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>." : formatErrorMessage_default(65));
|
|
1198
|
-
return context;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
1005
|
// ../../node_modules/@base-ui/utils/platform/parts.mjs
|
|
1202
1006
|
var parts_exports = {};
|
|
1203
1007
|
__export(parts_exports, {
|
|
@@ -1279,125 +1083,50 @@ var jsdom = /jsdom|happydom/.test(lowerUserAgent);
|
|
|
1279
1083
|
|
|
1280
1084
|
// ../../node_modules/@base-ui/utils/platform/media-query.mjs
|
|
1281
1085
|
var media_query_exports = {};
|
|
1282
|
-
__export(media_query_exports, {
|
|
1283
|
-
iOS: () => iOS
|
|
1284
|
-
});
|
|
1285
|
-
var iOS = "@supports (-webkit-touch-callout: none)";
|
|
1286
|
-
|
|
1287
|
-
// ../../node_modules/@base-ui/utils/shadowDom.mjs
|
|
1288
|
-
function activeElement(doc) {
|
|
1289
|
-
let element = doc.activeElement;
|
|
1290
|
-
for (; element?.shadowRoot?.activeElement != null; )
|
|
1291
|
-
element = element.shadowRoot.activeElement;
|
|
1292
|
-
return element;
|
|
1293
|
-
}
|
|
1294
|
-
function contains(parent, child) {
|
|
1295
|
-
if (!parent || !child)
|
|
1296
|
-
return !1;
|
|
1297
|
-
let rootNode = child.getRootNode?.();
|
|
1298
|
-
if (parent.contains(child))
|
|
1299
|
-
return !0;
|
|
1300
|
-
if (rootNode && isShadowRoot(rootNode)) {
|
|
1301
|
-
let next = child;
|
|
1302
|
-
for (; next; ) {
|
|
1303
|
-
if (parent === next)
|
|
1304
|
-
return !0;
|
|
1305
|
-
next = next.parentNode || next.host;
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
return !1;
|
|
1309
|
-
}
|
|
1310
|
-
function closest(node, selector) {
|
|
1311
|
-
let current = node;
|
|
1312
|
-
for (; current; ) {
|
|
1313
|
-
if (isElement(current) && current.matches(selector))
|
|
1314
|
-
return current;
|
|
1315
|
-
current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null);
|
|
1316
|
-
}
|
|
1317
|
-
return null;
|
|
1318
|
-
}
|
|
1319
|
-
function getTarget(event) {
|
|
1320
|
-
return "composedPath" in event ? event.composedPath()[0] ?? event.target : event.target;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
// ../../node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
|
|
1324
|
-
var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
|
|
1325
|
-
var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
1326
|
-
|
|
1327
|
-
// ../../node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
|
|
1328
|
-
var TransitionStatusDataAttributes_exports = {};
|
|
1329
|
-
__export(TransitionStatusDataAttributes_exports, {
|
|
1330
|
-
endingStyle: () => endingStyle,
|
|
1331
|
-
startingStyle: () => startingStyle
|
|
1332
|
-
});
|
|
1333
|
-
var startingStyle = "data-starting-style", endingStyle = "data-ending-style";
|
|
1334
|
-
|
|
1335
|
-
// ../../node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
|
|
1336
|
-
var STARTING_HOOK = {
|
|
1337
|
-
[startingStyle]: ""
|
|
1338
|
-
}, ENDING_HOOK = {
|
|
1339
|
-
[endingStyle]: ""
|
|
1340
|
-
}, transitionStatusMapping = {
|
|
1341
|
-
transitionStatus(value) {
|
|
1342
|
-
return value === "starting" ? STARTING_HOOK : value === "ending" ? ENDING_HOOK : null;
|
|
1343
|
-
}
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
|
-
// ../../node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
|
|
1347
|
-
var CommonPopupDataAttributes_exports = {};
|
|
1348
|
-
__export(CommonPopupDataAttributes_exports, {
|
|
1349
|
-
align: () => align,
|
|
1350
|
-
anchorHidden: () => anchorHidden,
|
|
1351
|
-
closed: () => closed,
|
|
1352
|
-
endingStyle: () => endingStyle2,
|
|
1353
|
-
open: () => open,
|
|
1354
|
-
side: () => side,
|
|
1355
|
-
startingStyle: () => startingStyle2
|
|
1356
|
-
});
|
|
1357
|
-
var open = "data-open", closed = "data-closed", startingStyle2 = startingStyle, endingStyle2 = endingStyle, anchorHidden = "data-anchor-hidden", side = "data-side", align = "data-align";
|
|
1358
|
-
|
|
1359
|
-
// ../../node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
|
|
1360
|
-
var CommonTriggerDataAttributes_exports = {};
|
|
1361
|
-
__export(CommonTriggerDataAttributes_exports, {
|
|
1362
|
-
popupOpen: () => popupOpen,
|
|
1363
|
-
pressed: () => pressed
|
|
1086
|
+
__export(media_query_exports, {
|
|
1087
|
+
iOS: () => iOS
|
|
1364
1088
|
});
|
|
1365
|
-
var
|
|
1089
|
+
var iOS = "@supports (-webkit-touch-callout: none)";
|
|
1366
1090
|
|
|
1367
|
-
// ../../node_modules/@base-ui/
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1091
|
+
// ../../node_modules/@base-ui/utils/shadowDom.mjs
|
|
1092
|
+
function activeElement(doc) {
|
|
1093
|
+
let element = doc.activeElement;
|
|
1094
|
+
for (; element?.shadowRoot?.activeElement != null; )
|
|
1095
|
+
element = element.shadowRoot.activeElement;
|
|
1096
|
+
return element;
|
|
1097
|
+
}
|
|
1098
|
+
function contains(parent, child) {
|
|
1099
|
+
if (!parent || !child)
|
|
1100
|
+
return !1;
|
|
1101
|
+
let rootNode = child.getRootNode?.();
|
|
1102
|
+
if (parent.contains(child))
|
|
1103
|
+
return !0;
|
|
1104
|
+
if (rootNode && isShadowRoot(rootNode)) {
|
|
1105
|
+
let next = child;
|
|
1106
|
+
for (; next; ) {
|
|
1107
|
+
if (parent === next)
|
|
1108
|
+
return !0;
|
|
1109
|
+
next = next.parentNode || next.host;
|
|
1110
|
+
}
|
|
1386
1111
|
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1112
|
+
return !1;
|
|
1113
|
+
}
|
|
1114
|
+
function closest(node, selector) {
|
|
1115
|
+
let current = node;
|
|
1116
|
+
for (; current; ) {
|
|
1117
|
+
if (isElement(current) && current.matches(selector))
|
|
1118
|
+
return current;
|
|
1119
|
+
current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null);
|
|
1393
1120
|
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1121
|
+
return null;
|
|
1122
|
+
}
|
|
1123
|
+
function getTarget(event) {
|
|
1124
|
+
return "composedPath" in event ? event.composedPath()[0] ?? event.target : event.target;
|
|
1125
|
+
}
|
|
1398
1126
|
|
|
1399
|
-
// ../../node_modules/@base-ui/react/
|
|
1400
|
-
var
|
|
1127
|
+
// ../../node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
|
|
1128
|
+
var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
|
|
1129
|
+
var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
1401
1130
|
|
|
1402
1131
|
// ../../node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
|
|
1403
1132
|
function isTargetInsideEnabledTrigger(target, triggerElements) {
|
|
@@ -1588,8 +1317,8 @@ function rectToClientRect(rect) {
|
|
|
1588
1317
|
}
|
|
1589
1318
|
|
|
1590
1319
|
// ../../node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
|
|
1591
|
-
function isIndexOutOfListBounds(list,
|
|
1592
|
-
return
|
|
1320
|
+
function isIndexOutOfListBounds(list, index) {
|
|
1321
|
+
return index < 0 || index >= list.length;
|
|
1593
1322
|
}
|
|
1594
1323
|
function getMinListIndex(listRef, disabledIndices) {
|
|
1595
1324
|
return findNonDisabledListIndex(listRef.current, {
|
|
@@ -1609,16 +1338,16 @@ function findNonDisabledListIndex(list, {
|
|
|
1609
1338
|
disabledIndices,
|
|
1610
1339
|
amount = 1
|
|
1611
1340
|
} = {}) {
|
|
1612
|
-
let
|
|
1341
|
+
let index = startingIndex;
|
|
1613
1342
|
do
|
|
1614
|
-
|
|
1615
|
-
while (
|
|
1616
|
-
return
|
|
1343
|
+
index += decrement ? -amount : amount;
|
|
1344
|
+
while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));
|
|
1345
|
+
return index;
|
|
1617
1346
|
}
|
|
1618
|
-
function isListIndexDisabled(list,
|
|
1619
|
-
if (typeof disabledIndices == "function" ? disabledIndices(
|
|
1347
|
+
function isListIndexDisabled(list, index, disabledIndices) {
|
|
1348
|
+
if (typeof disabledIndices == "function" ? disabledIndices(index) : disabledIndices?.includes(index) ?? !1)
|
|
1620
1349
|
return !0;
|
|
1621
|
-
let element = list[
|
|
1350
|
+
let element = list[index];
|
|
1622
1351
|
return element ? !isElementVisible(element) || element.matches(":disabled") ? !0 : !disabledIndices && (element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") : !1;
|
|
1623
1352
|
}
|
|
1624
1353
|
function isHiddenByStyles(styles) {
|
|
@@ -1726,662 +1455,50 @@ function tabbable(container) {
|
|
|
1726
1455
|
let candidates = focusable(container);
|
|
1727
1456
|
return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
|
|
1728
1457
|
}
|
|
1729
|
-
function getTabbableIn(container, dir) {
|
|
1730
|
-
let list = tabbable(container), len = list.length;
|
|
1731
|
-
if (len === 0)
|
|
1732
|
-
return;
|
|
1733
|
-
let active = activeElement(ownerDocument(container)),
|
|
1734
|
-
return list[nextIndex];
|
|
1735
|
-
}
|
|
1736
|
-
function getNextTabbable(referenceElement) {
|
|
1737
|
-
return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
|
|
1738
|
-
}
|
|
1739
|
-
function getPreviousTabbable(referenceElement) {
|
|
1740
|
-
return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
|
|
1741
|
-
}
|
|
1742
|
-
function getTabbableNearElement(referenceElement, direction, exclude) {
|
|
1743
|
-
if (!referenceElement)
|
|
1744
|
-
return null;
|
|
1745
|
-
let list = [];
|
|
1746
|
-
appendCandidates(ownerDocument(referenceElement).body, list);
|
|
1747
|
-
let index2 = list.indexOf(referenceElement);
|
|
1748
|
-
if (index2 === -1)
|
|
1749
|
-
return null;
|
|
1750
|
-
let candidates = list.filter(isFocusableElement);
|
|
1751
|
-
for (let offset = 1; offset < list.length; offset += 1) {
|
|
1752
|
-
let element = list[(index2 + direction * offset + list.length) % list.length];
|
|
1753
|
-
if (!contains(exclude, element) && isTabbable(element) && isTabbableRadio(element, candidates))
|
|
1754
|
-
return element;
|
|
1755
|
-
}
|
|
1756
|
-
return list[index2];
|
|
1757
|
-
}
|
|
1758
|
-
function isOutsideEvent(event, container) {
|
|
1759
|
-
let containerElement = container || event.currentTarget, relatedTarget = event.relatedTarget;
|
|
1760
|
-
return !relatedTarget || !contains(containerElement, relatedTarget);
|
|
1761
|
-
}
|
|
1762
|
-
function disableFocusInside(container) {
|
|
1763
|
-
tabbable(container).forEach((element) => {
|
|
1764
|
-
element.dataset.tabindex = element.getAttribute("tabindex") || "", element.setAttribute("tabindex", "-1");
|
|
1765
|
-
});
|
|
1766
|
-
}
|
|
1767
|
-
function enableFocusInside(container) {
|
|
1768
|
-
let elements = [];
|
|
1769
|
-
appendMatchingElements(container, "[data-tabindex]", elements), elements.forEach((element) => {
|
|
1770
|
-
let tabindex = element.dataset.tabindex;
|
|
1771
|
-
delete element.dataset.tabindex, tabindex ? element.setAttribute("tabindex", tabindex) : element.removeAttribute("tabindex");
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
// ../../node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
|
|
1776
|
-
var TabsTab = React20.forwardRef(function(componentProps, forwardedRef) {
|
|
1777
|
-
let {
|
|
1778
|
-
className,
|
|
1779
|
-
disabled: disabled2 = !1,
|
|
1780
|
-
render,
|
|
1781
|
-
value,
|
|
1782
|
-
id: idProp,
|
|
1783
|
-
nativeButton = !0,
|
|
1784
|
-
style,
|
|
1785
|
-
...elementProps
|
|
1786
|
-
} = componentProps, {
|
|
1787
|
-
value: activeTabValue,
|
|
1788
|
-
getTabPanelIdByValue,
|
|
1789
|
-
onValueChange,
|
|
1790
|
-
orientation,
|
|
1791
|
-
tabActivationDirection
|
|
1792
|
-
} = useTabsRootContext(), {
|
|
1793
|
-
activateOnFocus,
|
|
1794
|
-
registerTabResizeObserverElement,
|
|
1795
|
-
tabsListElement
|
|
1796
|
-
} = useTabsListContext(), {
|
|
1797
|
-
highlightedIndex,
|
|
1798
|
-
onHighlightedIndexChange
|
|
1799
|
-
} = useCompositeRootContext(), id = useBaseUiId(idProp), tabMetadata = React20.useMemo(() => ({
|
|
1800
|
-
disabled: disabled2,
|
|
1801
|
-
id,
|
|
1802
|
-
value
|
|
1803
|
-
}), [disabled2, id, value]), {
|
|
1804
|
-
compositeProps,
|
|
1805
|
-
compositeRef,
|
|
1806
|
-
index: index2
|
|
1807
|
-
// hook is used instead of the CompositeItem component
|
|
1808
|
-
// because the index is needed for Tab internals
|
|
1809
|
-
} = useCompositeItem({
|
|
1810
|
-
metadata: tabMetadata
|
|
1811
|
-
}), active = value === activeTabValue, isNavigatingRef = React20.useRef(!1), unobserveTabElementRef = React20.useRef(null), observeTabElement = useStableCallback((element2) => {
|
|
1812
|
-
unobserveTabElementRef.current?.(), unobserveTabElementRef.current = element2 ? registerTabResizeObserverElement(element2) : null;
|
|
1813
|
-
});
|
|
1814
|
-
useIsoLayoutEffect(() => {
|
|
1815
|
-
if (isNavigatingRef.current) {
|
|
1816
|
-
isNavigatingRef.current = !1;
|
|
1817
|
-
return;
|
|
1818
|
-
}
|
|
1819
|
-
if (!(active && index2 > -1 && highlightedIndex !== index2))
|
|
1820
|
-
return;
|
|
1821
|
-
let listElement = tabsListElement;
|
|
1822
|
-
if (listElement != null) {
|
|
1823
|
-
let activeEl = activeElement(ownerDocument(listElement));
|
|
1824
|
-
if (activeEl && contains(listElement, activeEl))
|
|
1825
|
-
return;
|
|
1826
|
-
}
|
|
1827
|
-
disabled2 || onHighlightedIndexChange(index2);
|
|
1828
|
-
}, [active, index2, highlightedIndex, onHighlightedIndexChange, disabled2, tabsListElement]);
|
|
1829
|
-
let {
|
|
1830
|
-
getButtonProps,
|
|
1831
|
-
buttonRef
|
|
1832
|
-
} = useButton({
|
|
1833
|
-
disabled: disabled2,
|
|
1834
|
-
native: nativeButton,
|
|
1835
|
-
focusableWhenDisabled: !0
|
|
1836
|
-
}), tabPanelId = getTabPanelIdByValue(value), isPressingRef = React20.useRef(!1), isMainButtonRef = React20.useRef(!1);
|
|
1837
|
-
function activate(event) {
|
|
1838
|
-
onValueChange(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
|
|
1839
|
-
activationDirection: "none"
|
|
1840
|
-
}));
|
|
1841
|
-
}
|
|
1842
|
-
function onClick(event) {
|
|
1843
|
-
active || disabled2 || activate(event);
|
|
1844
|
-
}
|
|
1845
|
-
function onFocus(event) {
|
|
1846
|
-
active || disabled2 || activateOnFocus && (!isPressingRef.current || // keyboard or touch focus
|
|
1847
|
-
isMainButtonRef.current) && activate(event);
|
|
1848
|
-
}
|
|
1849
|
-
function onPointerDown(event) {
|
|
1850
|
-
if (active || disabled2)
|
|
1851
|
-
return;
|
|
1852
|
-
isPressingRef.current = !0, isMainButtonRef.current = event.button === 0;
|
|
1853
|
-
let doc = ownerDocument(event.currentTarget);
|
|
1854
|
-
function handlePointerEnd() {
|
|
1855
|
-
isPressingRef.current = !1, isMainButtonRef.current = !1, doc.removeEventListener("pointerup", handlePointerEnd), doc.removeEventListener("pointercancel", handlePointerEnd);
|
|
1856
|
-
}
|
|
1857
|
-
doc.addEventListener("pointerup", handlePointerEnd), doc.addEventListener("pointercancel", handlePointerEnd);
|
|
1858
|
-
}
|
|
1859
|
-
return useRenderElement("button", componentProps, {
|
|
1860
|
-
state: {
|
|
1861
|
-
disabled: disabled2,
|
|
1862
|
-
active,
|
|
1863
|
-
orientation,
|
|
1864
|
-
tabActivationDirection
|
|
1865
|
-
},
|
|
1866
|
-
ref: [forwardedRef, buttonRef, compositeRef, observeTabElement],
|
|
1867
|
-
props: [compositeProps, {
|
|
1868
|
-
role: "tab",
|
|
1869
|
-
"aria-controls": tabPanelId,
|
|
1870
|
-
"aria-selected": active,
|
|
1871
|
-
id,
|
|
1872
|
-
onClick,
|
|
1873
|
-
onFocus,
|
|
1874
|
-
onPointerDown,
|
|
1875
|
-
[ACTIVE_COMPOSITE_ITEM]: active ? "" : void 0,
|
|
1876
|
-
onKeyDownCapture() {
|
|
1877
|
-
isNavigatingRef.current = !0;
|
|
1878
|
-
}
|
|
1879
|
-
}, elementProps, getButtonProps],
|
|
1880
|
-
stateAttributesMapping: tabsStateAttributesMapping
|
|
1881
|
-
});
|
|
1882
|
-
});
|
|
1883
|
-
process.env.NODE_ENV !== "production" && (TabsTab.displayName = "TabsTab");
|
|
1884
|
-
|
|
1885
|
-
// ../../node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
|
|
1886
|
-
import * as React24 from "react";
|
|
1887
|
-
|
|
1888
|
-
// ../../node_modules/@base-ui/react/internals/PrehydrationScript.mjs
|
|
1889
|
-
import "react";
|
|
1890
|
-
|
|
1891
|
-
// ../../node_modules/@base-ui/utils/hydration.mjs
|
|
1892
|
-
import * as React21 from "react";
|
|
1893
|
-
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
|
1894
|
-
var emptySubscribe = () => () => {
|
|
1895
|
-
}, getTrue = () => !0, getFalse = () => !1;
|
|
1896
|
-
function useIsHydratedModern() {
|
|
1897
|
-
return useSyncExternalStore(emptySubscribe, getTrue, getFalse);
|
|
1898
|
-
}
|
|
1899
|
-
function useIsHydratedLegacy() {
|
|
1900
|
-
let [hydrated, setHydrated] = React21.useState(!1);
|
|
1901
|
-
return React21.useEffect(() => {
|
|
1902
|
-
setHydrated(!0);
|
|
1903
|
-
}, []), hydrated;
|
|
1904
|
-
}
|
|
1905
|
-
var useIsHydrated = isReactVersionAtLeast(18) ? useIsHydratedModern : useIsHydratedLegacy;
|
|
1906
|
-
function useIsHydrating() {
|
|
1907
|
-
return !useIsHydrated();
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
// ../../node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
|
|
1911
|
-
import * as React22 from "react";
|
|
1912
|
-
var CSPContext = React22.createContext(void 0);
|
|
1913
|
-
process.env.NODE_ENV !== "production" && (CSPContext.displayName = "CSPContext");
|
|
1914
|
-
var DEFAULT_CSP_CONTEXT_VALUE = {
|
|
1915
|
-
disableStyleElements: !1
|
|
1916
|
-
};
|
|
1917
|
-
function useCSPContext() {
|
|
1918
|
-
return React22.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
// ../../node_modules/@base-ui/react/internals/PrehydrationScript.mjs
|
|
1922
|
-
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
1923
|
-
function PrehydrationScript(props) {
|
|
1924
|
-
let {
|
|
1925
|
-
script: script2
|
|
1926
|
-
} = props, {
|
|
1927
|
-
nonce
|
|
1928
|
-
} = useCSPContext();
|
|
1929
|
-
return useIsHydrating() ? _jsx3("script", {
|
|
1930
|
-
nonce,
|
|
1931
|
-
dangerouslySetInnerHTML: {
|
|
1932
|
-
__html: script2
|
|
1933
|
-
},
|
|
1934
|
-
suppressHydrationWarning: !0
|
|
1935
|
-
}) : null;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
// ../../node_modules/@base-ui/react/utils/getCssDimensions.mjs
|
|
1939
|
-
function getCssDimensions(element) {
|
|
1940
|
-
let css = getComputedStyle2(element), width = parseFloat(css.width) || 0, height = parseFloat(css.height) || 0, hasOffset = isHTMLElement(element), offsetWidth = hasOffset ? element.offsetWidth : width, offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1941
|
-
return (round(width) !== offsetWidth || round(height) !== offsetHeight) && (width = offsetWidth, height = offsetHeight), {
|
|
1942
|
-
width,
|
|
1943
|
-
height
|
|
1944
|
-
};
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
// ../../node_modules/@base-ui/react/utils/getElementTransform.mjs
|
|
1948
|
-
function getElementTransform(element, computedStyle) {
|
|
1949
|
-
let transform = (computedStyle ?? getWindow(element).getComputedStyle(element)).transform, translateX = 0, translateY = 0, scale = 1;
|
|
1950
|
-
if (transform && transform !== "none") {
|
|
1951
|
-
let matrix = transform.match(/matrix(?:3d)?\(([^)]+)\)/);
|
|
1952
|
-
if (matrix) {
|
|
1953
|
-
let values = matrix[1].split(", ").map(parseFloat);
|
|
1954
|
-
values.length === 6 ? (translateX = values[4], translateY = values[5], scale = Math.sqrt(values[0] * values[0] + values[1] * values[1])) : values.length === 16 && (translateX = values[12], translateY = values[13], scale = values[0]);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
return {
|
|
1958
|
-
x: translateX,
|
|
1959
|
-
y: translateY,
|
|
1960
|
-
scale
|
|
1961
|
-
};
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
// ../../node_modules/@base-ui/react/tabs/indicator/TabsIndicatorCssVars.mjs
|
|
1965
|
-
var activeTabLeft = "--active-tab-left", activeTabRight = "--active-tab-right", activeTabTop = "--active-tab-top", activeTabBottom = "--active-tab-bottom", activeTabWidth = "--active-tab-width", activeTabHeight = "--active-tab-height";
|
|
1966
|
-
|
|
1967
|
-
// ../../node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
|
|
1968
|
-
import { jsx as _jsx4, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1969
|
-
var _PrehydrationScript, stateAttributesMapping = {
|
|
1970
|
-
...tabsStateAttributesMapping,
|
|
1971
|
-
activeTabPosition: () => null,
|
|
1972
|
-
activeTabSize: () => null
|
|
1973
|
-
}, MAX_LAYOUT_ROUNDING_ERROR = 2, TabsIndicator = React24.forwardRef(function(componentProps, forwardedRef) {
|
|
1974
|
-
let {
|
|
1975
|
-
className,
|
|
1976
|
-
render,
|
|
1977
|
-
renderBeforeHydration = !1,
|
|
1978
|
-
style: styleProp,
|
|
1979
|
-
...elementProps
|
|
1980
|
-
} = componentProps, {
|
|
1981
|
-
getTabElementBySelectedValue,
|
|
1982
|
-
orientation,
|
|
1983
|
-
tabActivationDirection,
|
|
1984
|
-
value
|
|
1985
|
-
} = useTabsRootContext(), {
|
|
1986
|
-
tabsListElement,
|
|
1987
|
-
registerIndicatorUpdateListener
|
|
1988
|
-
} = useTabsListContext(), rerender = useForcedRerendering();
|
|
1989
|
-
React24.useEffect(() => registerIndicatorUpdateListener(rerender), [registerIndicatorUpdateListener, rerender]);
|
|
1990
|
-
let left = 0, right = 0, top = 0, bottom = 0, width = 0, height = 0, isTabSelected = !1;
|
|
1991
|
-
if (value != null && tabsListElement != null) {
|
|
1992
|
-
let activeTab = getTabElementBySelectedValue(value);
|
|
1993
|
-
if (activeTab != null) {
|
|
1994
|
-
isTabSelected = !0;
|
|
1995
|
-
let {
|
|
1996
|
-
width: computedWidth,
|
|
1997
|
-
height: computedHeight
|
|
1998
|
-
} = getCssDimensions(activeTab), {
|
|
1999
|
-
width: tabListWidth,
|
|
2000
|
-
height: tabListHeight
|
|
2001
|
-
} = getCssDimensions(tabsListElement), tabRect = activeTab.getBoundingClientRect(), tabsListRect = tabsListElement.getBoundingClientRect(), scaleX = tabListWidth > 0 ? tabsListRect.width / tabListWidth : 1, scaleY = tabListHeight > 0 ? tabsListRect.height / tabListHeight : 1, layoutOffset = getLayoutOffset(activeTab, tabsListElement);
|
|
2002
|
-
left = layoutOffset.left, top = layoutOffset.top;
|
|
2003
|
-
let rectLeft = (tabRect.left - tabsListRect.left) / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft, rectTop = (tabRect.top - tabsListRect.top) / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop, tabTranslation = getActiveTabTranslation(activeTab);
|
|
2004
|
-
Math.abs(rectLeft - tabTranslation.x - left) <= MAX_LAYOUT_ROUNDING_ERROR && Math.abs(rectTop - tabTranslation.y - top) <= MAX_LAYOUT_ROUNDING_ERROR && (left = rectLeft, top = rectTop), width = computedWidth, height = computedHeight, right = tabsListElement.scrollWidth - left - width, bottom = tabsListElement.scrollHeight - top - height;
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
let activeTabPosition = isTabSelected ? {
|
|
2008
|
-
left,
|
|
2009
|
-
right,
|
|
2010
|
-
top,
|
|
2011
|
-
bottom
|
|
2012
|
-
} : null, activeTabSize = isTabSelected ? {
|
|
2013
|
-
width,
|
|
2014
|
-
height
|
|
2015
|
-
} : null, style = isTabSelected ? {
|
|
2016
|
-
[activeTabLeft]: `${left}px`,
|
|
2017
|
-
[activeTabRight]: `${right}px`,
|
|
2018
|
-
[activeTabTop]: `${top}px`,
|
|
2019
|
-
[activeTabBottom]: `${bottom}px`,
|
|
2020
|
-
[activeTabWidth]: `${width}px`,
|
|
2021
|
-
[activeTabHeight]: `${height}px`
|
|
2022
|
-
} : void 0, displayIndicator = isTabSelected && width > 0 && height > 0, element = useRenderElement("span", componentProps, {
|
|
2023
|
-
state: {
|
|
2024
|
-
orientation,
|
|
2025
|
-
activeTabPosition,
|
|
2026
|
-
activeTabSize,
|
|
2027
|
-
tabActivationDirection
|
|
2028
|
-
},
|
|
2029
|
-
ref: forwardedRef,
|
|
2030
|
-
props: [{
|
|
2031
|
-
role: "presentation",
|
|
2032
|
-
style,
|
|
2033
|
-
hidden: !displayIndicator
|
|
2034
|
-
// do not display the indicator before the layout is settled
|
|
2035
|
-
}, elementProps, {
|
|
2036
|
-
suppressHydrationWarning: !0
|
|
2037
|
-
}],
|
|
2038
|
-
stateAttributesMapping
|
|
2039
|
-
});
|
|
2040
|
-
return value == null ? null : _jsxs(React24.Fragment, {
|
|
2041
|
-
children: [element, renderBeforeHydration && (_PrehydrationScript || (_PrehydrationScript = _jsx4(PrehydrationScript, {
|
|
2042
|
-
script: ""
|
|
2043
|
-
})))]
|
|
2044
|
-
});
|
|
2045
|
-
});
|
|
2046
|
-
process.env.NODE_ENV !== "production" && (TabsIndicator.displayName = "TabsIndicator");
|
|
2047
|
-
function getLayoutOffset(element, ancestor) {
|
|
2048
|
-
let elementOffset = getCumulativeOffset(element), ancestorOffset = getCumulativeOffset(ancestor), left = elementOffset.left - ancestorOffset.left - ancestor.clientLeft, top = elementOffset.top - ancestorOffset.top - ancestor.clientTop, node = getParentNode(element);
|
|
2049
|
-
for (; isHTMLElement(node) && node !== ancestor && !isLastTraversableNode(node); )
|
|
2050
|
-
left -= node.scrollLeft, top -= node.scrollTop, node = getParentNode(node);
|
|
2051
|
-
return {
|
|
2052
|
-
left,
|
|
2053
|
-
top
|
|
2054
|
-
};
|
|
2055
|
-
}
|
|
2056
|
-
function getCumulativeOffset(element) {
|
|
2057
|
-
let left = 0, top = 0, currentElement = element;
|
|
2058
|
-
for (; currentElement != null; ) {
|
|
2059
|
-
left += currentElement.offsetLeft, top += currentElement.offsetTop;
|
|
2060
|
-
let offsetParent = currentElement.offsetParent;
|
|
2061
|
-
offsetParent != null && (left += offsetParent.clientLeft, top += offsetParent.clientTop), currentElement = offsetParent;
|
|
2062
|
-
}
|
|
2063
|
-
return {
|
|
2064
|
-
left,
|
|
2065
|
-
top
|
|
2066
|
-
};
|
|
2067
|
-
}
|
|
2068
|
-
function getActiveTabTranslation(element) {
|
|
2069
|
-
let computedStyle = getWindow(element).getComputedStyle(element), {
|
|
2070
|
-
x,
|
|
2071
|
-
y
|
|
2072
|
-
} = getElementTransform(element, computedStyle), translateX = x, translateY = y, {
|
|
2073
|
-
translate
|
|
2074
|
-
} = computedStyle;
|
|
2075
|
-
if (translate && translate !== "none") {
|
|
2076
|
-
let parts = translate.split(" ");
|
|
2077
|
-
translateX += resolveTranslateLength(parts[0], element.offsetWidth), translateY += resolveTranslateLength(parts[1], element.offsetHeight);
|
|
2078
|
-
}
|
|
2079
|
-
return {
|
|
2080
|
-
x: translateX,
|
|
2081
|
-
y: translateY
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
function resolveTranslateLength(value, referenceSize) {
|
|
2085
|
-
if (!value)
|
|
2086
|
-
return 0;
|
|
2087
|
-
let numeric = parseFloat(value);
|
|
2088
|
-
return Number.isFinite(numeric) ? value.endsWith("%") ? numeric / 100 * referenceSize : numeric : 0;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
// ../../node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
|
|
2092
|
-
import * as React28 from "react";
|
|
2093
|
-
|
|
2094
|
-
// ../../node_modules/@base-ui/utils/inertValue.mjs
|
|
2095
|
-
function inertValue(value) {
|
|
2096
|
-
return isReactVersionAtLeast(19) ? value : value ? "true" : void 0;
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
// ../../node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
|
|
2100
|
-
import * as React26 from "react";
|
|
2101
|
-
|
|
2102
|
-
// ../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
2103
|
-
import * as ReactDOM from "react-dom";
|
|
2104
|
-
|
|
2105
|
-
// ../../node_modules/@base-ui/utils/useOnMount.mjs
|
|
2106
|
-
import * as React25 from "react";
|
|
2107
|
-
function useOnMount(fn) {
|
|
2108
|
-
React25.useEffect(fn, EMPTY_ARRAY);
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
// ../../node_modules/@base-ui/utils/useAnimationFrame.mjs
|
|
2112
|
-
var EMPTY = null, LAST_RAF = globalThis.requestAnimationFrame, Scheduler = class {
|
|
2113
|
-
/* This implementation uses an array as a backing data-structure for frame callbacks.
|
|
2114
|
-
* It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
|
|
2115
|
-
* never calls the native `cancelAnimationFrame` if there are no frames left. This can
|
|
2116
|
-
* be much more efficient if there is a call pattern that alterns as
|
|
2117
|
-
* "request-cancel-request-cancel-…".
|
|
2118
|
-
* But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
|
|
2119
|
-
* frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
|
|
2120
|
-
callbacks = [];
|
|
2121
|
-
callbacksCount = 0;
|
|
2122
|
-
nextId = 1;
|
|
2123
|
-
startId = 1;
|
|
2124
|
-
isScheduled = !1;
|
|
2125
|
-
tick = (timestamp) => {
|
|
2126
|
-
this.isScheduled = !1;
|
|
2127
|
-
let currentCallbacks = this.callbacks, currentCallbacksCount = this.callbacksCount;
|
|
2128
|
-
if (this.callbacks = [], this.callbacksCount = 0, this.startId = this.nextId, currentCallbacksCount > 0)
|
|
2129
|
-
for (let i = 0; i < currentCallbacks.length; i += 1)
|
|
2130
|
-
currentCallbacks[i]?.(timestamp);
|
|
2131
|
-
};
|
|
2132
|
-
request(fn) {
|
|
2133
|
-
let id = this.nextId;
|
|
2134
|
-
this.nextId += 1, this.callbacks.push(fn), this.callbacksCount += 1;
|
|
2135
|
-
let didRAFChange = process.env.NODE_ENV !== "production" && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, !0);
|
|
2136
|
-
return (!this.isScheduled || didRAFChange) && (requestAnimationFrame(this.tick), this.isScheduled = !0), id;
|
|
2137
|
-
}
|
|
2138
|
-
cancel(id) {
|
|
2139
|
-
let index2 = id - this.startId;
|
|
2140
|
-
index2 < 0 || index2 >= this.callbacks.length || this.callbacks[index2] !== null && (this.callbacks[index2] = null, this.callbacksCount -= 1);
|
|
2141
|
-
}
|
|
2142
|
-
}, scheduler = new Scheduler();
|
|
2143
|
-
var AnimationFrame = class _AnimationFrame {
|
|
2144
|
-
static create() {
|
|
2145
|
-
return new _AnimationFrame();
|
|
2146
|
-
}
|
|
2147
|
-
static request(fn) {
|
|
2148
|
-
return scheduler.request(fn);
|
|
2149
|
-
}
|
|
2150
|
-
static cancel(id) {
|
|
2151
|
-
return scheduler.cancel(id);
|
|
2152
|
-
}
|
|
2153
|
-
currentId = EMPTY;
|
|
2154
|
-
/**
|
|
2155
|
-
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
2156
|
-
*/
|
|
2157
|
-
request(fn) {
|
|
2158
|
-
this.cancel(), this.currentId = scheduler.request(() => {
|
|
2159
|
-
this.currentId = EMPTY, fn();
|
|
2160
|
-
});
|
|
2161
|
-
}
|
|
2162
|
-
cancel = () => {
|
|
2163
|
-
this.currentId !== EMPTY && (scheduler.cancel(this.currentId), this.currentId = EMPTY);
|
|
2164
|
-
};
|
|
2165
|
-
disposeEffect = () => this.cancel;
|
|
2166
|
-
};
|
|
2167
|
-
function useAnimationFrame() {
|
|
2168
|
-
let timeout = useRefWithInit(AnimationFrame.create).current;
|
|
2169
|
-
return useOnMount(timeout.disposeEffect), timeout;
|
|
1458
|
+
function getTabbableIn(container, dir) {
|
|
1459
|
+
let list = tabbable(container), len = list.length;
|
|
1460
|
+
if (len === 0)
|
|
1461
|
+
return;
|
|
1462
|
+
let active = activeElement(ownerDocument(container)), index = list.indexOf(active), nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;
|
|
1463
|
+
return list[nextIndex];
|
|
2170
1464
|
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
function resolveRef(maybeRef) {
|
|
2174
|
-
return maybeRef == null ? maybeRef : "current" in maybeRef ? maybeRef.current : maybeRef;
|
|
1465
|
+
function getNextTabbable(referenceElement) {
|
|
1466
|
+
return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
|
|
2175
1467
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
function getFiniteAnimations(element, options) {
|
|
2179
|
-
return element.getAnimations(options).filter((animation) => {
|
|
2180
|
-
let timing = animation.effect?.getTiming();
|
|
2181
|
-
return timing?.duration !== 1 / 0 && timing?.iterations !== 1 / 0;
|
|
2182
|
-
});
|
|
1468
|
+
function getPreviousTabbable(referenceElement) {
|
|
1469
|
+
return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
|
|
2183
1470
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
1471
|
+
function getTabbableNearElement(referenceElement, direction, exclude) {
|
|
1472
|
+
if (!referenceElement)
|
|
1473
|
+
return null;
|
|
1474
|
+
let list = [];
|
|
1475
|
+
appendCandidates(ownerDocument(referenceElement).body, list);
|
|
1476
|
+
let index = list.indexOf(referenceElement);
|
|
1477
|
+
if (index === -1)
|
|
1478
|
+
return null;
|
|
1479
|
+
let candidates = list.filter(isFocusableElement);
|
|
1480
|
+
for (let offset = 1; offset < list.length; offset += 1) {
|
|
1481
|
+
let element = list[(index + direction * offset + list.length) % list.length];
|
|
1482
|
+
if (!contains(exclude, element) && isTabbable(element) && isTabbableRadio(element, candidates))
|
|
1483
|
+
return element;
|
|
2196
1484
|
}
|
|
2197
|
-
|
|
2198
|
-
}
|
|
2199
|
-
function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = !1, batch = !1) {
|
|
2200
|
-
let frame = useAnimationFrame();
|
|
2201
|
-
return useStableCallback((fnToExecute, signal = null) => {
|
|
2202
|
-
frame.cancel();
|
|
2203
|
-
let element = resolveRef(elementOrRef);
|
|
2204
|
-
if (element == null)
|
|
2205
|
-
return;
|
|
2206
|
-
let resolvedElement = element, done = () => {
|
|
2207
|
-
if (!batch) {
|
|
2208
|
-
ReactDOM.flushSync(fnToExecute);
|
|
2209
|
-
return;
|
|
2210
|
-
}
|
|
2211
|
-
flushBeforePaint(() => {
|
|
2212
|
-
signal?.aborted || fnToExecute();
|
|
2213
|
-
});
|
|
2214
|
-
};
|
|
2215
|
-
if (typeof resolvedElement.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
2216
|
-
fnToExecute();
|
|
2217
|
-
return;
|
|
2218
|
-
}
|
|
2219
|
-
function exec() {
|
|
2220
|
-
Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => {
|
|
2221
|
-
signal?.aborted || done();
|
|
2222
|
-
}, () => {
|
|
2223
|
-
if (signal?.aborted)
|
|
2224
|
-
return;
|
|
2225
|
-
if (getFiniteAnimations(resolvedElement).some((animation) => animation.pending || animation.playState !== "finished")) {
|
|
2226
|
-
exec();
|
|
2227
|
-
return;
|
|
2228
|
-
}
|
|
2229
|
-
done();
|
|
2230
|
-
});
|
|
2231
|
-
}
|
|
2232
|
-
if (waitForStartingStyleRemoved) {
|
|
2233
|
-
let startingStyleAttribute = startingStyle;
|
|
2234
|
-
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
2235
|
-
frame.request(exec);
|
|
2236
|
-
return;
|
|
2237
|
-
}
|
|
2238
|
-
let attributeObserver = new MutationObserver(() => {
|
|
2239
|
-
resolvedElement.hasAttribute(startingStyleAttribute) || (attributeObserver.disconnect(), exec());
|
|
2240
|
-
});
|
|
2241
|
-
attributeObserver.observe(resolvedElement, {
|
|
2242
|
-
attributes: !0,
|
|
2243
|
-
attributeFilter: [startingStyleAttribute]
|
|
2244
|
-
}), signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
|
|
2245
|
-
once: !0
|
|
2246
|
-
});
|
|
2247
|
-
return;
|
|
2248
|
-
}
|
|
2249
|
-
frame.request(exec);
|
|
2250
|
-
});
|
|
1485
|
+
return list[index];
|
|
2251
1486
|
}
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
let {
|
|
2256
|
-
enabled = !0,
|
|
2257
|
-
open: open2,
|
|
2258
|
-
ref,
|
|
2259
|
-
batch = !1,
|
|
2260
|
-
onComplete: onCompleteParam
|
|
2261
|
-
} = parameters, onComplete = useStableCallback(onCompleteParam), runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
|
|
2262
|
-
React26.useEffect(() => {
|
|
2263
|
-
if (!enabled)
|
|
2264
|
-
return;
|
|
2265
|
-
let abortController = new AbortController();
|
|
2266
|
-
return runOnceAnimationsFinish(onComplete, abortController.signal), () => {
|
|
2267
|
-
abortController.abort();
|
|
2268
|
-
};
|
|
2269
|
-
}, [enabled, open2, onComplete, runOnceAnimationsFinish]);
|
|
1487
|
+
function isOutsideEvent(event, container) {
|
|
1488
|
+
let containerElement = container || event.currentTarget, relatedTarget = event.relatedTarget;
|
|
1489
|
+
return !relatedTarget || !contains(containerElement, relatedTarget);
|
|
2270
1490
|
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
let [transitionStatus, setTransitionStatus] = React27.useState(open2 && enableIdleState ? "idle" : void 0), [mounted, setMounted] = React27.useState(open2 && !animateInitialOpen);
|
|
2276
|
-
return open2 && !mounted && (setMounted(!0), setTransitionStatus("starting")), !open2 && mounted && transitionStatus !== "ending" && !deferEndingState && setTransitionStatus("ending"), !open2 && !mounted && transitionStatus === "ending" && setTransitionStatus(void 0), useIsoLayoutEffect(() => {
|
|
2277
|
-
if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
|
|
2278
|
-
let frame = AnimationFrame.request(() => {
|
|
2279
|
-
setTransitionStatus("ending");
|
|
2280
|
-
});
|
|
2281
|
-
return () => {
|
|
2282
|
-
AnimationFrame.cancel(frame);
|
|
2283
|
-
};
|
|
2284
|
-
}
|
|
2285
|
-
}, [open2, mounted, transitionStatus, deferEndingState]), useIsoLayoutEffect(() => {
|
|
2286
|
-
if (!open2 || enableIdleState || transitionStatus === void 0)
|
|
2287
|
-
return;
|
|
2288
|
-
let frame = AnimationFrame.request(() => {
|
|
2289
|
-
setTransitionStatus(void 0);
|
|
2290
|
-
});
|
|
2291
|
-
return () => {
|
|
2292
|
-
AnimationFrame.cancel(frame);
|
|
2293
|
-
};
|
|
2294
|
-
}, [enableIdleState, open2, transitionStatus]), useIsoLayoutEffect(() => {
|
|
2295
|
-
if (!open2 || !enableIdleState)
|
|
2296
|
-
return;
|
|
2297
|
-
open2 && mounted && transitionStatus !== "idle" && setTransitionStatus("starting");
|
|
2298
|
-
let frame = AnimationFrame.request(() => {
|
|
2299
|
-
setTransitionStatus("idle");
|
|
2300
|
-
});
|
|
2301
|
-
return () => {
|
|
2302
|
-
AnimationFrame.cancel(frame);
|
|
2303
|
-
};
|
|
2304
|
-
}, [enableIdleState, open2, mounted, transitionStatus]), {
|
|
2305
|
-
mounted,
|
|
2306
|
-
setMounted,
|
|
2307
|
-
transitionStatus
|
|
2308
|
-
};
|
|
1491
|
+
function disableFocusInside(container) {
|
|
1492
|
+
tabbable(container).forEach((element) => {
|
|
1493
|
+
element.dataset.tabindex = element.getAttribute("tabindex") || "", element.setAttribute("tabindex", "-1");
|
|
1494
|
+
});
|
|
2309
1495
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
// ../../node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
|
|
2316
|
-
var stateAttributesMapping2 = {
|
|
2317
|
-
...tabsStateAttributesMapping,
|
|
2318
|
-
...transitionStatusMapping
|
|
2319
|
-
}, TabsPanel = React28.forwardRef(function(componentProps, forwardedRef) {
|
|
2320
|
-
let {
|
|
2321
|
-
className,
|
|
2322
|
-
value,
|
|
2323
|
-
render,
|
|
2324
|
-
keepMounted = !1,
|
|
2325
|
-
style,
|
|
2326
|
-
...elementProps
|
|
2327
|
-
} = componentProps, {
|
|
2328
|
-
value: selectedValue,
|
|
2329
|
-
getTabIdByPanelValue,
|
|
2330
|
-
orientation,
|
|
2331
|
-
tabActivationDirection,
|
|
2332
|
-
registerMountedTabPanel
|
|
2333
|
-
} = useTabsRootContext(), id = useBaseUiId(), {
|
|
2334
|
-
ref: listItemRef,
|
|
2335
|
-
index: index2
|
|
2336
|
-
} = useCompositeListItem(), open2 = value === selectedValue, {
|
|
2337
|
-
mounted,
|
|
2338
|
-
transitionStatus,
|
|
2339
|
-
setMounted
|
|
2340
|
-
} = useTransitionStatus(open2), hidden = !mounted, correspondingTabId = getTabIdByPanelValue(value), state = {
|
|
2341
|
-
hidden,
|
|
2342
|
-
orientation,
|
|
2343
|
-
tabActivationDirection,
|
|
2344
|
-
transitionStatus
|
|
2345
|
-
}, panelRef = React28.useRef(null), element = useRenderElement("div", componentProps, {
|
|
2346
|
-
state,
|
|
2347
|
-
ref: [forwardedRef, listItemRef, panelRef],
|
|
2348
|
-
props: [{
|
|
2349
|
-
"aria-labelledby": correspondingTabId,
|
|
2350
|
-
hidden,
|
|
2351
|
-
id,
|
|
2352
|
-
role: "tabpanel",
|
|
2353
|
-
tabIndex: open2 ? 0 : -1,
|
|
2354
|
-
inert: inertValue(!open2),
|
|
2355
|
-
// Computed key: a plain literal key fails the DOM-props excess property check.
|
|
2356
|
-
[index]: index2
|
|
2357
|
-
}, elementProps],
|
|
2358
|
-
stateAttributesMapping: stateAttributesMapping2
|
|
1496
|
+
function enableFocusInside(container) {
|
|
1497
|
+
let elements = [];
|
|
1498
|
+
appendMatchingElements(container, "[data-tabindex]", elements), elements.forEach((element) => {
|
|
1499
|
+
let tabindex = element.dataset.tabindex;
|
|
1500
|
+
delete element.dataset.tabindex, tabindex ? element.setAttribute("tabindex", tabindex) : element.removeAttribute("tabindex");
|
|
2359
1501
|
});
|
|
2360
|
-
return useOpenChangeComplete({
|
|
2361
|
-
open: open2,
|
|
2362
|
-
ref: panelRef,
|
|
2363
|
-
onComplete() {
|
|
2364
|
-
open2 || setMounted(!1);
|
|
2365
|
-
}
|
|
2366
|
-
}), useIsoLayoutEffect(() => {
|
|
2367
|
-
if (!(id == null || hidden && !keepMounted))
|
|
2368
|
-
return registerMountedTabPanel(value, id);
|
|
2369
|
-
}, [hidden, keepMounted, value, id, registerMountedTabPanel]), keepMounted || mounted ? element : null;
|
|
2370
|
-
});
|
|
2371
|
-
process.env.NODE_ENV !== "production" && (TabsPanel.displayName = "TabsPanel");
|
|
2372
|
-
|
|
2373
|
-
// ../../node_modules/@base-ui/react/tabs/list/TabsList.mjs
|
|
2374
|
-
import * as React32 from "react";
|
|
2375
|
-
|
|
2376
|
-
// ../../node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
|
|
2377
|
-
import * as React31 from "react";
|
|
2378
|
-
|
|
2379
|
-
// ../../node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
|
|
2380
|
-
import * as React29 from "react";
|
|
2381
|
-
|
|
2382
|
-
// ../../node_modules/@base-ui/utils/isElementDisabled.mjs
|
|
2383
|
-
function isElementDisabled(element) {
|
|
2384
|
-
return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
|
|
2385
1502
|
}
|
|
2386
1503
|
|
|
2387
1504
|
// ../../node_modules/@base-ui/react/internals/composite/composite.mjs
|
|
@@ -2431,275 +1548,70 @@ function getStyles(element) {
|
|
|
2431
1548
|
};
|
|
2432
1549
|
}
|
|
2433
1550
|
|
|
2434
|
-
// ../../node_modules/@base-ui/react/internals/
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
if (highlightedElementRef.current = elementsRef.current[index2] ?? null, (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index2), shouldScrollIntoView) {
|
|
2451
|
-
let newActiveItem = elementsRef.current[index2];
|
|
2452
|
-
scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);
|
|
2453
|
-
}
|
|
2454
|
-
}), onMapChange = useStableCallback((map) => {
|
|
2455
|
-
if (map.size === 0)
|
|
2456
|
-
return;
|
|
2457
|
-
if (hasSetDefaultIndexRef.current) {
|
|
2458
|
-
let elements = elementsRef.current, nextIndex = elements.indexOf(highlightedElementRef.current);
|
|
2459
|
-
if (nextIndex === -1) {
|
|
2460
|
-
let replacement = elements[highlightedIndex];
|
|
2461
|
-
!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices) ? onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices)) : highlightedElementRef.current = replacement;
|
|
2462
|
-
} else nextIndex !== highlightedIndex && onHighlightedIndexChange(nextIndex);
|
|
2463
|
-
return;
|
|
2464
|
-
}
|
|
2465
|
-
hasSetDefaultIndexRef.current = !0;
|
|
2466
|
-
let sortedElements = Array.from(map.keys()), activeItem = sortedElements.find((compositeElement) => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null, activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;
|
|
2467
|
-
if (activeIndex !== -1)
|
|
2468
|
-
onHighlightedIndexChange(activeIndex);
|
|
2469
|
-
else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {
|
|
2470
|
-
let firstEnabledIndex = findNonDisabledListIndex(sortedElements, {
|
|
2471
|
-
disabledIndices
|
|
1551
|
+
// ../../node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
|
|
1552
|
+
import * as React14 from "react";
|
|
1553
|
+
var DirectionContext = React14.createContext(void 0);
|
|
1554
|
+
process.env.NODE_ENV !== "production" && (DirectionContext.displayName = "DirectionContext");
|
|
1555
|
+
function useDirection() {
|
|
1556
|
+
return React14.useContext(DirectionContext)?.direction ?? "ltr";
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
// ../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
1560
|
+
import * as React15 from "react";
|
|
1561
|
+
function useTransitionStatus(open2, enableIdleState = !1, deferEndingState = !1, animateInitialOpen = !1) {
|
|
1562
|
+
let [transitionStatus, setTransitionStatus] = React15.useState(open2 && enableIdleState ? "idle" : void 0), [mounted, setMounted] = React15.useState(open2 && !animateInitialOpen);
|
|
1563
|
+
return open2 && !mounted && (setMounted(!0), setTransitionStatus("starting")), !open2 && mounted && transitionStatus !== "ending" && !deferEndingState && setTransitionStatus("ending"), !open2 && !mounted && transitionStatus === "ending" && setTransitionStatus(void 0), useIsoLayoutEffect(() => {
|
|
1564
|
+
if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
|
|
1565
|
+
let frame = AnimationFrame.request(() => {
|
|
1566
|
+
setTransitionStatus("ending");
|
|
2472
1567
|
});
|
|
2473
|
-
|
|
1568
|
+
return () => {
|
|
1569
|
+
AnimationFrame.cancel(frame);
|
|
1570
|
+
};
|
|
2474
1571
|
}
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
useIsoLayoutEffect(() => {
|
|
2478
|
-
if (disabledIndices == null || externalHighlightedIndex != null || !hasSetDefaultIndexRef.current)
|
|
1572
|
+
}, [open2, mounted, transitionStatus, deferEndingState]), useIsoLayoutEffect(() => {
|
|
1573
|
+
if (!open2 || enableIdleState || transitionStatus === void 0)
|
|
2479
1574
|
return;
|
|
2480
|
-
let
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
let wrappedOnLoop = useStableCallback((event, prevIndex, nextIndex) => onLoop ? onLoop(event, prevIndex, nextIndex, elementsRef) : nextIndex), onKeyDown = useStableCallback((event) => {
|
|
2489
|
-
let isHomeOrEnd = event.key === HOME || event.key === END;
|
|
2490
|
-
if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd || isModifierKeySet(event, modifierKeys) || !rootRef.current)
|
|
1575
|
+
let frame = AnimationFrame.request(() => {
|
|
1576
|
+
setTransitionStatus(void 0);
|
|
1577
|
+
});
|
|
1578
|
+
return () => {
|
|
1579
|
+
AnimationFrame.cancel(frame);
|
|
1580
|
+
};
|
|
1581
|
+
}, [enableIdleState, open2, transitionStatus]), useIsoLayoutEffect(() => {
|
|
1582
|
+
if (!open2 || !enableIdleState)
|
|
2491
1583
|
return;
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
highlightedIndex,
|
|
2504
|
-
loopFocus,
|
|
2505
|
-
maxIndex,
|
|
2506
|
-
minIndex,
|
|
2507
|
-
onLoop: wrappedOnLoop,
|
|
2508
|
-
orientation,
|
|
2509
|
-
rtl: isRtl
|
|
2510
|
-
}));
|
|
2511
|
-
let isForwardKey = orientation !== "vertical" && event.key === horizontalForwardKey || orientation !== "horizontal" && event.key === ARROW_DOWN2, isBackwardKey = orientation !== "vertical" && event.key === horizontalBackwardKey || orientation !== "horizontal" && event.key === ARROW_UP2;
|
|
2512
|
-
enableHomeAndEndKeys && (event.key === HOME ? nextIndex = minIndex : event.key === END && (nextIndex = maxIndex)), nextIndex === highlightedIndex && (isForwardKey || isBackwardKey) && (loopFocus && nextIndex === maxIndex && isForwardKey ? (nextIndex = minIndex, onLoop && (nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef))) : loopFocus && nextIndex === minIndex && isBackwardKey ? (nextIndex = maxIndex, onLoop && (nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef))) : nextIndex = findNonDisabledListIndex(elementsRef.current, {
|
|
2513
|
-
startingIndex: nextIndex,
|
|
2514
|
-
decrement: isBackwardKey,
|
|
2515
|
-
disabledIndices
|
|
2516
|
-
})), nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex) && (stopEventPropagation && event.stopPropagation(), (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) && event.preventDefault(), onHighlightedIndexChange(nextIndex, !0), queueMicrotask(() => {
|
|
2517
|
-
elementsRef.current[nextIndex]?.focus();
|
|
2518
|
-
}));
|
|
2519
|
-
});
|
|
2520
|
-
return {
|
|
2521
|
-
props: {
|
|
2522
|
-
ref: mergedRef,
|
|
2523
|
-
onFocus(event) {
|
|
2524
|
-
let element = rootRef.current, target = getTarget(event.nativeEvent);
|
|
2525
|
-
!element || target == null || !isNativeInput(target) || target.setSelectionRange(0, target.value.length);
|
|
2526
|
-
},
|
|
2527
|
-
onKeyDown
|
|
2528
|
-
},
|
|
2529
|
-
highlightedIndex,
|
|
2530
|
-
onHighlightedIndexChange,
|
|
2531
|
-
elementsRef,
|
|
2532
|
-
onMapChange,
|
|
2533
|
-
relayKeyboardEvent: onKeyDown
|
|
1584
|
+
open2 && mounted && transitionStatus !== "idle" && setTransitionStatus("starting");
|
|
1585
|
+
let frame = AnimationFrame.request(() => {
|
|
1586
|
+
setTransitionStatus("idle");
|
|
1587
|
+
});
|
|
1588
|
+
return () => {
|
|
1589
|
+
AnimationFrame.cancel(frame);
|
|
1590
|
+
};
|
|
1591
|
+
}, [enableIdleState, open2, mounted, transitionStatus]), {
|
|
1592
|
+
mounted,
|
|
1593
|
+
setMounted,
|
|
1594
|
+
transitionStatus
|
|
2534
1595
|
};
|
|
2535
1596
|
}
|
|
2536
|
-
function getFallbackIndex(elements, disabledIndices) {
|
|
2537
|
-
let fallbackIndex = -1;
|
|
2538
|
-
for (let index2 = 0; index2 < elements.length; index2 += 1) {
|
|
2539
|
-
let element = elements[index2];
|
|
2540
|
-
if (!(!element || isListIndexDisabled(elements, index2, disabledIndices))) {
|
|
2541
|
-
if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM))
|
|
2542
|
-
return index2;
|
|
2543
|
-
fallbackIndex === -1 && (fallbackIndex = index2);
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
return Math.max(fallbackIndex, 0);
|
|
2547
|
-
}
|
|
2548
|
-
function isModifierKeySet(event, ignoredModifierKeys) {
|
|
2549
|
-
for (let key of MODIFIER_KEYS)
|
|
2550
|
-
if (!ignoredModifierKeys.includes(key) && event.getModifierState(key))
|
|
2551
|
-
return !0;
|
|
2552
|
-
return !1;
|
|
2553
|
-
}
|
|
2554
1597
|
|
|
2555
|
-
//
|
|
2556
|
-
import
|
|
2557
|
-
var DirectionContext = React30.createContext(void 0);
|
|
2558
|
-
process.env.NODE_ENV !== "production" && (DirectionContext.displayName = "DirectionContext");
|
|
2559
|
-
function useDirection() {
|
|
2560
|
-
return React30.useContext(DirectionContext)?.direction ?? "ltr";
|
|
2561
|
-
}
|
|
1598
|
+
// src/shared/use-sync-external-store/shim.ts
|
|
1599
|
+
import { useSyncExternalStore } from "react";
|
|
2562
1600
|
|
|
2563
|
-
// ../../node_modules/@base-ui/react/
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
refs = EMPTY_ARRAY,
|
|
2571
|
-
props = EMPTY_ARRAY,
|
|
2572
|
-
state = EMPTY_OBJECT,
|
|
2573
|
-
stateAttributesMapping: stateAttributesMapping3,
|
|
2574
|
-
highlightedIndex: highlightedIndexProp,
|
|
2575
|
-
onHighlightedIndexChange: onHighlightedIndexChangeProp,
|
|
2576
|
-
orientation,
|
|
2577
|
-
grid,
|
|
2578
|
-
loopFocus,
|
|
2579
|
-
onLoop,
|
|
2580
|
-
enableHomeAndEndKeys,
|
|
2581
|
-
onMapChange: onMapChangeProp,
|
|
2582
|
-
stopEventPropagation = !0,
|
|
2583
|
-
rootRef,
|
|
2584
|
-
disabledIndices,
|
|
2585
|
-
modifierKeys,
|
|
2586
|
-
highlightItemOnHover = !1,
|
|
2587
|
-
tag = "div",
|
|
2588
|
-
...elementProps
|
|
2589
|
-
} = componentProps, direction = useDirection(), {
|
|
2590
|
-
props: defaultProps,
|
|
2591
|
-
highlightedIndex,
|
|
2592
|
-
onHighlightedIndexChange,
|
|
2593
|
-
elementsRef,
|
|
2594
|
-
onMapChange: onMapChangeUnwrapped,
|
|
2595
|
-
relayKeyboardEvent
|
|
2596
|
-
} = useCompositeRoot({
|
|
2597
|
-
grid,
|
|
2598
|
-
loopFocus,
|
|
2599
|
-
onLoop,
|
|
2600
|
-
orientation,
|
|
2601
|
-
highlightedIndex: highlightedIndexProp,
|
|
2602
|
-
onHighlightedIndexChange: onHighlightedIndexChangeProp,
|
|
2603
|
-
rootRef,
|
|
2604
|
-
stopEventPropagation,
|
|
2605
|
-
enableHomeAndEndKeys,
|
|
2606
|
-
direction,
|
|
2607
|
-
disabledIndices,
|
|
2608
|
-
modifierKeys
|
|
2609
|
-
}), element = useRenderElement(tag, componentProps, {
|
|
2610
|
-
state,
|
|
2611
|
-
ref: refs,
|
|
2612
|
-
props: [defaultProps, ...props, elementProps],
|
|
2613
|
-
stateAttributesMapping: stateAttributesMapping3
|
|
2614
|
-
}), contextValue = React31.useMemo(() => ({
|
|
2615
|
-
highlightedIndex,
|
|
2616
|
-
onHighlightedIndexChange,
|
|
2617
|
-
highlightItemOnHover,
|
|
2618
|
-
relayKeyboardEvent
|
|
2619
|
-
}), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);
|
|
2620
|
-
return _jsx5(CompositeRootContext.Provider, {
|
|
2621
|
-
value: contextValue,
|
|
2622
|
-
children: _jsx5(CompositeList, {
|
|
2623
|
-
elementsRef,
|
|
2624
|
-
onMapChange: (newMap) => {
|
|
2625
|
-
onMapChangeProp?.(newMap), onMapChangeUnwrapped(newMap);
|
|
2626
|
-
},
|
|
2627
|
-
children: element
|
|
2628
|
-
})
|
|
2629
|
-
});
|
|
1601
|
+
// ../../node_modules/@base-ui/react/utils/getCssDimensions.mjs
|
|
1602
|
+
function getCssDimensions(element) {
|
|
1603
|
+
let css = getComputedStyle2(element), width = parseFloat(css.width) || 0, height = parseFloat(css.height) || 0, hasOffset = isHTMLElement(element), offsetWidth = hasOffset ? element.offsetWidth : width, offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1604
|
+
return (round(width) !== offsetWidth || round(height) !== offsetHeight) && (width = offsetWidth, height = offsetHeight), {
|
|
1605
|
+
width,
|
|
1606
|
+
height
|
|
1607
|
+
};
|
|
2630
1608
|
}
|
|
2631
1609
|
|
|
2632
|
-
// ../../node_modules/@base-ui/react/tabs/list/TabsList.mjs
|
|
2633
|
-
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
2634
|
-
var TabsList = React32.forwardRef(function(componentProps, forwardedRef) {
|
|
2635
|
-
let {
|
|
2636
|
-
activateOnFocus = !1,
|
|
2637
|
-
className,
|
|
2638
|
-
loopFocus = !0,
|
|
2639
|
-
render,
|
|
2640
|
-
style,
|
|
2641
|
-
...elementProps
|
|
2642
|
-
} = componentProps, {
|
|
2643
|
-
orientation,
|
|
2644
|
-
setTabMap,
|
|
2645
|
-
tabActivationDirection
|
|
2646
|
-
} = useTabsRootContext(), [highlightedTabIndex, setHighlightedTabIndex] = React32.useState(0), [tabsListElement, setTabsListElement] = React32.useState(null), indicatorUpdateListenersRef = React32.useRef(/* @__PURE__ */ new Set()), tabResizeObserverElementsRef = React32.useRef(/* @__PURE__ */ new Set()), resizeObserverRef = React32.useRef(null);
|
|
2647
|
-
useIsoLayoutEffect(() => {
|
|
2648
|
-
if (typeof ResizeObserver > "u")
|
|
2649
|
-
return;
|
|
2650
|
-
let resizeObserver = new ResizeObserver(() => {
|
|
2651
|
-
indicatorUpdateListenersRef.current.forEach((listener) => {
|
|
2652
|
-
listener();
|
|
2653
|
-
});
|
|
2654
|
-
});
|
|
2655
|
-
return resizeObserverRef.current = resizeObserver, tabsListElement && resizeObserver.observe(tabsListElement), tabResizeObserverElementsRef.current.forEach((element) => {
|
|
2656
|
-
resizeObserver.observe(element);
|
|
2657
|
-
}), () => {
|
|
2658
|
-
resizeObserver.disconnect(), resizeObserverRef.current = null;
|
|
2659
|
-
};
|
|
2660
|
-
}, [tabsListElement]);
|
|
2661
|
-
let registerIndicatorUpdateListener = useStableCallback((listener) => (indicatorUpdateListenersRef.current.add(listener), () => {
|
|
2662
|
-
indicatorUpdateListenersRef.current.delete(listener);
|
|
2663
|
-
})), registerTabResizeObserverElement = useStableCallback((element) => (tabResizeObserverElementsRef.current.add(element), resizeObserverRef.current?.observe(element), () => {
|
|
2664
|
-
tabResizeObserverElementsRef.current.delete(element), resizeObserverRef.current?.unobserve(element);
|
|
2665
|
-
})), state = {
|
|
2666
|
-
orientation,
|
|
2667
|
-
tabActivationDirection
|
|
2668
|
-
}, defaultProps = {
|
|
2669
|
-
"aria-orientation": orientation === "vertical" ? "vertical" : void 0,
|
|
2670
|
-
role: "tablist"
|
|
2671
|
-
}, tabsListContextValue = React32.useMemo(() => ({
|
|
2672
|
-
activateOnFocus,
|
|
2673
|
-
registerIndicatorUpdateListener,
|
|
2674
|
-
registerTabResizeObserverElement,
|
|
2675
|
-
tabsListElement
|
|
2676
|
-
}), [activateOnFocus, registerIndicatorUpdateListener, registerTabResizeObserverElement, tabsListElement]);
|
|
2677
|
-
return _jsx6(TabsListContext.Provider, {
|
|
2678
|
-
value: tabsListContextValue,
|
|
2679
|
-
children: _jsx6(CompositeRoot, {
|
|
2680
|
-
render,
|
|
2681
|
-
className,
|
|
2682
|
-
style,
|
|
2683
|
-
state,
|
|
2684
|
-
refs: [forwardedRef, setTabsListElement],
|
|
2685
|
-
props: [defaultProps, elementProps],
|
|
2686
|
-
stateAttributesMapping: tabsStateAttributesMapping,
|
|
2687
|
-
highlightedIndex: highlightedTabIndex,
|
|
2688
|
-
enableHomeAndEndKeys: !0,
|
|
2689
|
-
loopFocus,
|
|
2690
|
-
orientation,
|
|
2691
|
-
onHighlightedIndexChange: setHighlightedTabIndex,
|
|
2692
|
-
onMapChange: setTabMap,
|
|
2693
|
-
disabledIndices: EMPTY_ARRAY
|
|
2694
|
-
})
|
|
2695
|
-
});
|
|
2696
|
-
});
|
|
2697
|
-
process.env.NODE_ENV !== "production" && (TabsList.displayName = "TabsList");
|
|
2698
|
-
|
|
2699
1610
|
export {
|
|
2700
1611
|
useRefWithInit,
|
|
2701
1612
|
useStableCallback,
|
|
2702
1613
|
NOOP,
|
|
1614
|
+
EMPTY_ARRAY,
|
|
2703
1615
|
EMPTY_OBJECT,
|
|
2704
1616
|
useOnMount,
|
|
2705
1617
|
formatErrorMessage_default,
|
|
@@ -2735,6 +1647,7 @@ export {
|
|
|
2735
1647
|
closest,
|
|
2736
1648
|
getTarget,
|
|
2737
1649
|
FOCUSABLE_ATTRIBUTE,
|
|
1650
|
+
TransitionStatusDataAttributes_exports,
|
|
2738
1651
|
transitionStatusMapping,
|
|
2739
1652
|
CommonPopupDataAttributes_exports,
|
|
2740
1653
|
CommonTriggerDataAttributes_exports,
|
|
@@ -2778,6 +1691,11 @@ export {
|
|
|
2778
1691
|
getOppositePlacement,
|
|
2779
1692
|
getPaddingObject,
|
|
2780
1693
|
rectToClientRect,
|
|
1694
|
+
isIndexOutOfListBounds,
|
|
1695
|
+
getMinListIndex,
|
|
1696
|
+
getMaxListIndex,
|
|
1697
|
+
findNonDisabledListIndex,
|
|
1698
|
+
isListIndexDisabled,
|
|
2781
1699
|
isElementVisible,
|
|
2782
1700
|
ownerDocument,
|
|
2783
1701
|
isTabbable,
|
|
@@ -2789,7 +1707,6 @@ export {
|
|
|
2789
1707
|
isOutsideEvent,
|
|
2790
1708
|
disableFocusInside,
|
|
2791
1709
|
enableFocusInside,
|
|
2792
|
-
useCSPContext,
|
|
2793
1710
|
useIsoLayoutEffect,
|
|
2794
1711
|
DirectionContext,
|
|
2795
1712
|
useDirection,
|
|
@@ -2802,9 +1719,21 @@ export {
|
|
|
2802
1719
|
useTransitionStatus,
|
|
2803
1720
|
useAnimationsFinished,
|
|
2804
1721
|
useOpenChangeComplete,
|
|
1722
|
+
useSyncExternalStore,
|
|
2805
1723
|
inertValue,
|
|
2806
1724
|
getCssDimensions,
|
|
1725
|
+
error,
|
|
1726
|
+
CompositeRootContext,
|
|
1727
|
+
useCompositeRootContext,
|
|
2807
1728
|
useButton,
|
|
1729
|
+
ARROW_UP2 as ARROW_UP,
|
|
1730
|
+
ARROW_DOWN2 as ARROW_DOWN,
|
|
1731
|
+
ARROW_LEFT2 as ARROW_LEFT,
|
|
1732
|
+
ARROW_RIGHT2 as ARROW_RIGHT,
|
|
1733
|
+
HOME,
|
|
1734
|
+
END,
|
|
2808
1735
|
COMPOSITE_KEYS,
|
|
2809
|
-
|
|
1736
|
+
MODIFIER_KEYS,
|
|
1737
|
+
isNativeInput,
|
|
1738
|
+
scrollIntoViewIfNeeded
|
|
2810
1739
|
};
|