@yuku123/z-cognition-component 2.0.2 → 2.0.3
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-lib/BaseInput-DHrGPDB9.js +1096 -0
- package/dist-lib/ClockCircleOutlined-DP6fSLgk.js +12 -0
- package/dist-lib/Collapse-B77SsmFh.js +523 -0
- package/dist-lib/{ConceptsPage-BOeKdDKI.js → ConceptsPage-DOf_CJlz.js} +13 -16
- package/dist-lib/DeleteOutlined-BAZSAooQ.js +12 -0
- package/dist-lib/{DocsPage-BZOBFp3c.js → DocsPage-CiC7TU96.js} +4 -4
- package/dist-lib/EllipsisOutlined-Dr4orLLw.js +1109 -0
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +90 -0
- package/dist-lib/{EyeOutlined-DGSrX-0M.js → EyeOutlined-CudyDdjH.js} +1 -1
- package/dist-lib/ImpactPage-CYiuqy0S.js +68 -0
- package/dist-lib/{LeftOutlined-Cgo6Izj-.js → LeftOutlined-CJasZIyX.js} +1 -1
- package/dist-lib/{OntologyDetailPage-B8DyU8WW.js → OntologyDetailPage-mgK_NQxP.js} +99 -93
- package/dist-lib/{OntologyInferPage-CvcjxpBB.js → OntologyInferPage-NUaoaQpN.js} +38 -40
- package/dist-lib/{OntologyListPage-Cb0XfpWE.js → OntologyListPage-C9wH01y0.js} +47 -49
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +134 -0
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +2844 -0
- package/dist-lib/{OntologyValidatePage-abQVJwzV.js → OntologyValidatePage-DtkYK_l4.js} +49 -52
- package/dist-lib/Pagination-BJ8wnqAa.js +1112 -0
- package/dist-lib/PlusOutlined-BSTPGLOH.js +21 -0
- package/dist-lib/{ReloadOutlined-CS-e-TmN.js → ReloadOutlined-B26pDoyV.js} +19 -10
- package/dist-lib/{ResolvePage-rbQ-8nNZ.js → ResolvePage-Cz9HORZ3.js} +31 -33
- package/dist-lib/{RotateRightOutlined-q7zp2e47.js → RotateRightOutlined-DqyspFCO.js} +1 -1
- package/dist-lib/Skeleton-CxFsInYI.js +671 -0
- package/dist-lib/Table-Civ838nE.js +20514 -0
- package/dist-lib/{Table-CDagah-g.js → Table-J_7eBbi7.js} +414 -414
- package/dist-lib/TermDetailPage-BtkOpbPT.js +263 -0
- package/dist-lib/{TermsPage-CuufAyuL.js → TermsPage-BuzCMYov.js} +28 -31
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist-lib/accessAk-CA30m5eX.js +64 -0
- package/dist-lib/{agents-CvgRLQw2.js → agents-eZDKzePP.js} +41 -41
- package/dist-lib/{ai-DYDhijtn.js → ai-CNSn3-sd.js} +32 -32
- package/dist-lib/{ai-chat-share-DJnybJtS.js → ai-chat-share-Yrqt_J6a.js} +13 -14
- package/dist-lib/ak-manage-DklVFT5I.js +805 -0
- package/dist-lib/{approval-3IbhY8Lp.js → approval-B-bCSmfi.js} +25 -26
- package/dist-lib/{approvals-Cd6CVzz4.js → approvals-B0ggYiyD.js} +42 -43
- package/dist-lib/{assistant-cIXgilaE.js → assistant-Of0mgMsM.js} +33 -34
- package/dist-lib/{assistant-history-BQzH4ChB.js → assistant-history-DcyDhUzJ.js} +5 -5
- package/dist-lib/{assistant-summary-LKTj_HKM.js → assistant-summary-CjLaTyFz.js} +1 -1
- package/dist-lib/{audit-CxuJ5unU.js → audit-wDNCfmOy.js} +1 -1
- package/dist-lib/{bios-BplnCOF4.js → bios-CIwO1AUK.js} +128 -130
- package/dist-lib/callSuper-CpMOVGin.js +7 -0
- package/dist-lib/callSuper-CwIeyYoc.js +7 -0
- package/dist-lib/category-9gqNseEa.js +76 -0
- package/dist-lib/causal-CzAYukj9.js +789 -0
- package/dist-lib/{changelog-BoGqt_81.js → changelog-CQfIMS51.js} +2 -2
- package/dist-lib/changelog-sKJMQrlV.js +103 -0
- package/dist-lib/chat-panel-BPbqKckR.js +1543 -0
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +1627 -0
- package/dist-lib/code-space-D_ZE966E.js +1070 -0
- package/dist-lib/{colors-sdAcAcU3.js → colors-DpKdb8L-.js} +3 -3
- package/dist-lib/community-9_7ExHcm.js +70 -0
- package/dist-lib/community-CfWXxujB.js +217 -0
- package/dist-lib/community-material-page-Z_EZuBPl.js +747 -0
- package/dist-lib/connections-Bcqsp11M.js +1065 -0
- package/dist-lib/context-T27uno74.js +54 -0
- package/dist-lib/{createForOfIteratorHelper-DEx_aTey.js → createForOfIteratorHelper-CasBzL_Q.js} +1 -1
- package/dist-lib/{dayjs.min-BauDENhn.js → dayjs.min-DoEf5yCX.js} +1 -1
- package/dist-lib/detail-CV6xp_Jp.js +84 -0
- package/dist-lib/{detail-BaX7WiWV.js → detail-DioaWKWj.js} +5847 -7224
- package/dist-lib/{detail-Cx5c4KJH.js → detail-EyLdjGpX.js} +71 -72
- package/dist-lib/development-CFcOIUKc.js +167 -0
- package/dist-lib/{docx-preview-B5nQuTwk.js → docx-preview-D4v2g8Yg.js} +1 -1
- package/dist-lib/{downloads-C3Oz04OW.js → downloads-DtV5hOQv.js} +3 -4
- package/dist-lib/{edit-Cbn2eJaJ.js → edit-NtXUNj5N.js} +262 -266
- package/dist-lib/{editor-mtaJBQXz.js → editor-KZhj-rwT.js} +25 -26
- package/dist-lib/editor-page-BaxK_OYm.js +1169 -0
- package/dist-lib/embed-mf8t3QXh.js +51841 -0
- package/dist-lib/embed.css +2 -2
- package/dist-lib/{evaluation-BoHiY8yT.js → evaluation-CZTpC9v3.js} +14 -15
- package/dist-lib/execution-B6HmOA2_.js +159 -0
- package/dist-lib/focus-set-lt52maBX.js +38 -0
- package/dist-lib/{format-UGmYKemG.js → format-CWI99NCN.js} +1 -1
- package/dist-lib/graph-BllA9bmL.js +44 -0
- package/dist-lib/graph-DHV-rdiK.js +640 -0
- package/dist-lib/{index-o65vKUwa.js → index--AI-htgA.js} +44 -45
- package/dist-lib/index-2SysmGHo.js +1166 -0
- package/dist-lib/{index-Bm1sK-VN.js → index-3J47mTL1.js} +10 -10
- package/dist-lib/index-4tbtbcAt.js +550 -0
- package/dist-lib/index-B12ZggsE.js +77 -0
- package/dist-lib/{index-D3GHtSlM.js → index-B5Roo82U.js} +49 -50
- package/dist-lib/{index-nQSVLWfW.js → index-B7SfTpox.js} +79 -81
- package/dist-lib/index-BEO8itgt.js +566 -0
- package/dist-lib/index-BPbOPT2j.js +413 -0
- package/dist-lib/index-BVgdmf6r.js +2487 -0
- package/dist-lib/index-Bd7AGv4a.js +34 -0
- package/dist-lib/index-BkJjYgKD.js +5012 -0
- package/dist-lib/{index-DBlG9uXV.js → index-BkTegt8T.js} +513 -590
- package/dist-lib/{index-B22_2Dzh.js → index-Bln3mJfp.js} +2 -2
- package/dist-lib/index-BoCtPJD4.js +915 -0
- package/dist-lib/{index-DMTPsTna.js → index-BqTsLClH.js} +3 -4
- package/dist-lib/index-Bs4MevzC.js +16075 -0
- package/dist-lib/index-BsoHetYT.js +236 -0
- package/dist-lib/{index-9aQ4BzIK.js → index-BvJ35WL3.js} +13 -14
- package/dist-lib/{index-BEjXaDfk.js → index-Bw4M9KLv.js} +84 -85
- package/dist-lib/index-C2CV4bte.js +242 -0
- package/dist-lib/{index-BSlCGnzo.js → index-CF0ucN_K.js} +12 -12
- package/dist-lib/{index-B57Fj7Y0.js → index-CLhLA2ig.js} +92 -94
- package/dist-lib/{index-Vu6sPBci.js → index-CSJA8wvL.js} +301 -296
- package/dist-lib/index-CSnvcFg-.js +543 -0
- package/dist-lib/{index-C3AMwzIi.js → index-CZipVp1G.js} +1 -1
- package/dist-lib/{index-ounfql2z.js → index-CdJ5ggvp.js} +26 -28
- package/dist-lib/index-CgwK2maq.js +1987 -0
- package/dist-lib/{index-Bc-Vin3j.js → index-CtqUgNxs.js} +53 -55
- package/dist-lib/index-CvxfA0ZK.js +215 -0
- package/dist-lib/{index-y7jVGGI0.js → index-CwyFMPcr.js} +16 -18
- package/dist-lib/index-D35Ry0PG.js +1162 -0
- package/dist-lib/{index-Cj4DDWyj.js → index-D6ns_Xmf.js} +10 -11
- package/dist-lib/{index-DsuUGhTA.js → index-DGbjbjBY.js} +46 -48
- package/dist-lib/index-DKAGVWMX.js +390 -0
- package/dist-lib/index-DQ16Zb7x.js +546 -0
- package/dist-lib/index-DRcTwC17.js +418 -0
- package/dist-lib/index-DU6bO95v.js +2075 -0
- package/dist-lib/index-DaMLYomP.js +853 -0
- package/dist-lib/index-Dd9pPAT3.js +2192 -0
- package/dist-lib/{index-CHBNrCMy.js → index-DgfIEgir.js} +29 -29
- package/dist-lib/{index-Cy9i4Kx7.js → index-DhSCFLtV.js} +113 -117
- package/dist-lib/index-DxzorPvG.js +13960 -0
- package/dist-lib/index-If4xc1-H.js +559 -0
- package/dist-lib/index-QZ9JPfVR.js +251 -0
- package/dist-lib/index-VeAMz0iC.js +1719 -0
- package/dist-lib/index-mUlorJxp.js +3279 -0
- package/dist-lib/{index-CLTfICbf.js → index-xQmDaKK3.js} +6 -6
- package/dist-lib/{index-BwVZgt5s.js → index-zXwXfn-X.js} +48 -50
- package/dist-lib/index.js +3 -4
- package/dist-lib/json-field-COcz5F2R.js +196 -0
- package/dist-lib/{jszip.min-DcEHhn-b.js → jszip.min-dcaDnWUw.js} +1 -1
- package/dist-lib/{kb-form-modal-B0rM1ZvV.js → kb-form-modal-D9gnvXbE.js} +67 -67
- package/dist-lib/{kbTeam-Bh_FQH28.js → kbTeam-CorrPJFr.js} +3 -3
- package/dist-lib/{knowledge-base-Cl1Ka1e6.js → knowledge-base-DJkjMFHW.js} +103 -104
- package/dist-lib/{knowledge-hub-CPuzdRiq.js → knowledge-hub-DKiDlaZz.js} +54 -55
- package/dist-lib/login-56zv4aLO.js +36 -0
- package/dist-lib/{markdown-lite-Cu62Fl7J.js → markdown-lite-p1tiuSZM.js} +198 -202
- package/dist-lib/material-DtPASeqq.js +204 -0
- package/dist-lib/material-draft-markdown-281d5_GN.js +443 -0
- package/dist-lib/material-original-preview-CPGjdmbe.js +214 -0
- package/dist-lib/{material-preview-docx-CH-09KeC.js → material-preview-docx-lp_xPipj.js} +1 -1
- package/dist-lib/{material-preview-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
- package/dist-lib/material-workspace-model-QLsU5qUO.js +328 -0
- package/dist-lib/{member-DKDx77PD.js → member-Cz-OIdj9.js} +1 -1
- package/dist-lib/memory-reorganization-DgJnWIrW.js +8 -0
- package/dist-lib/memory-spaces-D-orVNR7.js +2340 -0
- package/dist-lib/{message-Dievi8Jw.js → message-C9gfvpGg.js} +1 -1
- package/dist-lib/{message-BrooQ3Q7.js → message-D6FhzB7J.js} +24 -25
- package/dist-lib/{messages-xTNmTS9g.js → messages-cctmEVcG.js} +15 -16
- package/dist-lib/meta-DT_O4zM9.js +708 -0
- package/dist-lib/{metrics-DiHYqBKB.js → metrics-BNeVcI8-.js} +2 -2
- package/dist-lib/mobile-D8kZjfQU.js +2413 -0
- package/dist-lib/{monitor-BXsdMJSV.js → monitor-DTUyqumg.js} +4 -4
- package/dist-lib/{monitor-BBCu3zRe.js → monitor-DexMYjzF.js} +8 -8
- package/dist-lib/{my-access-CEGErUgv.js → my-access-DWBV6ohp.js} +120 -132
- package/dist-lib/{my-permissions-wSr5zv7g.js → my-permissions-B-gJZQYM.js} +22 -23
- package/dist-lib/navigation-DVlyWnpD.js +102 -0
- package/dist-lib/{new-BevAuTe5.js → new-JmARyD88.js} +14 -15
- package/dist-lib/{ontology-DXGSJC-y.js → ontology-B4rkO33J.js} +50 -52
- package/dist-lib/ontology-dataprep-BwD5TKs2.js +322 -0
- package/dist-lib/{ontology-domains-jTG7CZm8.js → ontology-domains-zxFrjn0v.js} +89 -92
- package/dist-lib/ontology-extract-BHOxruRO.js +3199 -0
- package/dist-lib/ontology-extract-iR_rXxFe.js +295 -0
- package/dist-lib/ontology-flow-CW0SzeK7.js +456 -0
- package/dist-lib/ontology-flow-Dv5iQ20f.js +154 -0
- package/dist-lib/ontology-modeling-B9wswveh.js +510 -0
- package/dist-lib/ontology-modeling-hakCluBi.js +15136 -0
- package/dist-lib/{ontology-scenarios-J5kw6xgi.js → ontology-scenarios-C2kp7Rs-.js} +1466 -1482
- package/dist-lib/ontology-scenarios-DKnfydG6.js +675 -0
- package/dist-lib/ontology-task-config-DmnWyCCB.js +122 -0
- package/dist-lib/ontology-terms-BoNB-5ar.js +66 -0
- package/dist-lib/ontology-terms-C-NhpcIZ.js +1195 -0
- package/dist-lib/pages-CticGC6S.js +512 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-BUXo69Ne.js → permission-Dq1-AOQw.js} +41 -41
- package/dist-lib/pipeline-layout-CJlOMXJF.js +70 -0
- package/dist-lib/{pptx-preview.es-AUrdYKu3.js → pptx-preview.es-D4ODiBv2.js} +2 -2
- package/dist-lib/preset-Bp_mvsJm.js +56827 -0
- package/dist-lib/{preset-gh5SGoYT.js → preset-DCNSE--Y.js} +8 -8
- package/dist-lib/progress-CZxOOnIs.js +778 -0
- package/dist-lib/{quota-D31cXjul.js → quota-oICQRHFU.js} +4 -4
- package/dist-lib/row-By17TCiW.js +154 -0
- package/dist-lib/runs-DQTDpPaN.js +565 -0
- package/dist-lib/{save-blob-CiWNK-cX.js → save-blob-CwCZE1Dn.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-DQ_OBV4Z.js → scenario-mapping-preview-sJtjgmry.js} +46 -48
- package/dist-lib/scenario-simple-form-BvKSPFzw.js +989 -0
- package/dist-lib/{schedule-BktxwX3S.js → schedule-CwkPPSuT.js} +8 -8
- package/dist-lib/script-gYJAFobb.js +2709 -0
- package/dist-lib/{settings-dsB3H65I.js → settings-CJd5Jj4y.js} +133 -134
- package/dist-lib/{shared-CTCzvhyE.js → shared-DG5-VCDM.js} +1 -1
- package/dist-lib/{shared-utils-BstybhBG.js → shared-utils-CFHws1DA.js} +2 -2
- package/dist-lib/{skills-CHPlMsgO.js → skills-lxpJ5Lzx.js} +39 -40
- package/dist-lib/{source-selection-tXqc855k.js → source-selection-DJnQQckl.js} +16 -16
- package/dist-lib/sources-C83LpCcV.js +279 -0
- package/dist-lib/style-B5THvtDY.js +191 -0
- package/dist-lib/{task-config-BiTOiZj0.js → task-config-BNYoOb79.js} +4 -4
- package/dist-lib/{tech-BKlGPkV0.js → tech-LuZvKDo6.js} +3 -4
- package/dist-lib/templates-a-kbCamr.js +58 -0
- package/dist-lib/tenant-login-COB-5h_2.js +338 -0
- package/dist-lib/{tools-CouQ4FWk.js → tools-CrA6GrY6.js} +14 -14
- package/dist-lib/{use-domain-access-BPlNfoiP.js → use-domain-access-ehGJBGvU.js} +15 -15
- package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-DfRnsBS6.js} +1 -1
- package/dist-lib/{use-graph-layers-ja-ZIC_R.js → use-graph-layers-CrhEeHfD.js} +48 -50
- package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
- package/dist-lib/useBreakpoint-Cul9y9Cu.js +87 -0
- package/dist-lib/{useForm-Byp1LopG.js → useForm-B-dwOwJ8.js} +11 -11
- package/dist-lib/{version-control-panel-CkBm36Yk.js → version-control-panel-mWXkC-uB.js} +26 -27
- package/dist-lib/{version-management-B4kIbdVc.js → version-management-nPlG7wQO.js} +6 -7
- package/dist-lib/{welcome-F5iZoFB1.js → welcome-Cqv1-rXT.js} +3 -4
- package/package.json +1 -1
- package/dist-lib/ApartmentOutlined-M6qSurnE.js +0 -12
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +0 -12
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +0 -91
- package/dist-lib/ImpactPage-DyhUR6fT.js +0 -71
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +0 -136
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +0 -1268
- package/dist-lib/Pagination-Dxslodkq.js +0 -1344
- package/dist-lib/PlusOutlined-B_dXo_97.js +0 -12
- package/dist-lib/SearchOutlined-puH6bCY6.js +0 -979
- package/dist-lib/Skeleton-DXcERb5r.js +0 -557
- package/dist-lib/TagsOutlined-B4_qkn6-.js +0 -20
- package/dist-lib/TermDetailPage-CP0D6OvA.js +0 -242
- package/dist-lib/TextArea-DTpTS5HL.js +0 -1897
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +0 -20
- package/dist-lib/callSuper-DZEfdkXG.js +0 -7
- package/dist-lib/changelog-Cn81Dvgk.js +0 -69
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +0 -2004
- package/dist-lib/context-Buz0ggsK.js +0 -710
- package/dist-lib/context-DpmyNOn3.js +0 -21
- package/dist-lib/embed-CR8XVkMy.js +0 -31148
- package/dist-lib/focus-set-h0YtOUB2.js +0 -427
- package/dist-lib/index-CaXylbQR.js +0 -3419
- package/dist-lib/index-Cfu1W1H6.js +0 -535
- package/dist-lib/index-CrMcNEAZ.js +0 -9656
- package/dist-lib/index-CyKWCYMK.js +0 -218
- package/dist-lib/index-DBtGE89a.js +0 -168
- package/dist-lib/index-DjFPRXl5.js +0 -1484
- package/dist-lib/index-DvWHYX81.js +0 -450
- package/dist-lib/index-PBT9GksC.js +0 -340
- package/dist-lib/index-bOY1cBol.js +0 -4890
- package/dist-lib/meta-BD_qYTZu.js +0 -540
- package/dist-lib/ontology-modeling-CjRsa-DR.js +0 -1039
- package/dist-lib/ontology-modeling-DOj68TuI.js +0 -38946
- package/dist-lib/ontology-scenarios-CcAagMiP.js +0 -660
- package/dist-lib/pages-CsexFuEz.js +0 -73
- package/dist-lib/row-B5MnGm9M.js +0 -156
- package/dist-lib/scenario-simple-form-DESMvU7A.js +0 -2396
- package/dist-lib/useClosable-BY7FgWKy.js +0 -59
|
@@ -0,0 +1,2192 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import Mt, { createContext as Nt, useState as B, useRef as W, useEffect as ae, useMemo as ut } from "react";
|
|
3
|
+
import { bI as zt, al as Ze, bJ as Dt, aB as Ot, aV as ze, a as Ht, C as At, w as Bt, aT as et, G as kt, K as Gt, y as pt, aj as Wt, m as Vt, n as Xt, o as _, a_ as Kt, t as ft, s as mt, r as Oe, v as jt, x as Ut, R as Ft, ab as Yt, ad as tt, E as qt, L as Jt } from "./index-DxzorPvG.js";
|
|
4
|
+
import { E as Qt, M as Zt, D as en, K as ue, j as nt, s as tn, k as nn, l as on, m as an, n as rn } from "./Table-Civ838nE.js";
|
|
5
|
+
import { R as sn } from "./PlusOutlined-BSTPGLOH.js";
|
|
6
|
+
import { c as V } from "./pages-CticGC6S.js";
|
|
7
|
+
import "react-dom/client";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
let De;
|
|
10
|
+
const ln = () => (typeof De > "u" && (De = zt()), De), ke = /* @__PURE__ */ Nt(null), cn = (t) => {
|
|
11
|
+
const {
|
|
12
|
+
activeTabOffset: e,
|
|
13
|
+
horizontal: n,
|
|
14
|
+
rtl: o,
|
|
15
|
+
indicator: r = {}
|
|
16
|
+
} = t, {
|
|
17
|
+
size: i,
|
|
18
|
+
align: a = "center"
|
|
19
|
+
} = r, [l, b] = B(), c = W(void 0), v = Mt.useCallback((g) => typeof i == "function" ? i(g) : typeof i == "number" ? i : g, [i]);
|
|
20
|
+
function E() {
|
|
21
|
+
Ze.cancel(c.current);
|
|
22
|
+
}
|
|
23
|
+
return ae(() => {
|
|
24
|
+
const g = {};
|
|
25
|
+
if (e)
|
|
26
|
+
if (n) {
|
|
27
|
+
g.width = v(e.width);
|
|
28
|
+
const C = o ? "right" : "left";
|
|
29
|
+
a === "start" && (g[C] = e[C]), a === "center" && (g[C] = e[C] + e.width / 2, g.transform = o ? "translateX(50%)" : "translateX(-50%)"), a === "end" && (g[C] = e[C] + e.width, g.transform = "translateX(-100%)");
|
|
30
|
+
} else
|
|
31
|
+
g.height = v(e.height), a === "start" && (g.top = e.top), a === "center" && (g.top = e.top + e.height / 2, g.transform = "translateY(-50%)"), a === "end" && (g.top = e.top + e.height, g.transform = "translateY(-100%)");
|
|
32
|
+
return E(), c.current = Ze(() => {
|
|
33
|
+
l && g && Object.keys(g).every((z) => {
|
|
34
|
+
const x = g[z], P = l[z];
|
|
35
|
+
return typeof x == "number" && typeof P == "number" ? Math.round(x) === Math.round(P) : x === P;
|
|
36
|
+
}) || b(g);
|
|
37
|
+
}), E;
|
|
38
|
+
}, [JSON.stringify(e), n, o, a, v]), {
|
|
39
|
+
style: l
|
|
40
|
+
};
|
|
41
|
+
}, ot = {
|
|
42
|
+
width: 0,
|
|
43
|
+
height: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
top: 0
|
|
46
|
+
};
|
|
47
|
+
function dn(t, e, n) {
|
|
48
|
+
return ut(() => {
|
|
49
|
+
var a, l;
|
|
50
|
+
const o = /* @__PURE__ */ new Map(), r = e.get((a = t[0]) == null ? void 0 : a.key) || ot, i = r.left + r.width;
|
|
51
|
+
for (let b = 0; b < t.length; b += 1) {
|
|
52
|
+
const {
|
|
53
|
+
key: c
|
|
54
|
+
} = t[b];
|
|
55
|
+
let v = e.get(c);
|
|
56
|
+
v || (v = e.get((l = t[b - 1]) == null ? void 0 : l.key) || ot);
|
|
57
|
+
const E = o.get(c) || {
|
|
58
|
+
...v
|
|
59
|
+
};
|
|
60
|
+
E.right = i - E.left - E.width, o.set(c, E);
|
|
61
|
+
}
|
|
62
|
+
return o;
|
|
63
|
+
}, [t.map((o) => o.key).join("_"), e, n]);
|
|
64
|
+
}
|
|
65
|
+
function at(t, e) {
|
|
66
|
+
const n = s.useRef(t), [, o] = s.useState({});
|
|
67
|
+
function r(i) {
|
|
68
|
+
const a = typeof i == "function" ? i(n.current) : i;
|
|
69
|
+
a !== n.current && e(a, n.current), n.current = a, o({});
|
|
70
|
+
}
|
|
71
|
+
return [n.current, r];
|
|
72
|
+
}
|
|
73
|
+
const un = 0.1, rt = 0.01, Re = 20, it = 0.995 ** Re;
|
|
74
|
+
function pn(t, e) {
|
|
75
|
+
const [n, o] = B(), [r, i] = B(0), [a, l] = B(0), [b, c] = B(), v = W(void 0);
|
|
76
|
+
function E(y) {
|
|
77
|
+
const {
|
|
78
|
+
screenX: d,
|
|
79
|
+
screenY: u
|
|
80
|
+
} = y.touches[0];
|
|
81
|
+
o({
|
|
82
|
+
x: d,
|
|
83
|
+
y: u
|
|
84
|
+
}), window.clearInterval(v.current);
|
|
85
|
+
}
|
|
86
|
+
function g(y) {
|
|
87
|
+
if (!n) return;
|
|
88
|
+
const {
|
|
89
|
+
screenX: d,
|
|
90
|
+
screenY: u
|
|
91
|
+
} = y.touches[0];
|
|
92
|
+
o({
|
|
93
|
+
x: d,
|
|
94
|
+
y: u
|
|
95
|
+
});
|
|
96
|
+
const f = d - n.x, h = u - n.y;
|
|
97
|
+
e(f, h);
|
|
98
|
+
const T = Date.now();
|
|
99
|
+
i(T), l(T - r), c({
|
|
100
|
+
x: f,
|
|
101
|
+
y: h
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function C() {
|
|
105
|
+
if (n && (o(null), c(null), b)) {
|
|
106
|
+
const y = b.x / a, d = b.y / a, u = Math.abs(y), f = Math.abs(d);
|
|
107
|
+
if (Math.max(u, f) < un) return;
|
|
108
|
+
let h = y, T = d;
|
|
109
|
+
v.current = window.setInterval(() => {
|
|
110
|
+
if (Math.abs(h) < rt && Math.abs(T) < rt) {
|
|
111
|
+
window.clearInterval(v.current);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
h *= it, T *= it, e(h * Re, T * Re);
|
|
115
|
+
}, Re);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const z = W(void 0);
|
|
119
|
+
function x(y) {
|
|
120
|
+
const {
|
|
121
|
+
deltaX: d,
|
|
122
|
+
deltaY: u
|
|
123
|
+
} = y;
|
|
124
|
+
let f;
|
|
125
|
+
const h = Math.abs(d), T = Math.abs(u);
|
|
126
|
+
h === T ? f = z.current === "x" ? d : u : h > T ? (f = d, z.current = "x") : (f = u, z.current = "y"), e(-f, -f) && y.preventDefault();
|
|
127
|
+
}
|
|
128
|
+
const P = W(null);
|
|
129
|
+
P.current = {
|
|
130
|
+
onTouchStart: E,
|
|
131
|
+
onTouchMove: g,
|
|
132
|
+
onTouchEnd: C,
|
|
133
|
+
onWheel: x
|
|
134
|
+
}, s.useEffect(() => {
|
|
135
|
+
function y(h) {
|
|
136
|
+
P.current.onTouchStart(h);
|
|
137
|
+
}
|
|
138
|
+
function d(h) {
|
|
139
|
+
P.current.onTouchMove(h);
|
|
140
|
+
}
|
|
141
|
+
function u(h) {
|
|
142
|
+
P.current.onTouchEnd(h);
|
|
143
|
+
}
|
|
144
|
+
function f(h) {
|
|
145
|
+
P.current.onWheel(h);
|
|
146
|
+
}
|
|
147
|
+
return document.addEventListener("touchmove", d, {
|
|
148
|
+
passive: !1
|
|
149
|
+
}), document.addEventListener("touchend", u, {
|
|
150
|
+
passive: !0
|
|
151
|
+
}), t.current.addEventListener("touchstart", y, {
|
|
152
|
+
passive: !0
|
|
153
|
+
}), t.current.addEventListener("wheel", f, {
|
|
154
|
+
passive: !1
|
|
155
|
+
}), () => {
|
|
156
|
+
document.removeEventListener("touchmove", d), document.removeEventListener("touchend", u);
|
|
157
|
+
};
|
|
158
|
+
}, []);
|
|
159
|
+
}
|
|
160
|
+
function bt(t) {
|
|
161
|
+
const [e, n] = B(0), o = W(0), r = W(void 0);
|
|
162
|
+
return r.current = t, Dt(() => {
|
|
163
|
+
var i;
|
|
164
|
+
(i = r.current) == null || i.call(r);
|
|
165
|
+
}, [e]), () => {
|
|
166
|
+
o.current === e && (o.current += 1, n(o.current));
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function fn(t) {
|
|
170
|
+
const e = W([]), [, n] = B({}), o = W(typeof t == "function" ? t() : t), r = bt(() => {
|
|
171
|
+
let a = o.current;
|
|
172
|
+
e.current.forEach((l) => {
|
|
173
|
+
a = l(a);
|
|
174
|
+
}), e.current = [], o.current = a, n({});
|
|
175
|
+
});
|
|
176
|
+
function i(a) {
|
|
177
|
+
e.current.push(a), r();
|
|
178
|
+
}
|
|
179
|
+
return [o.current, i];
|
|
180
|
+
}
|
|
181
|
+
const st = {
|
|
182
|
+
width: 0,
|
|
183
|
+
height: 0,
|
|
184
|
+
left: 0,
|
|
185
|
+
top: 0,
|
|
186
|
+
right: 0
|
|
187
|
+
};
|
|
188
|
+
function mn(t, e, n, o, r, i, {
|
|
189
|
+
tabs: a,
|
|
190
|
+
tabPosition: l,
|
|
191
|
+
rtl: b
|
|
192
|
+
}) {
|
|
193
|
+
let c, v, E;
|
|
194
|
+
return ["top", "bottom"].includes(l) ? (c = "width", v = b ? "right" : "left", E = Math.abs(n)) : (c = "height", v = "top", E = -n), ut(() => {
|
|
195
|
+
if (!a.length)
|
|
196
|
+
return [0, 0];
|
|
197
|
+
const g = a.length;
|
|
198
|
+
let C = g;
|
|
199
|
+
for (let x = 0; x < g; x += 1) {
|
|
200
|
+
const P = t.get(a[x].key) || st;
|
|
201
|
+
if (Math.floor(P[v] + P[c]) > Math.floor(E + e)) {
|
|
202
|
+
C = x - 1;
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
let z = 0;
|
|
207
|
+
for (let x = g - 1; x >= 0; x -= 1)
|
|
208
|
+
if ((t.get(a[x].key) || st)[v] < E) {
|
|
209
|
+
z = x + 1;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
return z > C ? [0, -1] : [z, C];
|
|
213
|
+
}, [t, e, o, r, i, E, l, a.map((g) => g.key).join("_"), b]);
|
|
214
|
+
}
|
|
215
|
+
function lt(t) {
|
|
216
|
+
let e;
|
|
217
|
+
return t instanceof Map ? (e = {}, t.forEach((n, o) => {
|
|
218
|
+
e[o] = n;
|
|
219
|
+
})) : e = t, JSON.stringify(e);
|
|
220
|
+
}
|
|
221
|
+
const bn = "TABS_DQ";
|
|
222
|
+
function gt(t) {
|
|
223
|
+
return String(t).replace(/"/g, bn);
|
|
224
|
+
}
|
|
225
|
+
function Ge(t, e, n, o) {
|
|
226
|
+
return (
|
|
227
|
+
// Only editable tabs can be removed
|
|
228
|
+
!(!n || // Tabs cannot be removed when disabled
|
|
229
|
+
o || // closable is false
|
|
230
|
+
t === !1 || // If closable is undefined, the remove button should be hidden when closeIcon is null or false
|
|
231
|
+
t === void 0 && (e === !1 || e === null))
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
const ht = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
235
|
+
const {
|
|
236
|
+
prefixCls: n,
|
|
237
|
+
editable: o,
|
|
238
|
+
locale: r,
|
|
239
|
+
style: i
|
|
240
|
+
} = t;
|
|
241
|
+
return !o || o.showAdd === !1 ? null : /* @__PURE__ */ s.createElement("button", {
|
|
242
|
+
ref: e,
|
|
243
|
+
type: "button",
|
|
244
|
+
className: `${n}-nav-add`,
|
|
245
|
+
style: i,
|
|
246
|
+
"aria-label": (r == null ? void 0 : r.addAriaLabel) || "Add tab",
|
|
247
|
+
onClick: (a) => {
|
|
248
|
+
o.onEdit("add", {
|
|
249
|
+
event: a
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}, o.addIcon || "+");
|
|
253
|
+
}), He = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
254
|
+
const {
|
|
255
|
+
position: n,
|
|
256
|
+
prefixCls: o,
|
|
257
|
+
extra: r
|
|
258
|
+
} = t;
|
|
259
|
+
if (!r)
|
|
260
|
+
return null;
|
|
261
|
+
let i, a = {};
|
|
262
|
+
return typeof r == "object" && !/* @__PURE__ */ s.isValidElement(r) ? a = r : a.right = r, n === "right" && (i = a.right), n === "left" && (i = a.left), i ? /* @__PURE__ */ s.createElement("div", {
|
|
263
|
+
className: `${o}-extra-content`,
|
|
264
|
+
ref: e
|
|
265
|
+
}, i) : null;
|
|
266
|
+
});
|
|
267
|
+
process.env.NODE_ENV !== "production" && (He.displayName = "ExtraContent");
|
|
268
|
+
function Ae() {
|
|
269
|
+
return Ae = Object.assign ? Object.assign.bind() : function(t) {
|
|
270
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
271
|
+
var n = arguments[e];
|
|
272
|
+
for (var o in n)
|
|
273
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
274
|
+
}
|
|
275
|
+
return t;
|
|
276
|
+
}, Ae.apply(this, arguments);
|
|
277
|
+
}
|
|
278
|
+
const gn = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
279
|
+
const {
|
|
280
|
+
prefixCls: n,
|
|
281
|
+
id: o,
|
|
282
|
+
tabs: r,
|
|
283
|
+
locale: i,
|
|
284
|
+
mobile: a,
|
|
285
|
+
more: l = {},
|
|
286
|
+
style: b,
|
|
287
|
+
className: c,
|
|
288
|
+
editable: v,
|
|
289
|
+
tabBarGutter: E,
|
|
290
|
+
rtl: g,
|
|
291
|
+
removeAriaLabel: C,
|
|
292
|
+
onTabClick: z,
|
|
293
|
+
getPopupContainer: x,
|
|
294
|
+
popupClassName: P,
|
|
295
|
+
popupStyle: y,
|
|
296
|
+
classNames: d,
|
|
297
|
+
styles: u
|
|
298
|
+
} = t, [f, h] = B(!1), [T, F] = B(null), {
|
|
299
|
+
icon: O = "More",
|
|
300
|
+
popupRender: L
|
|
301
|
+
} = l, H = `${o}-more-popup`, Y = `${n}-dropdown`, $ = T !== null ? `${H}-${T}` : null, D = i == null ? void 0 : i.dropdownAriaLabel;
|
|
302
|
+
function q(I, A) {
|
|
303
|
+
I.preventDefault(), I.stopPropagation(), v.onEdit("remove", {
|
|
304
|
+
key: A,
|
|
305
|
+
event: I
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
const R = /* @__PURE__ */ s.createElement(Qt, {
|
|
309
|
+
onClick: ({
|
|
310
|
+
key: I,
|
|
311
|
+
domEvent: A
|
|
312
|
+
}) => {
|
|
313
|
+
z(I, A), h(!1);
|
|
314
|
+
},
|
|
315
|
+
prefixCls: `${Y}-menu`,
|
|
316
|
+
id: H,
|
|
317
|
+
tabIndex: -1,
|
|
318
|
+
role: "listbox",
|
|
319
|
+
"aria-activedescendant": $,
|
|
320
|
+
selectedKeys: [T],
|
|
321
|
+
"aria-label": D !== void 0 ? D : "expanded dropdown"
|
|
322
|
+
}, r.map((I) => {
|
|
323
|
+
const {
|
|
324
|
+
closable: A,
|
|
325
|
+
disabled: j,
|
|
326
|
+
closeIcon: J,
|
|
327
|
+
key: k,
|
|
328
|
+
label: G
|
|
329
|
+
} = I, M = Ge(A, J, v, j);
|
|
330
|
+
return /* @__PURE__ */ s.createElement(Zt, {
|
|
331
|
+
key: k,
|
|
332
|
+
id: `${H}-${k}`,
|
|
333
|
+
role: "option",
|
|
334
|
+
"aria-controls": o && `${o}-panel-${k}`,
|
|
335
|
+
disabled: j
|
|
336
|
+
}, /* @__PURE__ */ s.createElement("span", null, G), M && /* @__PURE__ */ s.createElement("button", {
|
|
337
|
+
type: "button",
|
|
338
|
+
"aria-label": C || "remove",
|
|
339
|
+
tabIndex: 0,
|
|
340
|
+
className: V(`${Y}-menu-item-remove`, d == null ? void 0 : d.remove),
|
|
341
|
+
style: u == null ? void 0 : u.remove,
|
|
342
|
+
onClick: (K) => {
|
|
343
|
+
K.stopPropagation(), q(K, k);
|
|
344
|
+
}
|
|
345
|
+
}, J || v.removeIcon || "×"));
|
|
346
|
+
})), re = L ? L(R, {
|
|
347
|
+
restTabs: r,
|
|
348
|
+
onClose: () => h(!1)
|
|
349
|
+
}) : R;
|
|
350
|
+
function Q(I) {
|
|
351
|
+
const A = r.filter((k) => !k.disabled);
|
|
352
|
+
let j = A.findIndex((k) => k.key === T) || 0;
|
|
353
|
+
const J = A.length;
|
|
354
|
+
for (let k = 0; k < J; k += 1) {
|
|
355
|
+
j = (j + I + J) % J;
|
|
356
|
+
const G = A[j];
|
|
357
|
+
if (!G.disabled) {
|
|
358
|
+
F(G.key);
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function de(I) {
|
|
364
|
+
const {
|
|
365
|
+
which: A
|
|
366
|
+
} = I;
|
|
367
|
+
if (!f) {
|
|
368
|
+
[ue.DOWN, ue.SPACE, ue.ENTER].includes(A) && (h(!0), I.preventDefault());
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
switch (A) {
|
|
372
|
+
case ue.UP:
|
|
373
|
+
Q(-1), I.preventDefault();
|
|
374
|
+
break;
|
|
375
|
+
case ue.DOWN:
|
|
376
|
+
Q(1), I.preventDefault();
|
|
377
|
+
break;
|
|
378
|
+
case ue.ESC:
|
|
379
|
+
h(!1);
|
|
380
|
+
break;
|
|
381
|
+
case ue.SPACE:
|
|
382
|
+
case ue.ENTER:
|
|
383
|
+
T !== null && z(T, I);
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
ae(() => {
|
|
388
|
+
const I = document.getElementById($);
|
|
389
|
+
I != null && I.scrollIntoView && I.scrollIntoView(!1);
|
|
390
|
+
}, [$, T]), ae(() => {
|
|
391
|
+
f || F(null);
|
|
392
|
+
}, [f]);
|
|
393
|
+
const w = {
|
|
394
|
+
marginInlineStart: E
|
|
395
|
+
};
|
|
396
|
+
r.length || (w.visibility = "hidden", w.order = 1);
|
|
397
|
+
const X = V(P, {
|
|
398
|
+
[`${Y}-rtl`]: g
|
|
399
|
+
}), ie = a ? null : /* @__PURE__ */ s.createElement(en, Ae({
|
|
400
|
+
prefixCls: Y,
|
|
401
|
+
overlay: re,
|
|
402
|
+
visible: r.length ? f : !1,
|
|
403
|
+
onVisibleChange: h,
|
|
404
|
+
overlayClassName: X,
|
|
405
|
+
overlayStyle: y,
|
|
406
|
+
mouseEnterDelay: 0.1,
|
|
407
|
+
mouseLeaveDelay: 0.1,
|
|
408
|
+
getPopupContainer: x
|
|
409
|
+
}, l), /* @__PURE__ */ s.createElement("button", {
|
|
410
|
+
type: "button",
|
|
411
|
+
className: `${n}-nav-more`,
|
|
412
|
+
style: w,
|
|
413
|
+
"aria-haspopup": "listbox",
|
|
414
|
+
"aria-controls": H,
|
|
415
|
+
id: `${o}-more`,
|
|
416
|
+
"aria-expanded": f,
|
|
417
|
+
onKeyDown: de
|
|
418
|
+
}, O));
|
|
419
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
420
|
+
className: V(`${n}-nav-operations`, c),
|
|
421
|
+
style: b,
|
|
422
|
+
ref: e
|
|
423
|
+
}, ie, /* @__PURE__ */ s.createElement(ht, {
|
|
424
|
+
prefixCls: n,
|
|
425
|
+
locale: i,
|
|
426
|
+
editable: v
|
|
427
|
+
}));
|
|
428
|
+
}), hn = /* @__PURE__ */ s.memo(gn, (t, e) => (
|
|
429
|
+
// https://github.com/ant-design/ant-design/issues/32544
|
|
430
|
+
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
|
|
431
|
+
e.tabMoving
|
|
432
|
+
)), vn = (t) => {
|
|
433
|
+
const {
|
|
434
|
+
prefixCls: e,
|
|
435
|
+
id: n,
|
|
436
|
+
active: o,
|
|
437
|
+
focus: r,
|
|
438
|
+
tab: {
|
|
439
|
+
key: i,
|
|
440
|
+
label: a,
|
|
441
|
+
disabled: l,
|
|
442
|
+
closeIcon: b,
|
|
443
|
+
icon: c
|
|
444
|
+
},
|
|
445
|
+
closable: v,
|
|
446
|
+
renderWrapper: E,
|
|
447
|
+
removeAriaLabel: g,
|
|
448
|
+
editable: C,
|
|
449
|
+
onClick: z,
|
|
450
|
+
onFocus: x,
|
|
451
|
+
onBlur: P,
|
|
452
|
+
onKeyDown: y,
|
|
453
|
+
onMouseDown: d,
|
|
454
|
+
onMouseUp: u,
|
|
455
|
+
styles: f,
|
|
456
|
+
classNames: h,
|
|
457
|
+
tabCount: T,
|
|
458
|
+
currentPosition: F
|
|
459
|
+
} = t, O = `${e}-tab`, L = Ge(v, b, C, l);
|
|
460
|
+
function H(R) {
|
|
461
|
+
l || z(R);
|
|
462
|
+
}
|
|
463
|
+
function Y(R) {
|
|
464
|
+
R.preventDefault(), R.stopPropagation(), C.onEdit("remove", {
|
|
465
|
+
key: i,
|
|
466
|
+
event: R
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
const $ = s.useMemo(() => c && typeof a == "string" ? /* @__PURE__ */ s.createElement("span", null, a) : a, [a, c]), D = s.useRef(null);
|
|
470
|
+
s.useEffect(() => {
|
|
471
|
+
r && D.current && D.current.focus();
|
|
472
|
+
}, [r]);
|
|
473
|
+
const q = /* @__PURE__ */ s.createElement("div", {
|
|
474
|
+
key: i,
|
|
475
|
+
"data-node-key": gt(i),
|
|
476
|
+
className: V(O, h == null ? void 0 : h.item, {
|
|
477
|
+
[`${O}-with-remove`]: L,
|
|
478
|
+
[`${O}-active`]: o,
|
|
479
|
+
[`${O}-disabled`]: l,
|
|
480
|
+
[`${O}-focus`]: r
|
|
481
|
+
}),
|
|
482
|
+
style: f == null ? void 0 : f.item,
|
|
483
|
+
onClick: H
|
|
484
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
485
|
+
ref: D,
|
|
486
|
+
role: "tab",
|
|
487
|
+
"aria-selected": o,
|
|
488
|
+
id: n && `${n}-tab-${i}`,
|
|
489
|
+
className: `${O}-btn`,
|
|
490
|
+
"aria-controls": n && `${n}-panel-${i}`,
|
|
491
|
+
"aria-disabled": l,
|
|
492
|
+
tabIndex: l ? null : o ? 0 : -1,
|
|
493
|
+
onClick: (R) => {
|
|
494
|
+
R.stopPropagation(), H(R);
|
|
495
|
+
},
|
|
496
|
+
onKeyDown: y,
|
|
497
|
+
onMouseDown: d,
|
|
498
|
+
onMouseUp: u,
|
|
499
|
+
onFocus: x,
|
|
500
|
+
onBlur: P
|
|
501
|
+
}, r && /* @__PURE__ */ s.createElement("div", {
|
|
502
|
+
"aria-live": "polite",
|
|
503
|
+
style: {
|
|
504
|
+
width: 0,
|
|
505
|
+
height: 0,
|
|
506
|
+
position: "absolute",
|
|
507
|
+
overflow: "hidden",
|
|
508
|
+
opacity: 0
|
|
509
|
+
}
|
|
510
|
+
}, `Tab ${F} of ${T}`), c && /* @__PURE__ */ s.createElement("span", {
|
|
511
|
+
className: `${O}-icon`
|
|
512
|
+
}, c), a && $), L && /* @__PURE__ */ s.createElement("button", {
|
|
513
|
+
type: "button",
|
|
514
|
+
"aria-label": g || "remove",
|
|
515
|
+
tabIndex: o ? 0 : -1,
|
|
516
|
+
className: V(`${O}-remove`, h == null ? void 0 : h.remove),
|
|
517
|
+
style: f == null ? void 0 : f.remove,
|
|
518
|
+
onClick: (R) => {
|
|
519
|
+
R.stopPropagation(), Y(R);
|
|
520
|
+
}
|
|
521
|
+
}, b || C.removeIcon || "×"));
|
|
522
|
+
return E ? E(q) : q;
|
|
523
|
+
};
|
|
524
|
+
function Be() {
|
|
525
|
+
return Be = Object.assign ? Object.assign.bind() : function(t) {
|
|
526
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
527
|
+
var n = arguments[e];
|
|
528
|
+
for (var o in n)
|
|
529
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
530
|
+
}
|
|
531
|
+
return t;
|
|
532
|
+
}, Be.apply(this, arguments);
|
|
533
|
+
}
|
|
534
|
+
const $n = (t, e) => {
|
|
535
|
+
const {
|
|
536
|
+
offsetWidth: n,
|
|
537
|
+
offsetHeight: o,
|
|
538
|
+
offsetTop: r,
|
|
539
|
+
offsetLeft: i
|
|
540
|
+
} = t, {
|
|
541
|
+
width: a,
|
|
542
|
+
height: l,
|
|
543
|
+
left: b,
|
|
544
|
+
top: c
|
|
545
|
+
} = t.getBoundingClientRect();
|
|
546
|
+
return Math.abs(a - n) < 1 ? [a, l, b - e.left, c - e.top] : [n, o, i, r];
|
|
547
|
+
}, he = (t) => {
|
|
548
|
+
const {
|
|
549
|
+
offsetWidth: e = 0,
|
|
550
|
+
offsetHeight: n = 0
|
|
551
|
+
} = t.current || {};
|
|
552
|
+
if (t.current) {
|
|
553
|
+
const {
|
|
554
|
+
width: o,
|
|
555
|
+
height: r
|
|
556
|
+
} = t.current.getBoundingClientRect();
|
|
557
|
+
if (Math.abs(o - e) < 1)
|
|
558
|
+
return [o, r];
|
|
559
|
+
}
|
|
560
|
+
return [e, n];
|
|
561
|
+
}, Pe = (t, e) => t[e ? 0 : 1], ct = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
562
|
+
const {
|
|
563
|
+
className: n,
|
|
564
|
+
style: o,
|
|
565
|
+
id: r,
|
|
566
|
+
animated: i,
|
|
567
|
+
activeKey: a,
|
|
568
|
+
rtl: l,
|
|
569
|
+
extra: b,
|
|
570
|
+
editable: c,
|
|
571
|
+
locale: v,
|
|
572
|
+
tabPosition: E,
|
|
573
|
+
tabBarGutter: g,
|
|
574
|
+
children: C,
|
|
575
|
+
onTabClick: z,
|
|
576
|
+
onTabScroll: x,
|
|
577
|
+
indicator: P,
|
|
578
|
+
classNames: y,
|
|
579
|
+
styles: d
|
|
580
|
+
} = t, {
|
|
581
|
+
prefixCls: u,
|
|
582
|
+
tabs: f
|
|
583
|
+
} = s.useContext(ke), h = W(null), T = W(null), F = W(null), O = W(null), L = W(null), H = W(null), Y = W(null), $ = E === "top" || E === "bottom", [D, q] = at(0, (p, m) => {
|
|
584
|
+
$ && x && x({
|
|
585
|
+
direction: p > m ? "left" : "right"
|
|
586
|
+
});
|
|
587
|
+
}), [R, re] = at(0, (p, m) => {
|
|
588
|
+
!$ && x && x({
|
|
589
|
+
direction: p > m ? "top" : "bottom"
|
|
590
|
+
});
|
|
591
|
+
}), [Q, de] = B([0, 0]), [w, X] = B([0, 0]), [ie, I] = B([0, 0]), [A, j] = B([0, 0]), [J, k] = fn(/* @__PURE__ */ new Map()), G = dn(f, J, w[0]), M = Pe(Q, $), K = Pe(w, $), se = Pe(ie, $), ve = Pe(A, $), _e = Math.floor(M) < Math.floor(K + se), Z = _e ? M - ve : M - se, Le = `${u}-nav-operations-hidden`;
|
|
592
|
+
let ee = 0, te = 0;
|
|
593
|
+
$ && l ? (ee = 0, te = Math.max(0, K - Z)) : (ee = Math.min(0, Z - K), te = 0);
|
|
594
|
+
function fe(p) {
|
|
595
|
+
return p < ee ? ee : p > te ? te : p;
|
|
596
|
+
}
|
|
597
|
+
const me = W(null), [pe, $e] = B();
|
|
598
|
+
function be() {
|
|
599
|
+
$e(Date.now());
|
|
600
|
+
}
|
|
601
|
+
function U() {
|
|
602
|
+
me.current && clearTimeout(me.current);
|
|
603
|
+
}
|
|
604
|
+
pn(O, (p, m) => {
|
|
605
|
+
function S(N, oe) {
|
|
606
|
+
N((ce) => fe(ce + oe));
|
|
607
|
+
}
|
|
608
|
+
return _e ? ($ ? S(q, p) : S(re, m), U(), be(), !0) : !1;
|
|
609
|
+
}), ae(() => (U(), pe && (me.current = setTimeout(() => {
|
|
610
|
+
$e(0);
|
|
611
|
+
}, 100)), U), [pe]);
|
|
612
|
+
const [ne, ye] = mn(
|
|
613
|
+
G,
|
|
614
|
+
// Container
|
|
615
|
+
Z,
|
|
616
|
+
// Transform
|
|
617
|
+
$ ? D : R,
|
|
618
|
+
// Tabs
|
|
619
|
+
K,
|
|
620
|
+
// Add
|
|
621
|
+
se,
|
|
622
|
+
// Operation
|
|
623
|
+
ve,
|
|
624
|
+
{
|
|
625
|
+
...t,
|
|
626
|
+
tabs: f
|
|
627
|
+
}
|
|
628
|
+
), We = Ot((p = a) => {
|
|
629
|
+
const m = G.get(p) || {
|
|
630
|
+
width: 0,
|
|
631
|
+
height: 0,
|
|
632
|
+
left: 0,
|
|
633
|
+
right: 0,
|
|
634
|
+
top: 0
|
|
635
|
+
};
|
|
636
|
+
if ($) {
|
|
637
|
+
let S = D;
|
|
638
|
+
l ? m.right < D ? S = m.right : m.right + m.width > D + Z && (S = m.right + m.width - Z) : m.left < -D ? S = -m.left : m.left + m.width > -D + Z && (S = -(m.left + m.width - Z)), re(0), q(fe(S));
|
|
639
|
+
} else {
|
|
640
|
+
let S = R;
|
|
641
|
+
m.top < -R ? S = -m.top : m.top + m.height > -R + Z && (S = -(m.top + m.height - Z)), q(0), re(fe(S));
|
|
642
|
+
}
|
|
643
|
+
}), [Ee, we] = B(), [xt, Ve] = B(!1), le = f.filter((p) => !p.disabled).map((p) => p.key), ge = (p) => {
|
|
644
|
+
const m = le.indexOf(Ee || a), S = le.length, N = (m + p + S) % S, oe = le[N];
|
|
645
|
+
we(oe);
|
|
646
|
+
}, Xe = (p, m) => {
|
|
647
|
+
const S = le.indexOf(p), N = f.find((ce) => ce.key === p);
|
|
648
|
+
Ge(N == null ? void 0 : N.closable, N == null ? void 0 : N.closeIcon, c, N == null ? void 0 : N.disabled) && (m.preventDefault(), m.stopPropagation(), c.onEdit("remove", {
|
|
649
|
+
key: p,
|
|
650
|
+
event: m
|
|
651
|
+
}), S === le.length - 1 ? ge(-1) : ge(1));
|
|
652
|
+
}, _t = (p, m) => {
|
|
653
|
+
Ve(!0), m.button === 1 && Xe(p, m);
|
|
654
|
+
}, Et = (p) => {
|
|
655
|
+
const {
|
|
656
|
+
code: m
|
|
657
|
+
} = p, S = l && $, N = le[0], oe = le[le.length - 1];
|
|
658
|
+
switch (m) {
|
|
659
|
+
// LEFT
|
|
660
|
+
case "ArrowLeft": {
|
|
661
|
+
$ && ge(S ? 1 : -1);
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
// RIGHT
|
|
665
|
+
case "ArrowRight": {
|
|
666
|
+
$ && ge(S ? -1 : 1);
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
// UP
|
|
670
|
+
case "ArrowUp": {
|
|
671
|
+
p.preventDefault(), $ || ge(-1);
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
// DOWN
|
|
675
|
+
case "ArrowDown": {
|
|
676
|
+
p.preventDefault(), $ || ge(1);
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
// HOME
|
|
680
|
+
case "Home": {
|
|
681
|
+
p.preventDefault(), we(N);
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
684
|
+
// END
|
|
685
|
+
case "End": {
|
|
686
|
+
p.preventDefault(), we(oe);
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
// Enter & Space
|
|
690
|
+
case "Enter":
|
|
691
|
+
case "Space": {
|
|
692
|
+
p.preventDefault(), z(Ee ?? a, p);
|
|
693
|
+
break;
|
|
694
|
+
}
|
|
695
|
+
// Backspace
|
|
696
|
+
case "Backspace":
|
|
697
|
+
case "Delete": {
|
|
698
|
+
Xe(Ee, p);
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}, Ce = {};
|
|
703
|
+
$ ? Ce.marginInlineStart = g : Ce.marginTop = g;
|
|
704
|
+
const Ke = f.map((p, m) => {
|
|
705
|
+
const {
|
|
706
|
+
key: S
|
|
707
|
+
} = p;
|
|
708
|
+
return /* @__PURE__ */ s.createElement(vn, {
|
|
709
|
+
id: r,
|
|
710
|
+
prefixCls: u,
|
|
711
|
+
key: S,
|
|
712
|
+
tab: p,
|
|
713
|
+
classNames: {
|
|
714
|
+
item: y == null ? void 0 : y.item,
|
|
715
|
+
remove: y == null ? void 0 : y.remove
|
|
716
|
+
},
|
|
717
|
+
styles: {
|
|
718
|
+
/* first node should not have margin left */
|
|
719
|
+
item: m === 0 ? d == null ? void 0 : d.item : {
|
|
720
|
+
...Ce,
|
|
721
|
+
...d == null ? void 0 : d.item
|
|
722
|
+
},
|
|
723
|
+
remove: d == null ? void 0 : d.remove
|
|
724
|
+
},
|
|
725
|
+
closable: p.closable,
|
|
726
|
+
editable: c,
|
|
727
|
+
active: S === a,
|
|
728
|
+
focus: S === Ee,
|
|
729
|
+
renderWrapper: C,
|
|
730
|
+
removeAriaLabel: v == null ? void 0 : v.removeAriaLabel,
|
|
731
|
+
tabCount: le.length,
|
|
732
|
+
currentPosition: m + 1,
|
|
733
|
+
onClick: (N) => {
|
|
734
|
+
z(S, N);
|
|
735
|
+
},
|
|
736
|
+
onKeyDown: Et,
|
|
737
|
+
onFocus: () => {
|
|
738
|
+
xt || we(S), We(S), be(), O.current && (l || (O.current.scrollLeft = 0), O.current.scrollTop = 0);
|
|
739
|
+
},
|
|
740
|
+
onBlur: () => {
|
|
741
|
+
we(void 0);
|
|
742
|
+
},
|
|
743
|
+
onMouseDown: (N) => _t(S, N),
|
|
744
|
+
onMouseUp: () => {
|
|
745
|
+
Ve(!1);
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
}), je = () => k(() => {
|
|
749
|
+
var S;
|
|
750
|
+
const p = /* @__PURE__ */ new Map(), m = (S = L.current) == null ? void 0 : S.getBoundingClientRect();
|
|
751
|
+
return f.forEach(({
|
|
752
|
+
key: N
|
|
753
|
+
}) => {
|
|
754
|
+
var ce;
|
|
755
|
+
const oe = (ce = L.current) == null ? void 0 : ce.querySelector(`[data-node-key="${gt(N)}"]`);
|
|
756
|
+
if (oe) {
|
|
757
|
+
const [Qe, Rt, It, Lt] = $n(oe, m);
|
|
758
|
+
p.set(N, {
|
|
759
|
+
width: Qe,
|
|
760
|
+
height: Rt,
|
|
761
|
+
left: It,
|
|
762
|
+
top: Lt
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
}), p;
|
|
766
|
+
});
|
|
767
|
+
ae(() => {
|
|
768
|
+
je();
|
|
769
|
+
}, [f.map((p) => p.key).join("_")]);
|
|
770
|
+
const Te = bt(() => {
|
|
771
|
+
const p = he(h), m = he(T), S = he(F);
|
|
772
|
+
de([p[0] - m[0] - S[0], p[1] - m[1] - S[1]]);
|
|
773
|
+
const N = he(Y);
|
|
774
|
+
I(N);
|
|
775
|
+
const oe = he(H);
|
|
776
|
+
j(oe);
|
|
777
|
+
const ce = he(L);
|
|
778
|
+
X([ce[0] - N[0], ce[1] - N[1]]), je();
|
|
779
|
+
}), Ct = f.slice(0, ne), Tt = f.slice(ye + 1), Ue = [...Ct, ...Tt], Fe = G.get(a), {
|
|
780
|
+
style: Pt
|
|
781
|
+
} = cn({
|
|
782
|
+
activeTabOffset: Fe,
|
|
783
|
+
horizontal: $,
|
|
784
|
+
indicator: P,
|
|
785
|
+
rtl: l
|
|
786
|
+
});
|
|
787
|
+
ae(() => {
|
|
788
|
+
We();
|
|
789
|
+
}, [a, ee, te, lt(Fe), lt(G), $]), ae(() => {
|
|
790
|
+
Te();
|
|
791
|
+
}, [l]);
|
|
792
|
+
const Ye = !!Ue.length, Se = `${u}-nav-wrap`;
|
|
793
|
+
let Me, Ne, qe, Je;
|
|
794
|
+
return $ ? l ? (Ne = D > 0, Me = D !== te) : (Me = D < 0, Ne = D !== ee) : (qe = R < 0, Je = R !== ee), /* @__PURE__ */ s.createElement(ze, {
|
|
795
|
+
onResize: Te
|
|
796
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
797
|
+
ref: Ht(e, h),
|
|
798
|
+
role: "tablist",
|
|
799
|
+
"aria-orientation": $ ? "horizontal" : "vertical",
|
|
800
|
+
className: V(`${u}-nav`, n, y == null ? void 0 : y.header),
|
|
801
|
+
style: {
|
|
802
|
+
...d == null ? void 0 : d.header,
|
|
803
|
+
...o
|
|
804
|
+
},
|
|
805
|
+
onKeyDown: () => {
|
|
806
|
+
be();
|
|
807
|
+
}
|
|
808
|
+
}, /* @__PURE__ */ s.createElement(He, {
|
|
809
|
+
ref: T,
|
|
810
|
+
position: "left",
|
|
811
|
+
extra: b,
|
|
812
|
+
prefixCls: u
|
|
813
|
+
}), /* @__PURE__ */ s.createElement(ze, {
|
|
814
|
+
onResize: Te
|
|
815
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
816
|
+
className: V(Se, {
|
|
817
|
+
[`${Se}-ping-left`]: Me,
|
|
818
|
+
[`${Se}-ping-right`]: Ne,
|
|
819
|
+
[`${Se}-ping-top`]: qe,
|
|
820
|
+
[`${Se}-ping-bottom`]: Je
|
|
821
|
+
}),
|
|
822
|
+
ref: O
|
|
823
|
+
}, /* @__PURE__ */ s.createElement(ze, {
|
|
824
|
+
onResize: Te
|
|
825
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
826
|
+
ref: L,
|
|
827
|
+
className: `${u}-nav-list`,
|
|
828
|
+
style: {
|
|
829
|
+
transform: `translate(${D}px, ${R}px)`,
|
|
830
|
+
transition: pe ? "none" : void 0
|
|
831
|
+
}
|
|
832
|
+
}, Ke, /* @__PURE__ */ s.createElement(ht, {
|
|
833
|
+
ref: Y,
|
|
834
|
+
prefixCls: u,
|
|
835
|
+
locale: v,
|
|
836
|
+
editable: c,
|
|
837
|
+
style: {
|
|
838
|
+
...Ke.length === 0 ? void 0 : Ce,
|
|
839
|
+
visibility: Ye ? "hidden" : null
|
|
840
|
+
}
|
|
841
|
+
}), /* @__PURE__ */ s.createElement("div", {
|
|
842
|
+
className: V(`${u}-ink-bar`, y == null ? void 0 : y.indicator, {
|
|
843
|
+
[`${u}-ink-bar-animated`]: i.inkBar
|
|
844
|
+
}),
|
|
845
|
+
style: {
|
|
846
|
+
...Pt,
|
|
847
|
+
...d == null ? void 0 : d.indicator
|
|
848
|
+
}
|
|
849
|
+
}))))), /* @__PURE__ */ s.createElement(hn, Be({}, t, {
|
|
850
|
+
removeAriaLabel: v == null ? void 0 : v.removeAriaLabel,
|
|
851
|
+
ref: H,
|
|
852
|
+
prefixCls: u,
|
|
853
|
+
tabs: Ue,
|
|
854
|
+
className: !Ye && Le,
|
|
855
|
+
popupStyle: d == null ? void 0 : d.popup,
|
|
856
|
+
tabMoving: !!pe
|
|
857
|
+
})), /* @__PURE__ */ s.createElement(He, {
|
|
858
|
+
ref: F,
|
|
859
|
+
position: "right",
|
|
860
|
+
extra: b,
|
|
861
|
+
prefixCls: u
|
|
862
|
+
})));
|
|
863
|
+
}), vt = ({
|
|
864
|
+
renderTabBar: t,
|
|
865
|
+
...e
|
|
866
|
+
}) => t ? t(e, ct) : /* @__PURE__ */ s.createElement(ct, e);
|
|
867
|
+
process.env.NODE_ENV !== "production" && (vt.displayName = "TabNavListWrapper");
|
|
868
|
+
const $t = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
869
|
+
const {
|
|
870
|
+
prefixCls: n,
|
|
871
|
+
className: o,
|
|
872
|
+
style: r,
|
|
873
|
+
id: i,
|
|
874
|
+
active: a,
|
|
875
|
+
tabKey: l,
|
|
876
|
+
children: b
|
|
877
|
+
} = t, c = s.Children.count(b) > 0;
|
|
878
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
879
|
+
id: i && `${i}-panel-${l}`,
|
|
880
|
+
role: "tabpanel",
|
|
881
|
+
tabIndex: a && c ? 0 : -1,
|
|
882
|
+
"aria-labelledby": i && `${i}-tab-${l}`,
|
|
883
|
+
"aria-hidden": !a,
|
|
884
|
+
style: r,
|
|
885
|
+
className: V(n, a && `${n}-active`, o),
|
|
886
|
+
ref: e
|
|
887
|
+
}, b);
|
|
888
|
+
});
|
|
889
|
+
process.env.NODE_ENV !== "production" && ($t.displayName = "TabPane");
|
|
890
|
+
function Ie() {
|
|
891
|
+
return Ie = Object.assign ? Object.assign.bind() : function(t) {
|
|
892
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
893
|
+
var n = arguments[e];
|
|
894
|
+
for (var o in n)
|
|
895
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
896
|
+
}
|
|
897
|
+
return t;
|
|
898
|
+
}, Ie.apply(this, arguments);
|
|
899
|
+
}
|
|
900
|
+
const yn = (t) => {
|
|
901
|
+
const {
|
|
902
|
+
id: e,
|
|
903
|
+
activeKey: n,
|
|
904
|
+
animated: o,
|
|
905
|
+
tabPosition: r,
|
|
906
|
+
destroyOnHidden: i,
|
|
907
|
+
bodyStyle: a,
|
|
908
|
+
bodyClassName: l,
|
|
909
|
+
contentStyle: b,
|
|
910
|
+
contentClassName: c
|
|
911
|
+
} = t, {
|
|
912
|
+
prefixCls: v,
|
|
913
|
+
tabs: E
|
|
914
|
+
} = s.useContext(ke), g = o.tabPane, C = `${v}-body`, z = `${v}-content`;
|
|
915
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
916
|
+
className: V(`${C}-holder`)
|
|
917
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
918
|
+
className: V(C, `${C}-${r}`, {
|
|
919
|
+
[`${C}-animated`]: g
|
|
920
|
+
}, l),
|
|
921
|
+
style: a
|
|
922
|
+
}, E.map((x) => {
|
|
923
|
+
const {
|
|
924
|
+
key: P,
|
|
925
|
+
forceRender: y,
|
|
926
|
+
style: d,
|
|
927
|
+
className: u,
|
|
928
|
+
destroyOnHidden: f,
|
|
929
|
+
...h
|
|
930
|
+
} = x, T = P === n;
|
|
931
|
+
return /* @__PURE__ */ s.createElement(At, Ie({
|
|
932
|
+
key: P,
|
|
933
|
+
visible: T,
|
|
934
|
+
forceRender: y,
|
|
935
|
+
removeOnLeave: !!(i ?? f),
|
|
936
|
+
leavedClassName: `${z}-hidden`
|
|
937
|
+
}, o.tabPaneMotion), ({
|
|
938
|
+
style: F,
|
|
939
|
+
className: O
|
|
940
|
+
}, L) => /* @__PURE__ */ s.createElement($t, Ie({}, h, {
|
|
941
|
+
prefixCls: z,
|
|
942
|
+
id: e,
|
|
943
|
+
tabKey: P,
|
|
944
|
+
animated: g,
|
|
945
|
+
active: T,
|
|
946
|
+
style: {
|
|
947
|
+
...b,
|
|
948
|
+
...d,
|
|
949
|
+
...F
|
|
950
|
+
},
|
|
951
|
+
className: V(c, u, O),
|
|
952
|
+
ref: L
|
|
953
|
+
})));
|
|
954
|
+
})));
|
|
955
|
+
};
|
|
956
|
+
function wn(t = {
|
|
957
|
+
inkBar: !0,
|
|
958
|
+
tabPane: !1
|
|
959
|
+
}) {
|
|
960
|
+
let e;
|
|
961
|
+
return t === !1 ? e = {
|
|
962
|
+
inkBar: !1,
|
|
963
|
+
tabPane: !1
|
|
964
|
+
} : t === !0 ? e = {
|
|
965
|
+
inkBar: !0,
|
|
966
|
+
tabPane: !1
|
|
967
|
+
} : e = {
|
|
968
|
+
inkBar: !0,
|
|
969
|
+
...typeof t == "object" ? t : {}
|
|
970
|
+
}, e.tabPaneMotion && e.tabPane === void 0 && (e.tabPane = !0), !e.tabPaneMotion && e.tabPane && (process.env.NODE_ENV !== "production" && Bt(!1, "`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."), e.tabPane = !1), e;
|
|
971
|
+
}
|
|
972
|
+
function xe() {
|
|
973
|
+
return xe = Object.assign ? Object.assign.bind() : function(t) {
|
|
974
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
975
|
+
var n = arguments[e];
|
|
976
|
+
for (var o in n)
|
|
977
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
978
|
+
}
|
|
979
|
+
return t;
|
|
980
|
+
}, xe.apply(this, arguments);
|
|
981
|
+
}
|
|
982
|
+
let dt = 0;
|
|
983
|
+
const yt = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
984
|
+
var G;
|
|
985
|
+
const {
|
|
986
|
+
id: n,
|
|
987
|
+
prefixCls: o = "rc-tabs",
|
|
988
|
+
className: r,
|
|
989
|
+
items: i,
|
|
990
|
+
direction: a,
|
|
991
|
+
activeKey: l,
|
|
992
|
+
defaultActiveKey: b,
|
|
993
|
+
editable: c,
|
|
994
|
+
animated: v,
|
|
995
|
+
tabPosition: E = "top",
|
|
996
|
+
tabBarGutter: g,
|
|
997
|
+
tabBarStyle: C,
|
|
998
|
+
tabBarExtraContent: z,
|
|
999
|
+
locale: x,
|
|
1000
|
+
more: P,
|
|
1001
|
+
destroyOnHidden: y,
|
|
1002
|
+
renderTabBar: d,
|
|
1003
|
+
onChange: u,
|
|
1004
|
+
onTabClick: f,
|
|
1005
|
+
onTabScroll: h,
|
|
1006
|
+
getPopupContainer: T,
|
|
1007
|
+
popupClassName: F,
|
|
1008
|
+
indicator: O,
|
|
1009
|
+
classNames: L,
|
|
1010
|
+
styles: H,
|
|
1011
|
+
...Y
|
|
1012
|
+
} = t, $ = s.useMemo(() => (i || []).filter((M) => M && typeof M == "object" && "key" in M), [i]), D = a === "rtl", q = wn(v), [R, re] = B(!1);
|
|
1013
|
+
ae(() => {
|
|
1014
|
+
re(ln());
|
|
1015
|
+
}, []);
|
|
1016
|
+
const [Q, de] = et(b ?? ((G = $[0]) == null ? void 0 : G.key), l), [w, X] = B(() => $.findIndex((M) => M.key === Q));
|
|
1017
|
+
ae(() => {
|
|
1018
|
+
var K;
|
|
1019
|
+
let M = $.findIndex((se) => se.key === Q);
|
|
1020
|
+
M === -1 && (M = Math.max(0, Math.min(w, $.length - 1)), de((K = $[M]) == null ? void 0 : K.key)), X(M);
|
|
1021
|
+
}, [$.map((M) => M.key).join("_"), Q, w]);
|
|
1022
|
+
const [ie, I] = et(null, n);
|
|
1023
|
+
ae(() => {
|
|
1024
|
+
n || (I(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : dt}`), dt += 1);
|
|
1025
|
+
}, []);
|
|
1026
|
+
function A(M, K) {
|
|
1027
|
+
f == null || f(M, K);
|
|
1028
|
+
const se = M !== Q;
|
|
1029
|
+
de(M), se && (u == null || u(M));
|
|
1030
|
+
}
|
|
1031
|
+
const j = {
|
|
1032
|
+
id: ie,
|
|
1033
|
+
activeKey: Q,
|
|
1034
|
+
animated: q,
|
|
1035
|
+
tabPosition: E,
|
|
1036
|
+
rtl: D,
|
|
1037
|
+
mobile: R
|
|
1038
|
+
}, J = {
|
|
1039
|
+
...j,
|
|
1040
|
+
editable: c,
|
|
1041
|
+
locale: x,
|
|
1042
|
+
more: P,
|
|
1043
|
+
tabBarGutter: g,
|
|
1044
|
+
onTabClick: A,
|
|
1045
|
+
onTabScroll: h,
|
|
1046
|
+
extra: z,
|
|
1047
|
+
style: C,
|
|
1048
|
+
getPopupContainer: T,
|
|
1049
|
+
popupClassName: V(F, L == null ? void 0 : L.popup),
|
|
1050
|
+
indicator: O,
|
|
1051
|
+
styles: H,
|
|
1052
|
+
classNames: L
|
|
1053
|
+
}, k = s.useMemo(() => ({
|
|
1054
|
+
tabs: $,
|
|
1055
|
+
prefixCls: o
|
|
1056
|
+
}), [$, o]);
|
|
1057
|
+
return /* @__PURE__ */ s.createElement(ke.Provider, {
|
|
1058
|
+
value: k
|
|
1059
|
+
}, /* @__PURE__ */ s.createElement("div", xe({
|
|
1060
|
+
ref: e,
|
|
1061
|
+
id: n,
|
|
1062
|
+
className: V(o, `${o}-${E}`, {
|
|
1063
|
+
[`${o}-mobile`]: R,
|
|
1064
|
+
[`${o}-editable`]: c,
|
|
1065
|
+
[`${o}-rtl`]: D
|
|
1066
|
+
}, r)
|
|
1067
|
+
}, Y), /* @__PURE__ */ s.createElement(vt, xe({}, J, {
|
|
1068
|
+
renderTabBar: d
|
|
1069
|
+
})), /* @__PURE__ */ s.createElement(yn, xe({
|
|
1070
|
+
destroyOnHidden: y
|
|
1071
|
+
}, j, {
|
|
1072
|
+
bodyStyle: H == null ? void 0 : H.body,
|
|
1073
|
+
bodyClassName: L == null ? void 0 : L.body,
|
|
1074
|
+
contentStyle: H == null ? void 0 : H.content,
|
|
1075
|
+
contentClassName: L == null ? void 0 : L.content,
|
|
1076
|
+
animated: q
|
|
1077
|
+
}))));
|
|
1078
|
+
});
|
|
1079
|
+
process.env.NODE_ENV !== "production" && (yt.displayName = "Tabs");
|
|
1080
|
+
const Sn = {
|
|
1081
|
+
motionAppear: !1,
|
|
1082
|
+
motionEnter: !0,
|
|
1083
|
+
motionLeave: !0
|
|
1084
|
+
};
|
|
1085
|
+
function xn(t, e = {
|
|
1086
|
+
inkBar: !0,
|
|
1087
|
+
tabPane: !1
|
|
1088
|
+
}) {
|
|
1089
|
+
let n;
|
|
1090
|
+
return e === !1 ? n = {
|
|
1091
|
+
inkBar: !1,
|
|
1092
|
+
tabPane: !1
|
|
1093
|
+
} : e === !0 ? n = {
|
|
1094
|
+
inkBar: !0,
|
|
1095
|
+
tabPane: !0
|
|
1096
|
+
} : n = {
|
|
1097
|
+
inkBar: !0,
|
|
1098
|
+
...kt(e) ? e : {}
|
|
1099
|
+
}, n.tabPane && (n.tabPaneMotion = {
|
|
1100
|
+
...Sn,
|
|
1101
|
+
motionName: Gt(t, "switch")
|
|
1102
|
+
}), n;
|
|
1103
|
+
}
|
|
1104
|
+
function _n(t) {
|
|
1105
|
+
return t.filter((e) => e);
|
|
1106
|
+
}
|
|
1107
|
+
function En(t, e) {
|
|
1108
|
+
if (process.env.NODE_ENV !== "production" && pt("Tabs").deprecated(!e, "Tabs.TabPane", "items"), t)
|
|
1109
|
+
return t.map((o) => ({
|
|
1110
|
+
...o,
|
|
1111
|
+
destroyOnHidden: o.destroyOnHidden ?? o.destroyInactiveTabPane
|
|
1112
|
+
}));
|
|
1113
|
+
const n = Wt(e).map((o) => {
|
|
1114
|
+
if (/* @__PURE__ */ s.isValidElement(o)) {
|
|
1115
|
+
const {
|
|
1116
|
+
key: r,
|
|
1117
|
+
props: i
|
|
1118
|
+
} = o, {
|
|
1119
|
+
tab: a,
|
|
1120
|
+
...l
|
|
1121
|
+
} = i || {};
|
|
1122
|
+
return {
|
|
1123
|
+
key: String(r),
|
|
1124
|
+
...l,
|
|
1125
|
+
label: a
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
return null;
|
|
1129
|
+
});
|
|
1130
|
+
return _n(n);
|
|
1131
|
+
}
|
|
1132
|
+
const Cn = (t) => {
|
|
1133
|
+
const {
|
|
1134
|
+
componentCls: e,
|
|
1135
|
+
motionDurationSlow: n
|
|
1136
|
+
} = t;
|
|
1137
|
+
return [
|
|
1138
|
+
{
|
|
1139
|
+
[e]: {
|
|
1140
|
+
[`${e}-switch`]: {
|
|
1141
|
+
"&-appear, &-enter": {
|
|
1142
|
+
transition: "none",
|
|
1143
|
+
"&-start": {
|
|
1144
|
+
opacity: 0
|
|
1145
|
+
},
|
|
1146
|
+
"&-active": {
|
|
1147
|
+
opacity: 1,
|
|
1148
|
+
transition: `opacity ${n}`
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"&-leave": {
|
|
1152
|
+
position: "absolute",
|
|
1153
|
+
transition: "none",
|
|
1154
|
+
inset: 0,
|
|
1155
|
+
"&-start": {
|
|
1156
|
+
opacity: 1
|
|
1157
|
+
},
|
|
1158
|
+
"&-active": {
|
|
1159
|
+
opacity: 0,
|
|
1160
|
+
transition: `opacity ${n}`
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
// Follow code may reuse in other components
|
|
1167
|
+
[nt(t, "slide-up"), nt(t, "slide-down")]
|
|
1168
|
+
];
|
|
1169
|
+
}, Tn = (t) => {
|
|
1170
|
+
const {
|
|
1171
|
+
componentCls: e,
|
|
1172
|
+
tabsCardPadding: n,
|
|
1173
|
+
cardBg: o,
|
|
1174
|
+
cardGutter: r,
|
|
1175
|
+
colorBorderSecondary: i,
|
|
1176
|
+
itemSelectedColor: a
|
|
1177
|
+
} = t;
|
|
1178
|
+
return {
|
|
1179
|
+
[`${e}-card`]: {
|
|
1180
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1181
|
+
[`${e}-tab`]: {
|
|
1182
|
+
margin: 0,
|
|
1183
|
+
padding: n,
|
|
1184
|
+
background: o,
|
|
1185
|
+
border: `${_(t.lineWidth)} ${t.lineType} ${i}`,
|
|
1186
|
+
transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
|
|
1187
|
+
},
|
|
1188
|
+
[`${e}-tab-active`]: {
|
|
1189
|
+
color: a,
|
|
1190
|
+
background: t.colorBgContainer
|
|
1191
|
+
},
|
|
1192
|
+
[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]: mt(t, -3),
|
|
1193
|
+
[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]: {
|
|
1194
|
+
outline: "none"
|
|
1195
|
+
},
|
|
1196
|
+
[`${e}-ink-bar`]: {
|
|
1197
|
+
visibility: "hidden"
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
// ========================== Top & Bottom ==========================
|
|
1201
|
+
[`&${e}-top, &${e}-bottom`]: {
|
|
1202
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1203
|
+
[`${e}-tab + ${e}-tab`]: {
|
|
1204
|
+
marginLeft: {
|
|
1205
|
+
_skip_check_: !0,
|
|
1206
|
+
value: _(r)
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
[`&${e}-top`]: {
|
|
1212
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1213
|
+
[`${e}-tab`]: {
|
|
1214
|
+
borderRadius: `${_(t.borderRadiusLG)} ${_(t.borderRadiusLG)} 0 0`
|
|
1215
|
+
},
|
|
1216
|
+
[`${e}-tab-active`]: {
|
|
1217
|
+
borderBottomColor: t.colorBgContainer
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
[`&${e}-bottom`]: {
|
|
1222
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1223
|
+
[`${e}-tab`]: {
|
|
1224
|
+
borderRadius: `0 0 ${_(t.borderRadiusLG)} ${_(t.borderRadiusLG)}`
|
|
1225
|
+
},
|
|
1226
|
+
[`${e}-tab-active`]: {
|
|
1227
|
+
borderTopColor: t.colorBgContainer
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
// ========================== Left & Right ==========================
|
|
1232
|
+
[`&${e}-left, &${e}-right`]: {
|
|
1233
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1234
|
+
[`${e}-tab + ${e}-tab`]: {
|
|
1235
|
+
marginTop: _(r)
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
[`&${e}-left`]: {
|
|
1240
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1241
|
+
[`${e}-tab`]: {
|
|
1242
|
+
borderRadius: {
|
|
1243
|
+
_skip_check_: !0,
|
|
1244
|
+
value: `${_(t.borderRadiusLG)} 0 0 ${_(t.borderRadiusLG)}`
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
[`${e}-tab-active`]: {
|
|
1248
|
+
borderRightColor: {
|
|
1249
|
+
_skip_check_: !0,
|
|
1250
|
+
value: t.colorBgContainer
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
[`&${e}-right`]: {
|
|
1256
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1257
|
+
[`${e}-tab`]: {
|
|
1258
|
+
borderRadius: {
|
|
1259
|
+
_skip_check_: !0,
|
|
1260
|
+
value: `0 ${_(t.borderRadiusLG)} ${_(t.borderRadiusLG)} 0`
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
[`${e}-tab-active`]: {
|
|
1264
|
+
borderLeftColor: {
|
|
1265
|
+
_skip_check_: !0,
|
|
1266
|
+
value: t.colorBgContainer
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
}, Pn = (t) => {
|
|
1274
|
+
const {
|
|
1275
|
+
antCls: e,
|
|
1276
|
+
componentCls: n,
|
|
1277
|
+
itemHoverColor: o,
|
|
1278
|
+
dropdownEdgeChildVerticalPadding: r
|
|
1279
|
+
} = t;
|
|
1280
|
+
return {
|
|
1281
|
+
[`${n}-dropdown`]: {
|
|
1282
|
+
...ft(t),
|
|
1283
|
+
position: "absolute",
|
|
1284
|
+
top: -9999,
|
|
1285
|
+
left: {
|
|
1286
|
+
_skip_check_: !0,
|
|
1287
|
+
value: -9999
|
|
1288
|
+
},
|
|
1289
|
+
zIndex: t.zIndexPopup,
|
|
1290
|
+
display: "block",
|
|
1291
|
+
"&-hidden": {
|
|
1292
|
+
display: "none"
|
|
1293
|
+
},
|
|
1294
|
+
// When position is not enough for tabs dropdown, the placement will revert.
|
|
1295
|
+
// We will handle this with revert motion name.
|
|
1296
|
+
[`&${e}-slide-down-enter${e}-slide-down-enter-active${n}-dropdown-placement-bottomLeft,
|
|
1297
|
+
&${e}-slide-down-appear${e}-slide-down-appear-active${n}-dropdown-placement-bottomLeft,
|
|
1298
|
+
&${e}-slide-down-enter${e}-slide-down-enter-active${n}-dropdown-placement-bottom,
|
|
1299
|
+
&${e}-slide-down-appear${e}-slide-down-appear-active${n}-dropdown-placement-bottom,
|
|
1300
|
+
&${e}-slide-down-enter${e}-slide-down-enter-active${n}-dropdown-placement-bottomRight,
|
|
1301
|
+
&${e}-slide-down-appear${e}-slide-down-appear-active${n}-dropdown-placement-bottomRight`]: {
|
|
1302
|
+
animationName: an
|
|
1303
|
+
},
|
|
1304
|
+
[`&${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
|
|
1305
|
+
&${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft,
|
|
1306
|
+
&${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-top,
|
|
1307
|
+
&${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-top,
|
|
1308
|
+
&${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topRight,
|
|
1309
|
+
&${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topRight`]: {
|
|
1310
|
+
animationName: on
|
|
1311
|
+
},
|
|
1312
|
+
[`&${e}-slide-down-leave${e}-slide-down-leave-active${n}-dropdown-placement-bottomLeft,
|
|
1313
|
+
&${e}-slide-down-leave${e}-slide-down-leave-active${n}-dropdown-placement-bottom,
|
|
1314
|
+
&${e}-slide-down-leave${e}-slide-down-leave-active${n}-dropdown-placement-bottomRight`]: {
|
|
1315
|
+
animationName: nn
|
|
1316
|
+
},
|
|
1317
|
+
[`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft,
|
|
1318
|
+
&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-top,
|
|
1319
|
+
&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topRight`]: {
|
|
1320
|
+
animationName: tn
|
|
1321
|
+
},
|
|
1322
|
+
[`${n}-dropdown-menu`]: {
|
|
1323
|
+
maxHeight: t.tabsDropdownHeight,
|
|
1324
|
+
margin: 0,
|
|
1325
|
+
padding: `${_(r)} 0`,
|
|
1326
|
+
overflowX: "hidden",
|
|
1327
|
+
overflowY: "auto",
|
|
1328
|
+
textAlign: {
|
|
1329
|
+
_skip_check_: !0,
|
|
1330
|
+
value: "left"
|
|
1331
|
+
},
|
|
1332
|
+
listStyleType: "none",
|
|
1333
|
+
backgroundColor: t.colorBgContainer,
|
|
1334
|
+
backgroundClip: "padding-box",
|
|
1335
|
+
borderRadius: t.borderRadiusLG,
|
|
1336
|
+
outline: "none",
|
|
1337
|
+
boxShadow: t.boxShadowSecondary,
|
|
1338
|
+
"&-item": {
|
|
1339
|
+
...Kt,
|
|
1340
|
+
display: "flex",
|
|
1341
|
+
alignItems: "center",
|
|
1342
|
+
minWidth: t.tabsDropdownWidth,
|
|
1343
|
+
margin: 0,
|
|
1344
|
+
padding: `${_(t.paddingXXS)} ${_(t.paddingSM)}`,
|
|
1345
|
+
color: t.colorText,
|
|
1346
|
+
fontWeight: 400,
|
|
1347
|
+
fontSize: t.fontSize,
|
|
1348
|
+
lineHeight: t.lineHeight,
|
|
1349
|
+
cursor: "pointer",
|
|
1350
|
+
transition: `all ${t.motionDurationSlow}`,
|
|
1351
|
+
"> span": {
|
|
1352
|
+
flex: 1,
|
|
1353
|
+
whiteSpace: "nowrap"
|
|
1354
|
+
},
|
|
1355
|
+
"&-remove": {
|
|
1356
|
+
flex: "none",
|
|
1357
|
+
marginLeft: {
|
|
1358
|
+
_skip_check_: !0,
|
|
1359
|
+
value: t.marginSM
|
|
1360
|
+
},
|
|
1361
|
+
color: t.colorIcon,
|
|
1362
|
+
fontSize: t.fontSizeSM,
|
|
1363
|
+
background: "transparent",
|
|
1364
|
+
border: 0,
|
|
1365
|
+
cursor: "pointer",
|
|
1366
|
+
"&:hover": {
|
|
1367
|
+
color: o
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
"&:hover": {
|
|
1371
|
+
background: t.controlItemBgHover
|
|
1372
|
+
},
|
|
1373
|
+
"&-disabled": {
|
|
1374
|
+
"&, &:hover": {
|
|
1375
|
+
color: t.colorTextDisabled,
|
|
1376
|
+
background: "transparent",
|
|
1377
|
+
cursor: "not-allowed"
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
};
|
|
1384
|
+
}, Rn = (t) => {
|
|
1385
|
+
const {
|
|
1386
|
+
componentCls: e,
|
|
1387
|
+
margin: n,
|
|
1388
|
+
colorBorderSecondary: o,
|
|
1389
|
+
horizontalMargin: r,
|
|
1390
|
+
verticalItemPadding: i,
|
|
1391
|
+
verticalItemMargin: a,
|
|
1392
|
+
motionDurationSlow: l,
|
|
1393
|
+
calc: b
|
|
1394
|
+
} = t;
|
|
1395
|
+
return {
|
|
1396
|
+
// ========================== Top & Bottom ==========================
|
|
1397
|
+
[`${e}-top, ${e}-bottom`]: {
|
|
1398
|
+
flexDirection: "column",
|
|
1399
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1400
|
+
margin: r,
|
|
1401
|
+
"&::before": {
|
|
1402
|
+
position: "absolute",
|
|
1403
|
+
right: {
|
|
1404
|
+
_skip_check_: !0,
|
|
1405
|
+
value: 0
|
|
1406
|
+
},
|
|
1407
|
+
left: {
|
|
1408
|
+
_skip_check_: !0,
|
|
1409
|
+
value: 0
|
|
1410
|
+
},
|
|
1411
|
+
borderBottom: `${_(t.lineWidth)} ${t.lineType} ${o}`,
|
|
1412
|
+
content: "''"
|
|
1413
|
+
},
|
|
1414
|
+
[`${e}-ink-bar`]: {
|
|
1415
|
+
height: t.lineWidthBold,
|
|
1416
|
+
"&-animated": {
|
|
1417
|
+
transition: ["width", "left", "right"].map((c) => `${c} ${l}`).join(", ")
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
[`${e}-nav-wrap`]: {
|
|
1421
|
+
"&::before, &::after": {
|
|
1422
|
+
top: 0,
|
|
1423
|
+
bottom: 0,
|
|
1424
|
+
width: t.controlHeight
|
|
1425
|
+
},
|
|
1426
|
+
"&::before": {
|
|
1427
|
+
left: {
|
|
1428
|
+
_skip_check_: !0,
|
|
1429
|
+
value: 0
|
|
1430
|
+
},
|
|
1431
|
+
boxShadow: t.boxShadowTabsOverflowLeft
|
|
1432
|
+
},
|
|
1433
|
+
"&::after": {
|
|
1434
|
+
right: {
|
|
1435
|
+
_skip_check_: !0,
|
|
1436
|
+
value: 0
|
|
1437
|
+
},
|
|
1438
|
+
boxShadow: t.boxShadowTabsOverflowRight
|
|
1439
|
+
},
|
|
1440
|
+
[`&${e}-nav-wrap-ping-left::before`]: {
|
|
1441
|
+
opacity: 1
|
|
1442
|
+
},
|
|
1443
|
+
[`&${e}-nav-wrap-ping-right::after`]: {
|
|
1444
|
+
opacity: 1
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
[`${e}-top`]: {
|
|
1450
|
+
[`> ${e}-nav,
|
|
1451
|
+
> div > ${e}-nav`]: {
|
|
1452
|
+
"&::before": {
|
|
1453
|
+
bottom: 0
|
|
1454
|
+
},
|
|
1455
|
+
[`${e}-ink-bar`]: {
|
|
1456
|
+
bottom: 0
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
[`${e}-bottom`]: {
|
|
1461
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1462
|
+
order: 1,
|
|
1463
|
+
marginTop: n,
|
|
1464
|
+
marginBottom: 0,
|
|
1465
|
+
"&::before": {
|
|
1466
|
+
top: 0
|
|
1467
|
+
},
|
|
1468
|
+
[`${e}-ink-bar`]: {
|
|
1469
|
+
top: 0
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
[`> ${e}-body-holder, > div > ${e}-body-holder`]: {
|
|
1473
|
+
order: 0
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
// ========================== Left & Right ==========================
|
|
1477
|
+
[`${e}-left, ${e}-right`]: {
|
|
1478
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1479
|
+
flexDirection: "column",
|
|
1480
|
+
minWidth: b(t.controlHeight).mul(1.25).equal(),
|
|
1481
|
+
// >>>>>>>>>>> Tab
|
|
1482
|
+
[`${e}-tab`]: {
|
|
1483
|
+
padding: i,
|
|
1484
|
+
textAlign: "center"
|
|
1485
|
+
},
|
|
1486
|
+
[`${e}-tab + ${e}-tab`]: {
|
|
1487
|
+
margin: a
|
|
1488
|
+
},
|
|
1489
|
+
// >>>>>>>>>>> Nav
|
|
1490
|
+
[`${e}-nav-wrap`]: {
|
|
1491
|
+
flexDirection: "column",
|
|
1492
|
+
"&::before, &::after": {
|
|
1493
|
+
right: {
|
|
1494
|
+
_skip_check_: !0,
|
|
1495
|
+
value: 0
|
|
1496
|
+
},
|
|
1497
|
+
left: {
|
|
1498
|
+
_skip_check_: !0,
|
|
1499
|
+
value: 0
|
|
1500
|
+
},
|
|
1501
|
+
height: t.controlHeight
|
|
1502
|
+
},
|
|
1503
|
+
"&::before": {
|
|
1504
|
+
top: 0,
|
|
1505
|
+
boxShadow: t.boxShadowTabsOverflowTop
|
|
1506
|
+
},
|
|
1507
|
+
"&::after": {
|
|
1508
|
+
bottom: 0,
|
|
1509
|
+
boxShadow: t.boxShadowTabsOverflowBottom
|
|
1510
|
+
},
|
|
1511
|
+
[`&${e}-nav-wrap-ping-top::before`]: {
|
|
1512
|
+
opacity: 1
|
|
1513
|
+
},
|
|
1514
|
+
[`&${e}-nav-wrap-ping-bottom::after`]: {
|
|
1515
|
+
opacity: 1
|
|
1516
|
+
}
|
|
1517
|
+
},
|
|
1518
|
+
// >>>>>>>>>>> Ink Bar
|
|
1519
|
+
[`${e}-ink-bar`]: {
|
|
1520
|
+
width: t.lineWidthBold,
|
|
1521
|
+
"&-animated": {
|
|
1522
|
+
transition: ["height", "top"].map((c) => `${c} ${l}`).join(", ")
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
[`${e}-nav-list, ${e}-nav-operations`]: {
|
|
1526
|
+
flex: "1 0 auto",
|
|
1527
|
+
// fix safari scroll problem
|
|
1528
|
+
flexDirection: "column"
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
[`${e}-left`]: {
|
|
1533
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1534
|
+
[`${e}-ink-bar`]: {
|
|
1535
|
+
right: {
|
|
1536
|
+
_skip_check_: !0,
|
|
1537
|
+
value: 0
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
[`> ${e}-body-holder, > div > ${e}-body-holder`]: {
|
|
1542
|
+
marginLeft: {
|
|
1543
|
+
_skip_check_: !0,
|
|
1544
|
+
value: _(b(t.lineWidth).mul(-1).equal())
|
|
1545
|
+
},
|
|
1546
|
+
borderLeft: {
|
|
1547
|
+
_skip_check_: !0,
|
|
1548
|
+
value: `${_(t.lineWidth)} ${t.lineType} ${t.colorBorder}`
|
|
1549
|
+
},
|
|
1550
|
+
[`> ${e}-body > ${e}-content`]: {
|
|
1551
|
+
paddingLeft: {
|
|
1552
|
+
_skip_check_: !0,
|
|
1553
|
+
value: t.paddingLG
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
[`${e}-right`]: {
|
|
1559
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1560
|
+
order: 1,
|
|
1561
|
+
[`${e}-ink-bar`]: {
|
|
1562
|
+
left: {
|
|
1563
|
+
_skip_check_: !0,
|
|
1564
|
+
value: 0
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
[`> ${e}-body-holder, > div > ${e}-body-holder`]: {
|
|
1569
|
+
order: 0,
|
|
1570
|
+
marginRight: {
|
|
1571
|
+
_skip_check_: !0,
|
|
1572
|
+
value: b(t.lineWidth).mul(-1).equal()
|
|
1573
|
+
},
|
|
1574
|
+
borderRight: {
|
|
1575
|
+
_skip_check_: !0,
|
|
1576
|
+
value: `${_(t.lineWidth)} ${t.lineType} ${t.colorBorder}`
|
|
1577
|
+
},
|
|
1578
|
+
[`> ${e}-body > ${e}-content`]: {
|
|
1579
|
+
paddingRight: {
|
|
1580
|
+
_skip_check_: !0,
|
|
1581
|
+
value: t.paddingLG
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
}, In = (t) => {
|
|
1588
|
+
const {
|
|
1589
|
+
componentCls: e,
|
|
1590
|
+
cardPaddingSM: n,
|
|
1591
|
+
cardPaddingLG: o,
|
|
1592
|
+
cardHeightSM: r,
|
|
1593
|
+
cardHeightLG: i,
|
|
1594
|
+
horizontalItemPaddingSM: a,
|
|
1595
|
+
horizontalItemPaddingLG: l
|
|
1596
|
+
} = t;
|
|
1597
|
+
return {
|
|
1598
|
+
// >>>>> shared
|
|
1599
|
+
[e]: {
|
|
1600
|
+
"&-small": {
|
|
1601
|
+
[`> ${e}-nav`]: {
|
|
1602
|
+
[`${e}-tab`]: {
|
|
1603
|
+
padding: a,
|
|
1604
|
+
fontSize: t.titleFontSizeSM
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
"&-large": {
|
|
1609
|
+
[`> ${e}-nav`]: {
|
|
1610
|
+
[`${e}-tab`]: {
|
|
1611
|
+
padding: l,
|
|
1612
|
+
fontSize: t.titleFontSizeLG,
|
|
1613
|
+
lineHeight: t.lineHeightLG
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
// >>>>> card
|
|
1619
|
+
[`${e}-card`]: {
|
|
1620
|
+
// Small
|
|
1621
|
+
[`&${e}-small`]: {
|
|
1622
|
+
[`> ${e}-nav`]: {
|
|
1623
|
+
[`${e}-tab`]: {
|
|
1624
|
+
padding: n
|
|
1625
|
+
},
|
|
1626
|
+
[`${e}-nav-add`]: {
|
|
1627
|
+
minWidth: r,
|
|
1628
|
+
minHeight: r
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
[`&${e}-bottom`]: {
|
|
1632
|
+
[`> ${e}-nav ${e}-tab`]: {
|
|
1633
|
+
borderRadius: `0 0 ${_(t.borderRadius)} ${_(t.borderRadius)}`
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
[`&${e}-top`]: {
|
|
1637
|
+
[`> ${e}-nav ${e}-tab`]: {
|
|
1638
|
+
borderRadius: `${_(t.borderRadius)} ${_(t.borderRadius)} 0 0`
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
[`&${e}-right`]: {
|
|
1642
|
+
[`> ${e}-nav ${e}-tab`]: {
|
|
1643
|
+
borderRadius: {
|
|
1644
|
+
_skip_check_: !0,
|
|
1645
|
+
value: `0 ${_(t.borderRadius)} ${_(t.borderRadius)} 0`
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
},
|
|
1649
|
+
[`&${e}-left`]: {
|
|
1650
|
+
[`> ${e}-nav ${e}-tab`]: {
|
|
1651
|
+
borderRadius: {
|
|
1652
|
+
_skip_check_: !0,
|
|
1653
|
+
value: `${_(t.borderRadius)} 0 0 ${_(t.borderRadius)}`
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
// Large
|
|
1659
|
+
[`&${e}-large`]: {
|
|
1660
|
+
[`> ${e}-nav`]: {
|
|
1661
|
+
[`${e}-tab`]: {
|
|
1662
|
+
padding: o
|
|
1663
|
+
},
|
|
1664
|
+
[`${e}-nav-add`]: {
|
|
1665
|
+
minWidth: i,
|
|
1666
|
+
minHeight: i
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
};
|
|
1672
|
+
}, Ln = (t) => {
|
|
1673
|
+
const {
|
|
1674
|
+
componentCls: e,
|
|
1675
|
+
itemActiveColor: n,
|
|
1676
|
+
itemHoverColor: o,
|
|
1677
|
+
iconCls: r,
|
|
1678
|
+
tabsHorizontalItemMargin: i,
|
|
1679
|
+
horizontalItemPadding: a,
|
|
1680
|
+
itemSelectedColor: l,
|
|
1681
|
+
itemColor: b
|
|
1682
|
+
} = t, c = `${e}-tab`;
|
|
1683
|
+
return {
|
|
1684
|
+
[c]: {
|
|
1685
|
+
position: "relative",
|
|
1686
|
+
WebkitTouchCallout: "none",
|
|
1687
|
+
WebkitTapHighlightColor: "transparent",
|
|
1688
|
+
display: "inline-flex",
|
|
1689
|
+
alignItems: "center",
|
|
1690
|
+
padding: a,
|
|
1691
|
+
fontSize: t.titleFontSize,
|
|
1692
|
+
background: "transparent",
|
|
1693
|
+
border: 0,
|
|
1694
|
+
outline: "none",
|
|
1695
|
+
cursor: "pointer",
|
|
1696
|
+
color: b,
|
|
1697
|
+
"&-btn, &-remove": {
|
|
1698
|
+
"&:focus:not(:focus-visible), &:active": {
|
|
1699
|
+
color: n
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
"&-btn": {
|
|
1703
|
+
outline: "none",
|
|
1704
|
+
transition: `all ${t.motionDurationSlow}`,
|
|
1705
|
+
[`${c}-icon:not(:last-child)`]: {
|
|
1706
|
+
marginInlineEnd: t.marginSM
|
|
1707
|
+
},
|
|
1708
|
+
// Icons from third-party libraries render as a bare `<svg>` inside the icon wrapper,
|
|
1709
|
+
// which the `.anticon` reset never reaches. An `<svg>` has no baseline of its own, so it
|
|
1710
|
+
// is aligned by its bottom margin edge (CSS 2.1 §10.8.1) and rides above the label.
|
|
1711
|
+
// `display: inline-block` keeps it an atomic inline box so `vertical-align` still applies
|
|
1712
|
+
// even under a CSS reset that forces `svg { display: block }` (e.g. Tailwind Preflight),
|
|
1713
|
+
// which would otherwise drop the icon onto its own line. `vertical-align: middle` centres its
|
|
1714
|
+
// margin box on the x-height line; `margin-block-end` then lifts it by half its own value onto
|
|
1715
|
+
// the cap-height centre (capHeight − xHeight ≈ 0.2em across typical fonts), keeping it centred
|
|
1716
|
+
// at any icon size.
|
|
1717
|
+
// Only matches a bare `<svg>`: an `.anticon` keeps its `<svg>` one level deeper.
|
|
1718
|
+
[`${c}-icon > svg`]: {
|
|
1719
|
+
display: "inline-block",
|
|
1720
|
+
verticalAlign: "middle",
|
|
1721
|
+
marginBlockEnd: "0.2em"
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"&-remove": {
|
|
1725
|
+
flex: "none",
|
|
1726
|
+
lineHeight: 1,
|
|
1727
|
+
marginRight: {
|
|
1728
|
+
_skip_check_: !0,
|
|
1729
|
+
value: t.calc(t.marginXXS).mul(-1).equal()
|
|
1730
|
+
},
|
|
1731
|
+
marginLeft: {
|
|
1732
|
+
_skip_check_: !0,
|
|
1733
|
+
value: t.marginXS
|
|
1734
|
+
},
|
|
1735
|
+
color: t.colorIcon,
|
|
1736
|
+
fontSize: t.fontSizeSM,
|
|
1737
|
+
background: "transparent",
|
|
1738
|
+
border: "none",
|
|
1739
|
+
outline: "none",
|
|
1740
|
+
cursor: "pointer",
|
|
1741
|
+
transition: `all ${t.motionDurationSlow}`,
|
|
1742
|
+
"&:hover": {
|
|
1743
|
+
color: t.colorTextHeading
|
|
1744
|
+
},
|
|
1745
|
+
...Oe(t)
|
|
1746
|
+
},
|
|
1747
|
+
"&:hover": {
|
|
1748
|
+
color: o
|
|
1749
|
+
},
|
|
1750
|
+
[`&${c}-active ${c}-btn`]: {
|
|
1751
|
+
color: l
|
|
1752
|
+
},
|
|
1753
|
+
[`&${c}-focus ${c}-btn:focus-visible`]: mt(t),
|
|
1754
|
+
[`&${c}-disabled`]: {
|
|
1755
|
+
color: t.colorTextDisabled,
|
|
1756
|
+
cursor: "not-allowed"
|
|
1757
|
+
},
|
|
1758
|
+
[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]: {
|
|
1759
|
+
"&:focus, &:active": {
|
|
1760
|
+
color: t.colorTextDisabled
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
[`& ${c}-remove ${r}`]: {
|
|
1764
|
+
margin: 0,
|
|
1765
|
+
verticalAlign: "middle"
|
|
1766
|
+
},
|
|
1767
|
+
[`${r}:not(:last-child)`]: {
|
|
1768
|
+
marginRight: {
|
|
1769
|
+
_skip_check_: !0,
|
|
1770
|
+
value: t.marginSM
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
},
|
|
1774
|
+
[`${c} + ${c}`]: {
|
|
1775
|
+
margin: {
|
|
1776
|
+
_skip_check_: !0,
|
|
1777
|
+
value: i
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
}, Mn = (t) => {
|
|
1782
|
+
const {
|
|
1783
|
+
componentCls: e,
|
|
1784
|
+
tabsHorizontalItemMarginRTL: n,
|
|
1785
|
+
iconCls: o,
|
|
1786
|
+
cardGutter: r,
|
|
1787
|
+
calc: i
|
|
1788
|
+
} = t;
|
|
1789
|
+
return {
|
|
1790
|
+
[`${e}-rtl`]: {
|
|
1791
|
+
direction: "rtl",
|
|
1792
|
+
[`${e}-nav`]: {
|
|
1793
|
+
[`${e}-tab`]: {
|
|
1794
|
+
margin: {
|
|
1795
|
+
_skip_check_: !0,
|
|
1796
|
+
value: n
|
|
1797
|
+
},
|
|
1798
|
+
[`${e}-tab:last-of-type`]: {
|
|
1799
|
+
marginLeft: {
|
|
1800
|
+
_skip_check_: !0,
|
|
1801
|
+
value: 0
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1804
|
+
[o]: {
|
|
1805
|
+
marginRight: {
|
|
1806
|
+
_skip_check_: !0,
|
|
1807
|
+
value: 0
|
|
1808
|
+
},
|
|
1809
|
+
marginLeft: {
|
|
1810
|
+
_skip_check_: !0,
|
|
1811
|
+
value: t.marginSM
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
[`${e}-tab-remove`]: {
|
|
1815
|
+
marginRight: {
|
|
1816
|
+
_skip_check_: !0,
|
|
1817
|
+
value: t.marginXS
|
|
1818
|
+
},
|
|
1819
|
+
marginLeft: {
|
|
1820
|
+
_skip_check_: !0,
|
|
1821
|
+
value: i(t.marginXXS).mul(-1).equal()
|
|
1822
|
+
},
|
|
1823
|
+
[o]: {
|
|
1824
|
+
margin: 0
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
[`&${e}-left`]: {
|
|
1830
|
+
[`> ${e}-nav`]: {
|
|
1831
|
+
order: 1
|
|
1832
|
+
},
|
|
1833
|
+
[`> ${e}-body-holder`]: {
|
|
1834
|
+
order: 0
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
[`&${e}-right`]: {
|
|
1838
|
+
[`> ${e}-nav`]: {
|
|
1839
|
+
order: 0
|
|
1840
|
+
},
|
|
1841
|
+
[`> ${e}-body-holder`]: {
|
|
1842
|
+
order: 1
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
// ====================== Card ======================
|
|
1846
|
+
[`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
|
|
1847
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1848
|
+
[`${e}-tab + ${e}-tab`]: {
|
|
1849
|
+
marginRight: {
|
|
1850
|
+
_skip_check_: !0,
|
|
1851
|
+
value: r
|
|
1852
|
+
},
|
|
1853
|
+
marginLeft: {
|
|
1854
|
+
_skip_check_: !0,
|
|
1855
|
+
value: 0
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
[`${e}-dropdown-rtl`]: {
|
|
1862
|
+
direction: "rtl"
|
|
1863
|
+
},
|
|
1864
|
+
[`${e}-menu-item`]: {
|
|
1865
|
+
[`${e}-dropdown-rtl`]: {
|
|
1866
|
+
textAlign: {
|
|
1867
|
+
_skip_check_: !0,
|
|
1868
|
+
value: "right"
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
}, Nn = (t) => {
|
|
1874
|
+
const {
|
|
1875
|
+
componentCls: e,
|
|
1876
|
+
tabsCardPadding: n,
|
|
1877
|
+
cardHeight: o,
|
|
1878
|
+
cardGutter: r,
|
|
1879
|
+
itemHoverColor: i,
|
|
1880
|
+
itemActiveColor: a,
|
|
1881
|
+
colorBorderSecondary: l
|
|
1882
|
+
} = t;
|
|
1883
|
+
return {
|
|
1884
|
+
[e]: {
|
|
1885
|
+
...ft(t),
|
|
1886
|
+
display: "flex",
|
|
1887
|
+
// ========================== Navigation ==========================
|
|
1888
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
1889
|
+
position: "relative",
|
|
1890
|
+
display: "flex",
|
|
1891
|
+
flex: "none",
|
|
1892
|
+
alignItems: "center",
|
|
1893
|
+
[`${e}-nav-wrap`]: {
|
|
1894
|
+
position: "relative",
|
|
1895
|
+
display: "flex",
|
|
1896
|
+
flex: "auto",
|
|
1897
|
+
alignSelf: "stretch",
|
|
1898
|
+
overflow: "hidden",
|
|
1899
|
+
whiteSpace: "nowrap",
|
|
1900
|
+
transform: "translate(0)",
|
|
1901
|
+
// Fix chrome render bug
|
|
1902
|
+
// >>>>> Ping shadow
|
|
1903
|
+
"&::before, &::after": {
|
|
1904
|
+
position: "absolute",
|
|
1905
|
+
zIndex: 1,
|
|
1906
|
+
opacity: 0,
|
|
1907
|
+
transition: `opacity ${t.motionDurationSlow}`,
|
|
1908
|
+
content: "''",
|
|
1909
|
+
pointerEvents: "none"
|
|
1910
|
+
}
|
|
1911
|
+
},
|
|
1912
|
+
[`${e}-nav-list`]: {
|
|
1913
|
+
position: "relative",
|
|
1914
|
+
display: "flex",
|
|
1915
|
+
transition: `opacity ${t.motionDurationSlow}`
|
|
1916
|
+
},
|
|
1917
|
+
// >>>>>>>> Operations
|
|
1918
|
+
[`${e}-nav-operations`]: {
|
|
1919
|
+
display: "flex",
|
|
1920
|
+
alignSelf: "stretch"
|
|
1921
|
+
},
|
|
1922
|
+
[`${e}-nav-operations-hidden`]: {
|
|
1923
|
+
position: "absolute",
|
|
1924
|
+
visibility: "hidden",
|
|
1925
|
+
pointerEvents: "none"
|
|
1926
|
+
},
|
|
1927
|
+
[`${e}-nav-more`]: {
|
|
1928
|
+
position: "relative",
|
|
1929
|
+
padding: n,
|
|
1930
|
+
background: "transparent",
|
|
1931
|
+
border: 0,
|
|
1932
|
+
color: t.colorText,
|
|
1933
|
+
"&::after": {
|
|
1934
|
+
position: "absolute",
|
|
1935
|
+
right: {
|
|
1936
|
+
_skip_check_: !0,
|
|
1937
|
+
value: 0
|
|
1938
|
+
},
|
|
1939
|
+
bottom: 0,
|
|
1940
|
+
left: {
|
|
1941
|
+
_skip_check_: !0,
|
|
1942
|
+
value: 0
|
|
1943
|
+
},
|
|
1944
|
+
height: t.calc(t.controlHeightLG).div(8).equal(),
|
|
1945
|
+
transform: "translateY(100%)",
|
|
1946
|
+
content: "''"
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
[`${e}-nav-add`]: {
|
|
1950
|
+
minWidth: o,
|
|
1951
|
+
minHeight: o,
|
|
1952
|
+
marginLeft: {
|
|
1953
|
+
_skip_check_: !0,
|
|
1954
|
+
value: r
|
|
1955
|
+
},
|
|
1956
|
+
background: "transparent",
|
|
1957
|
+
border: `${_(t.lineWidth)} ${t.lineType} ${l}`,
|
|
1958
|
+
borderRadius: `${_(t.borderRadiusLG)} ${_(t.borderRadiusLG)} 0 0`,
|
|
1959
|
+
outline: "none",
|
|
1960
|
+
cursor: "pointer",
|
|
1961
|
+
color: t.colorText,
|
|
1962
|
+
transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
|
|
1963
|
+
"&:hover": {
|
|
1964
|
+
color: i
|
|
1965
|
+
},
|
|
1966
|
+
"&:active, &:focus:not(:focus-visible)": {
|
|
1967
|
+
color: a
|
|
1968
|
+
},
|
|
1969
|
+
...Oe(t, -3)
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
[`${e}-extra-content`]: {
|
|
1973
|
+
flex: "none"
|
|
1974
|
+
},
|
|
1975
|
+
// ============================ InkBar ============================
|
|
1976
|
+
[`${e}-ink-bar`]: {
|
|
1977
|
+
position: "absolute",
|
|
1978
|
+
background: t.inkBarColor,
|
|
1979
|
+
pointerEvents: "none"
|
|
1980
|
+
},
|
|
1981
|
+
// ============================= Tabs =============================
|
|
1982
|
+
...Ln(t),
|
|
1983
|
+
// =========================== TabPanes ===========================
|
|
1984
|
+
[`${e}-body`]: {
|
|
1985
|
+
position: "relative",
|
|
1986
|
+
width: "100%"
|
|
1987
|
+
},
|
|
1988
|
+
[`${e}-body-holder`]: {
|
|
1989
|
+
flex: "auto",
|
|
1990
|
+
minWidth: 0,
|
|
1991
|
+
minHeight: 0
|
|
1992
|
+
},
|
|
1993
|
+
[`${e}-content`]: {
|
|
1994
|
+
...Oe(t),
|
|
1995
|
+
"&-hidden": {
|
|
1996
|
+
display: "none"
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
[`${e}-centered`]: {
|
|
2001
|
+
[`> ${e}-nav, > div > ${e}-nav`]: {
|
|
2002
|
+
[`${e}-nav-wrap`]: {
|
|
2003
|
+
[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]: {
|
|
2004
|
+
margin: "auto"
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
};
|
|
2010
|
+
}, zn = (t) => {
|
|
2011
|
+
const {
|
|
2012
|
+
cardHeight: e,
|
|
2013
|
+
cardHeightSM: n,
|
|
2014
|
+
cardHeightLG: o,
|
|
2015
|
+
controlHeight: r,
|
|
2016
|
+
controlHeightLG: i
|
|
2017
|
+
} = t, a = e || i, l = n || r, b = o || i + 8;
|
|
2018
|
+
return {
|
|
2019
|
+
zIndexPopup: t.zIndexPopupBase + 50,
|
|
2020
|
+
cardBg: t.colorFillAlter,
|
|
2021
|
+
// We can not pass this as valid value,
|
|
2022
|
+
// Since `cardHeight` will lock nav add button height.
|
|
2023
|
+
cardHeight: a,
|
|
2024
|
+
cardHeightSM: l,
|
|
2025
|
+
cardHeightLG: b,
|
|
2026
|
+
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
|
|
2027
|
+
cardPadding: `${(a - t.fontHeight) / 2 - t.lineWidth}px ${t.padding}px`,
|
|
2028
|
+
cardPaddingSM: `${(l - t.fontHeight) / 2 - t.lineWidth}px ${t.paddingXS}px`,
|
|
2029
|
+
cardPaddingLG: `${(b - t.fontHeightLG) / 2 - t.lineWidth}px ${t.padding}px`,
|
|
2030
|
+
titleFontSize: t.fontSize,
|
|
2031
|
+
titleFontSizeLG: t.fontSizeLG,
|
|
2032
|
+
titleFontSizeSM: t.fontSize,
|
|
2033
|
+
inkBarColor: t.colorPrimary,
|
|
2034
|
+
horizontalMargin: `0 0 ${t.margin}px 0`,
|
|
2035
|
+
horizontalItemGutter: 32,
|
|
2036
|
+
// Fixed Value
|
|
2037
|
+
// Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
|
|
2038
|
+
horizontalItemMargin: "",
|
|
2039
|
+
horizontalItemMarginRTL: "",
|
|
2040
|
+
horizontalItemPadding: `${t.paddingSM}px 0`,
|
|
2041
|
+
horizontalItemPaddingSM: `${t.paddingXS}px 0`,
|
|
2042
|
+
horizontalItemPaddingLG: `${t.padding}px 0`,
|
|
2043
|
+
verticalItemPadding: `${t.paddingXS}px ${t.paddingLG}px`,
|
|
2044
|
+
verticalItemMargin: `${t.margin}px 0 0 0`,
|
|
2045
|
+
itemColor: t.colorText,
|
|
2046
|
+
itemSelectedColor: t.colorPrimary,
|
|
2047
|
+
itemHoverColor: t.colorPrimaryHover,
|
|
2048
|
+
itemActiveColor: t.colorPrimaryActive,
|
|
2049
|
+
cardGutter: t.marginXXS / 2
|
|
2050
|
+
};
|
|
2051
|
+
}, Dn = Vt("Tabs", (t) => {
|
|
2052
|
+
const e = Xt(t, {
|
|
2053
|
+
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
|
|
2054
|
+
tabsCardPadding: t.cardPadding,
|
|
2055
|
+
dropdownEdgeChildVerticalPadding: t.paddingXXS,
|
|
2056
|
+
tabsDropdownHeight: 200,
|
|
2057
|
+
tabsDropdownWidth: 120,
|
|
2058
|
+
tabsHorizontalItemMargin: `0 0 0 ${_(t.horizontalItemGutter)}`,
|
|
2059
|
+
tabsHorizontalItemMarginRTL: `0 0 0 ${_(t.horizontalItemGutter)}`
|
|
2060
|
+
});
|
|
2061
|
+
return [In(e), Mn(e), Rn(e), Pn(e), Tn(e), Nn(e), Cn(e)];
|
|
2062
|
+
}, zn), wt = () => null;
|
|
2063
|
+
process.env.NODE_ENV !== "production" && (wt.displayName = "DeprecatedTabPane");
|
|
2064
|
+
const On = /* @__PURE__ */ s.forwardRef((t, e) => {
|
|
2065
|
+
var fe, me, pe, $e, be;
|
|
2066
|
+
const {
|
|
2067
|
+
type: n,
|
|
2068
|
+
className: o,
|
|
2069
|
+
rootClassName: r,
|
|
2070
|
+
size: i,
|
|
2071
|
+
onEdit: a,
|
|
2072
|
+
hideAdd: l,
|
|
2073
|
+
centered: b,
|
|
2074
|
+
addIcon: c,
|
|
2075
|
+
removeIcon: v,
|
|
2076
|
+
moreIcon: E,
|
|
2077
|
+
more: g,
|
|
2078
|
+
popupClassName: C,
|
|
2079
|
+
children: z,
|
|
2080
|
+
items: x,
|
|
2081
|
+
animated: P,
|
|
2082
|
+
style: y,
|
|
2083
|
+
indicatorSize: d,
|
|
2084
|
+
indicator: u,
|
|
2085
|
+
classNames: f,
|
|
2086
|
+
styles: h,
|
|
2087
|
+
destroyInactiveTabPane: T,
|
|
2088
|
+
destroyOnHidden: F,
|
|
2089
|
+
tabPlacement: O,
|
|
2090
|
+
tabPosition: L,
|
|
2091
|
+
...H
|
|
2092
|
+
} = t, {
|
|
2093
|
+
prefixCls: Y
|
|
2094
|
+
} = H, {
|
|
2095
|
+
getPrefixCls: $,
|
|
2096
|
+
direction: D,
|
|
2097
|
+
getPopupContainer: q,
|
|
2098
|
+
className: R,
|
|
2099
|
+
style: re,
|
|
2100
|
+
classNames: Q,
|
|
2101
|
+
styles: de
|
|
2102
|
+
} = jt("tabs"), {
|
|
2103
|
+
tabs: w
|
|
2104
|
+
} = s.useContext(Ut), X = $("tabs", Y), ie = Jt(X), [I, A] = Dn(X, ie), j = s.useRef(null);
|
|
2105
|
+
s.useImperativeHandle(e, () => ({
|
|
2106
|
+
nativeElement: j.current
|
|
2107
|
+
}));
|
|
2108
|
+
let J;
|
|
2109
|
+
n === "editable-card" && (J = {
|
|
2110
|
+
onEdit: (U, {
|
|
2111
|
+
key: ne,
|
|
2112
|
+
event: ye
|
|
2113
|
+
}) => {
|
|
2114
|
+
a == null || a(U === "add" ? ye : ne, U);
|
|
2115
|
+
},
|
|
2116
|
+
removeIcon: v ?? (w == null ? void 0 : w.removeIcon) ?? /* @__PURE__ */ s.createElement(Ft, null),
|
|
2117
|
+
addIcon: (c ?? (w == null ? void 0 : w.addIcon)) || /* @__PURE__ */ s.createElement(sn, null),
|
|
2118
|
+
showAdd: l !== !0
|
|
2119
|
+
});
|
|
2120
|
+
const k = $();
|
|
2121
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2122
|
+
const U = pt("Tabs");
|
|
2123
|
+
[["popupClassName", "classNames.popup"], ["tabPosition", "tabPlacement"]].forEach(([ne, ye]) => {
|
|
2124
|
+
U.deprecated(!(ne in t), ne, ye);
|
|
2125
|
+
}), process.env.NODE_ENV !== "production" && U(!("onPrevClick" in t) && !("onNextClick" in t), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."), process.env.NODE_ENV !== "production" && U(!(d || w != null && w.indicatorSize), "deprecated", "`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."), U.deprecated(!("destroyInactiveTabPane" in t || x != null && x.some((ne) => "destroyInactiveTabPane" in ne)), "destroyInactiveTabPane", "destroyOnHidden");
|
|
2126
|
+
}
|
|
2127
|
+
const G = Yt(i), M = En(x, z), K = xn(X, P), se = {
|
|
2128
|
+
align: (u == null ? void 0 : u.align) ?? ((fe = w == null ? void 0 : w.indicator) == null ? void 0 : fe.align),
|
|
2129
|
+
size: (u == null ? void 0 : u.size) ?? d ?? ((me = w == null ? void 0 : w.indicator) == null ? void 0 : me.size) ?? (w == null ? void 0 : w.indicatorSize)
|
|
2130
|
+
}, ve = s.useMemo(() => {
|
|
2131
|
+
const U = O ?? L ?? void 0, ne = D === "rtl";
|
|
2132
|
+
switch (U) {
|
|
2133
|
+
case "start":
|
|
2134
|
+
return ne ? "right" : "left";
|
|
2135
|
+
case "end":
|
|
2136
|
+
return ne ? "left" : "right";
|
|
2137
|
+
default:
|
|
2138
|
+
return U;
|
|
2139
|
+
}
|
|
2140
|
+
}, [O, L, D]), _e = {
|
|
2141
|
+
...t,
|
|
2142
|
+
size: G,
|
|
2143
|
+
tabPlacement: ve,
|
|
2144
|
+
items: M
|
|
2145
|
+
}, Z = tt(re), Le = tt(y), [ee, te] = qt([Q, f], [de, Z, h, Le], {
|
|
2146
|
+
props: _e
|
|
2147
|
+
}, {
|
|
2148
|
+
popup: {
|
|
2149
|
+
_default: "root"
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
return /* @__PURE__ */ s.createElement(yt, {
|
|
2153
|
+
ref: j,
|
|
2154
|
+
direction: D,
|
|
2155
|
+
getPopupContainer: q,
|
|
2156
|
+
...H,
|
|
2157
|
+
items: M,
|
|
2158
|
+
className: V({
|
|
2159
|
+
[`${X}-large`]: G === "large",
|
|
2160
|
+
[`${X}-small`]: G === "small",
|
|
2161
|
+
[`${X}-card`]: ["card", "editable-card"].includes(n),
|
|
2162
|
+
[`${X}-editable-card`]: n === "editable-card",
|
|
2163
|
+
[`${X}-centered`]: b
|
|
2164
|
+
}, R, o, r, ee.root, I, A, ie),
|
|
2165
|
+
classNames: {
|
|
2166
|
+
...ee,
|
|
2167
|
+
popup: V(C, I, A, ie, (pe = ee.popup) == null ? void 0 : pe.root)
|
|
2168
|
+
},
|
|
2169
|
+
// `popup` is nested as `{ root }` in antd but flat in rc-tabs, same as `classNames` above
|
|
2170
|
+
styles: {
|
|
2171
|
+
...te,
|
|
2172
|
+
popup: ($e = te.popup) == null ? void 0 : $e.root
|
|
2173
|
+
},
|
|
2174
|
+
style: te.root,
|
|
2175
|
+
editable: J,
|
|
2176
|
+
more: {
|
|
2177
|
+
icon: ((be = w == null ? void 0 : w.more) == null ? void 0 : be.icon) ?? (w == null ? void 0 : w.moreIcon) ?? E ?? /* @__PURE__ */ s.createElement(rn, null),
|
|
2178
|
+
transitionName: `${k}-slide-up`,
|
|
2179
|
+
...g
|
|
2180
|
+
},
|
|
2181
|
+
prefixCls: X,
|
|
2182
|
+
animated: K,
|
|
2183
|
+
indicator: se,
|
|
2184
|
+
destroyOnHidden: F ?? T,
|
|
2185
|
+
tabPosition: ve
|
|
2186
|
+
});
|
|
2187
|
+
}), St = On;
|
|
2188
|
+
St.TabPane = wt;
|
|
2189
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "Tabs");
|
|
2190
|
+
export {
|
|
2191
|
+
St as T
|
|
2192
|
+
};
|