@yuku123/z-cognition-component 2.0.0 → 2.0.2

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.
Files changed (175) hide show
  1. package/dist-lib/ApartmentOutlined-M6qSurnE.js +12 -0
  2. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
  3. package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
  4. package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
  5. package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
  6. package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
  7. package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
  8. package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
  9. package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
  10. package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
  11. package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
  12. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
  13. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
  14. package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
  15. package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
  16. package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
  17. package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
  18. package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
  19. package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
  20. package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
  21. package/dist-lib/Skeleton-DXcERb5r.js +557 -0
  22. package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
  23. package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
  24. package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
  25. package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
  26. package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
  27. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
  28. package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
  29. package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
  30. package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
  31. package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
  32. package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
  33. package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
  34. package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
  35. package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
  36. package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
  37. package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
  38. package/dist-lib/callSuper-DZEfdkXG.js +7 -0
  39. package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
  40. package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
  41. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
  42. package/dist-lib/colors-sdAcAcU3.js +24 -0
  43. package/dist-lib/context-Buz0ggsK.js +710 -0
  44. package/dist-lib/context-DpmyNOn3.js +21 -0
  45. package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
  46. package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
  47. package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
  48. package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
  49. package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
  50. package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
  51. package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
  52. package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
  53. package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
  54. package/dist-lib/embed-CR8XVkMy.js +31148 -0
  55. package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
  56. package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
  57. package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
  58. package/dist-lib/index-9aQ4BzIK.js +500 -0
  59. package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
  60. package/dist-lib/index-B57Fj7Y0.js +1169 -0
  61. package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
  62. package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
  63. package/dist-lib/index-Bc-Vin3j.js +256 -0
  64. package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
  65. package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
  66. package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
  67. package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
  68. package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
  69. package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
  70. package/dist-lib/index-Cfu1W1H6.js +535 -0
  71. package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
  72. package/dist-lib/index-CrMcNEAZ.js +9656 -0
  73. package/dist-lib/index-Cy9i4Kx7.js +699 -0
  74. package/dist-lib/index-CyKWCYMK.js +218 -0
  75. package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
  76. package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
  77. package/dist-lib/index-DBtGE89a.js +168 -0
  78. package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
  79. package/dist-lib/index-DjFPRXl5.js +1484 -0
  80. package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
  81. package/dist-lib/index-DvWHYX81.js +450 -0
  82. package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
  83. package/dist-lib/index-Vu6sPBci.js +1884 -0
  84. package/dist-lib/index-bOY1cBol.js +4890 -0
  85. package/dist-lib/index-nQSVLWfW.js +356 -0
  86. package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
  87. package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
  88. package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
  89. package/dist-lib/index.js +3 -1
  90. package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
  91. package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
  92. package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
  93. package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
  94. package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
  95. package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
  96. package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
  97. package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
  98. package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
  99. package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
  100. package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
  101. package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
  102. package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
  103. package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
  104. package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
  105. package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
  106. package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
  107. package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
  108. package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
  109. package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
  110. package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
  111. package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
  112. package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
  113. package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
  114. package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
  115. package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
  116. package/dist-lib/pages-CsexFuEz.js +73 -0
  117. package/dist-lib/pages.js +3 -3
  118. package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
  119. package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
  120. package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
  121. package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
  122. package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
  123. package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
  124. package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
  125. package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
  126. package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
  127. package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
  128. package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
  129. package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
  130. package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
  131. package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
  132. package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
  133. package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
  134. package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
  135. package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
  136. package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
  137. package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
  138. package/dist-lib/useClosable-BY7FgWKy.js +59 -0
  139. package/dist-lib/useForm-Byp1LopG.js +145 -0
  140. package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
  141. package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
  142. package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
  143. package/package.json +2 -3
  144. package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
  145. package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
  146. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
  147. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
  148. package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
  149. package/dist-lib/Skeleton-CxFsInYI.js +0 -671
  150. package/dist-lib/Table-Civ838nE.js +0 -20514
  151. package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
  152. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
  153. package/dist-lib/callSuper-CwIeyYoc.js +0 -7
  154. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
  155. package/dist-lib/context-T27uno74.js +0 -54
  156. package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
  157. package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
  158. package/dist-lib/index-0TvzCTD7.js +0 -2336
  159. package/dist-lib/index-4tbtbcAt.js +0 -550
  160. package/dist-lib/index-B1wh6i1C.js +0 -1308
  161. package/dist-lib/index-BVgdmf6r.js +0 -2487
  162. package/dist-lib/index-CSnvcFg-.js +0 -543
  163. package/dist-lib/index-D35Ry0PG.js +0 -1162
  164. package/dist-lib/index-DC57_dnh.js +0 -604
  165. package/dist-lib/index-DQ16Zb7x.js +0 -546
  166. package/dist-lib/index-DRcTwC17.js +0 -418
  167. package/dist-lib/index-Dd9pPAT3.js +0 -2192
  168. package/dist-lib/index-DxzorPvG.js +0 -13960
  169. package/dist-lib/index-If4xc1-H.js +0 -559
  170. package/dist-lib/index-R71k3nB_.js +0 -710
  171. package/dist-lib/index-mUlorJxp.js +0 -3279
  172. package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
  173. package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
  174. package/dist-lib/pages-CticGC6S.js +0 -512
  175. package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
@@ -1,550 +0,0 @@
1
- import * as d from "react";
2
- import v, { useMemo as He, useImperativeHandle as Ve } from "react";
3
- import { g as Me, a0 as We, H as j, G as me, br as de, p as fe, R as be, m as Fe, bw as Ae, aS as _e, b9 as k, n as Le, o as ge, t as Pe, x as Ce, aa as ye, v as pe, ad as U, E as he, aT as Oe, L as Ke, _ as qe, b3 as Ge, bx as Xe, M as ve, b2 as je, y as Ue, F as Je, j as Qe, ax as Ye, l as Ze, bc as ke, by as ea } from "./index-DxzorPvG.js";
4
- import "react-dom/client";
5
- import "react-dom";
6
- import { c as I } from "./pages-CticGC6S.js";
7
- const ie = (e) => {
8
- if (!e)
9
- return;
10
- const {
11
- closable: a,
12
- closeIcon: l
13
- } = e;
14
- return {
15
- closable: a,
16
- closeIcon: l
17
- };
18
- }, xe = {}, ue = (e, a) => {
19
- if (!e && (e === !1 || a === !1 || a === null))
20
- return !1;
21
- if (!j(e) && !j(a))
22
- return null;
23
- let l = {
24
- closeIcon: typeof a != "boolean" && j(a) ? a : void 0
25
- };
26
- return me(e) && (l = {
27
- ...l,
28
- ...e
29
- }), l;
30
- }, aa = (e, a, l) => e === !1 ? !1 : e ? de(l, a, e) : a === !1 ? !1 : a ? de(l, a) : l.closable ? l : !1, la = (e, a, l) => {
31
- const {
32
- closeIconRender: t
33
- } = a, {
34
- closeIcon: s,
35
- ...c
36
- } = e;
37
- let r = s;
38
- const o = fe(c, !0);
39
- return j(r) && (t && (r = t(r)), r = /* @__PURE__ */ v.isValidElement(r) ? /* @__PURE__ */ v.cloneElement(r, {
40
- "aria-label": l,
41
- ...r.props,
42
- ...o
43
- }) : /* @__PURE__ */ v.createElement("span", {
44
- "aria-label": l,
45
- ...o
46
- }, r)), [r, {
47
- "aria-label": l,
48
- ...o
49
- }];
50
- }, sa = (e, a, l = xe, t = "Close") => {
51
- const s = ue(e == null ? void 0 : e.closable, e == null ? void 0 : e.closeIcon), c = ue(a == null ? void 0 : a.closable, a == null ? void 0 : a.closeIcon), r = {
52
- closeIcon: /* @__PURE__ */ v.createElement(be, null),
53
- ...l
54
- }, o = aa(s, c, r), u = typeof o != "boolean" ? !!(o != null && o.disabled) : !1;
55
- if (o === !1)
56
- return [!1, null, u, {}];
57
- const [C, i] = la(o, r, t);
58
- return [!0, C, u, i];
59
- }, ra = (e, a, l = xe) => {
60
- const [t] = Me("global", We.global);
61
- return v.useMemo(() => sa(e, a, {
62
- closeIcon: /* @__PURE__ */ v.createElement(be, null),
63
- ...l
64
- }, t.close), [e, a, l, t.close]);
65
- }, ta = (e) => {
66
- const {
67
- paddingXXS: a,
68
- lineWidth: l,
69
- tagPaddingHorizontal: t,
70
- componentCls: s,
71
- calc: c
72
- } = e, r = c(t).sub(l).equal(), o = c(a).sub(l).equal();
73
- return {
74
- // Result
75
- [s]: {
76
- ...Pe(e),
77
- display: "inline-block",
78
- height: "auto",
79
- paddingInline: r,
80
- fontSize: e.tagFontSize,
81
- lineHeight: e.tagLineHeight,
82
- whiteSpace: "nowrap",
83
- backgroundColor: e.defaultBg,
84
- border: `${ge(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
85
- borderRadius: e.borderRadiusSM,
86
- opacity: 1,
87
- transition: `all ${e.motionDurationMid}`,
88
- textAlign: "start",
89
- position: "relative",
90
- // RTL
91
- [`&${s}-rtl`]: {
92
- direction: "rtl"
93
- },
94
- "&, a, a:hover": {
95
- color: e.defaultColor
96
- },
97
- [`${s}-close-icon`]: {
98
- marginInlineStart: o,
99
- fontSize: e.tagIconSize,
100
- color: e.colorIcon,
101
- cursor: "pointer",
102
- transition: `all ${e.motionDurationMid}`,
103
- "&:hover": {
104
- color: e.colorTextHeading
105
- }
106
- },
107
- "&-checkable": {
108
- backgroundColor: "transparent",
109
- borderColor: "transparent",
110
- cursor: "pointer",
111
- [`&:not(${s}-checkable-checked):hover`]: {
112
- color: e.colorPrimary,
113
- backgroundColor: e.colorFillSecondary
114
- },
115
- "&:active, &-checked": {
116
- color: e.colorTextLightSolid
117
- },
118
- "&-checked": {
119
- backgroundColor: e.colorPrimary,
120
- "&:hover": {
121
- backgroundColor: e.colorPrimaryHover
122
- }
123
- },
124
- "&:active": {
125
- backgroundColor: e.colorPrimaryActive
126
- },
127
- "&-disabled": {
128
- cursor: "not-allowed",
129
- [`&:not(${s}-checkable-checked)`]: {
130
- color: e.colorTextDisabled,
131
- "&:hover": {
132
- backgroundColor: "transparent"
133
- }
134
- },
135
- [`&${s}-checkable-checked`]: {
136
- color: e.colorTextDisabled,
137
- backgroundColor: e.colorBgContainerDisabled
138
- },
139
- "&:hover, &:active": {
140
- backgroundColor: e.colorBgContainerDisabled,
141
- color: e.colorTextDisabled
142
- },
143
- [`&:not(${s}-checkable-checked):hover`]: {
144
- color: e.colorTextDisabled
145
- }
146
- },
147
- "&-group": {
148
- display: "flex",
149
- flexWrap: "wrap",
150
- gap: e.paddingXS
151
- }
152
- },
153
- "&-hidden": {
154
- display: "none"
155
- },
156
- // Icons from third-party libraries are a bare `<svg>`, which none of the `.anticon`
157
- // rules reach. An `<svg>` has no baseline of its own, so it is aligned by its bottom
158
- // margin edge (CSS 2.1 §10.8.1) and rides above the text. Centre it instead: unlike an
159
- // `.anticon` (whose `<svg>` is always `1em`, so a fixed `-0.125em` nudge suffices), a
160
- // third-party `<svg>` may be sized in `px`, so the correction must not depend on size.
161
- // `display: inline-block` keeps it an atomic inline box so `vertical-align` still applies even
162
- // under a CSS reset that forces `svg { display: block }` (e.g. Tailwind Preflight), which would
163
- // otherwise drop the icon onto its own line. `vertical-align: middle` centres the margin box on
164
- // the x-height line; `margin-block-end` then lifts it by half its own value onto the cap-height
165
- // centre (capHeight − xHeight ≈ 0.2em across typical fonts), keeping it centred at any icon size.
166
- // Only matches a bare `<svg>`: an `.anticon` keeps its `<svg>` one level deeper.
167
- "> svg": {
168
- display: "inline-block",
169
- verticalAlign: "middle",
170
- marginBlockEnd: "0.2em"
171
- },
172
- // To ensure that a space will be placed between character and `Icon`.
173
- [`> ${e.iconCls} + span, > span + ${e.iconCls}, > svg + span, > span + svg`]: {
174
- marginInlineStart: r
175
- }
176
- },
177
- [`&${e.componentCls}-solid`]: {
178
- borderColor: "transparent",
179
- color: e.colorTextLightSolid,
180
- backgroundColor: e.colorBgSolid,
181
- [`&${s}-default`]: {
182
- color: e.solidTextColor
183
- }
184
- },
185
- [`${s}-filled`]: {
186
- borderColor: "transparent",
187
- backgroundColor: e.tagBorderlessBg
188
- },
189
- [`&${s}-disabled`]: {
190
- color: e.colorTextDisabled,
191
- cursor: "not-allowed",
192
- backgroundColor: e.colorBgContainerDisabled,
193
- a: {
194
- cursor: "not-allowed",
195
- pointerEvents: "none",
196
- color: e.colorTextDisabled,
197
- "&:hover": {
198
- color: e.colorTextDisabled
199
- }
200
- },
201
- "a&": {
202
- "&:hover, &:active": {
203
- color: e.colorTextDisabled
204
- }
205
- },
206
- [`&${s}-outlined`]: {
207
- borderColor: e.colorBorderDisabled
208
- },
209
- [`&${s}-solid, &${s}-filled`]: {
210
- color: e.colorTextDisabled,
211
- [`${s}-close-icon`]: {
212
- color: e.colorTextDisabled
213
- }
214
- },
215
- [`${s}-close-icon`]: {
216
- cursor: "not-allowed",
217
- color: e.colorTextDisabled,
218
- "&:hover": {
219
- color: e.colorTextDisabled
220
- }
221
- }
222
- }
223
- };
224
- }, ee = (e) => {
225
- const {
226
- lineWidth: a,
227
- fontSizeIcon: l,
228
- calc: t
229
- } = e, s = e.fontSizeSM;
230
- return Le(e, {
231
- tagFontSize: s,
232
- tagLineHeight: ge(t(e.lineHeightSM).mul(s).equal()),
233
- tagIconSize: t(l).sub(t(a).mul(2)).equal(),
234
- // Tag icon is much smaller
235
- tagPaddingHorizontal: 8,
236
- // Fixed padding.
237
- tagBorderlessBg: e.defaultBg
238
- });
239
- }, ae = (e) => {
240
- const a = Ae(new _e(e.colorBgSolid), "#fff") ? "#000" : "#fff";
241
- return {
242
- defaultBg: new k(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),
243
- defaultColor: e.colorText,
244
- solidTextColor: a
245
- };
246
- }, le = Fe("Tag", (e) => {
247
- const a = ee(e);
248
- return ta(a);
249
- }, ae), $e = /* @__PURE__ */ d.forwardRef((e, a) => {
250
- const {
251
- prefixCls: l,
252
- style: t,
253
- className: s,
254
- checked: c,
255
- children: r,
256
- icon: o,
257
- onChange: u,
258
- onClick: C,
259
- onKeyDown: i,
260
- disabled: S,
261
- ...z
262
- } = e, {
263
- getPrefixCls: h,
264
- tag: y
265
- } = d.useContext(Ce), H = d.useContext(ye), x = S ?? H, w = (g) => {
266
- x || (u == null || u(!c), C == null || C(g));
267
- }, V = (g) => {
268
- i == null || i(g), !(g.defaultPrevented || x) && g.key === " " && (g.preventDefault(), g.repeat || u == null || u(!c));
269
- }, $ = h("tag", l), [M, W] = le($), D = I($, `${$}-checkable`, {
270
- [`${$}-checkable-checked`]: c,
271
- [`${$}-checkable-disabled`]: x
272
- }, y == null ? void 0 : y.className, s, M, W);
273
- return /* @__PURE__ */ d.createElement("span", {
274
- ...z,
275
- ref: a,
276
- role: "checkbox",
277
- "aria-checked": c,
278
- "aria-disabled": x || void 0,
279
- tabIndex: x ? -1 : 0,
280
- style: {
281
- ...y == null ? void 0 : y.style,
282
- ...t
283
- },
284
- className: D,
285
- onClick: w,
286
- onKeyDown: V
287
- }, o, /* @__PURE__ */ d.createElement("span", null, r));
288
- }), Se = /* @__PURE__ */ v.forwardRef((e, a) => {
289
- const {
290
- id: l,
291
- prefixCls: t,
292
- rootClassName: s,
293
- className: c,
294
- style: r,
295
- classNames: o,
296
- styles: u,
297
- disabled: C,
298
- options: i,
299
- value: S,
300
- defaultValue: z,
301
- onChange: h,
302
- multiple: y,
303
- ...H
304
- } = e, {
305
- getPrefixCls: x,
306
- direction: w,
307
- className: V,
308
- style: $,
309
- classNames: M,
310
- styles: W
311
- } = pe("tag"), D = x("tag", t), g = `${D}-checkable-group`, J = Ke(D), [_, L] = le(D, J), P = U($), O = U(r), [F, K] = he([M, o], [W, P, u, O], {
312
- props: e
313
- }), Q = He(() => Array.isArray(i) ? i.map((m) => me(m) ? m : {
314
- value: m,
315
- label: m
316
- }) : [], [i]), [f, Y] = Oe(z, S), Z = (m, E) => {
317
- let B = null;
318
- if (y) {
319
- const T = f || [];
320
- B = m ? [].concat(qe(T), [E.value]) : T.filter((N) => N !== E.value);
321
- } else
322
- B = m ? E.value : null;
323
- Y(B), h == null || h(B);
324
- }, q = v.useRef(null);
325
- Ve(a, () => ({
326
- nativeElement: q.current
327
- }));
328
- const G = fe(H, {
329
- aria: !0,
330
- data: !0
331
- });
332
- return /* @__PURE__ */ v.createElement("div", {
333
- ...G,
334
- className: I(g, V, s, {
335
- [`${g}-disabled`]: C,
336
- [`${g}-rtl`]: w === "rtl"
337
- }, _, L, c, F.root),
338
- style: K.root,
339
- id: l,
340
- ref: q
341
- }, Q.map((m) => /* @__PURE__ */ v.createElement($e, {
342
- key: m.value,
343
- className: I(`${g}-item`, F.item, m.className),
344
- style: {
345
- ...K.item,
346
- ...m.style
347
- },
348
- checked: y ? (f || []).includes(m.value) : f === m.value,
349
- onChange: (E) => Z(E, m),
350
- disabled: C
351
- }, m.label)));
352
- });
353
- process.env.NODE_ENV !== "production" && (Se.displayName = "CheckableTagGroup");
354
- function oa(e, a) {
355
- const {
356
- color: l,
357
- variant: t,
358
- bordered: s
359
- } = e;
360
- return d.useMemo(() => {
361
- const c = l == null ? void 0 : l.endsWith("-inverse");
362
- let r;
363
- t ? r = t : c ? r = "solid" : s === !1 ? r = "filled" : r = a || "filled";
364
- let o = c ? l == null ? void 0 : l.replace("-inverse", "") : l;
365
- o === void 0 && r === "solid" && (o = "default");
366
- const u = Ge(o), C = Xe(o), i = {};
367
- if (!u && !C && o)
368
- if (r === "solid")
369
- i.backgroundColor = l;
370
- else {
371
- const S = new k(o).toHsl();
372
- S.l = 0.95, i.backgroundColor = new k(S).toHexString(), i.color = l, r === "outlined" && (i.borderColor = l);
373
- }
374
- return [r, o, u, C, i];
375
- }, [l, t, s, a]);
376
- }
377
- const ca = (e) => je(e, (a, {
378
- textColor: l,
379
- lightBorderColor: t,
380
- lightColor: s,
381
- darkColor: c
382
- }) => ({
383
- [`${e.componentCls}${e.componentCls}-${a}:not(${e.componentCls}-disabled)`]: {
384
- [`&${e.componentCls}-outlined`]: {
385
- backgroundColor: s,
386
- borderColor: t,
387
- color: l
388
- },
389
- [`&${e.componentCls}-solid`]: {
390
- backgroundColor: c,
391
- borderColor: c,
392
- color: e.colorTextLightSolid
393
- },
394
- [`&${e.componentCls}-filled`]: {
395
- backgroundColor: s,
396
- color: l
397
- }
398
- }
399
- })), na = ve(["Tag", "preset"], (e) => {
400
- const a = ee(e);
401
- return ca(a);
402
- }, ae);
403
- function da(e) {
404
- return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
405
- }
406
- const X = (e, a, l) => {
407
- const t = da(l);
408
- return {
409
- [`${e.componentCls}${e.componentCls}-${a}:not(${e.componentCls}-disabled)`]: {
410
- [`&${e.componentCls}-outlined`]: {
411
- backgroundColor: e[`color${t}Bg`],
412
- borderColor: e[`color${t}Border`],
413
- color: e[`color${l}`]
414
- },
415
- [`&${e.componentCls}-solid`]: {
416
- backgroundColor: e[`color${l}`],
417
- borderColor: e[`color${l}`]
418
- },
419
- [`&${e.componentCls}-filled`]: {
420
- backgroundColor: e[`color${t}Bg`],
421
- color: e[`color${l}`]
422
- }
423
- }
424
- };
425
- }, ia = ve(["Tag", "status"], (e) => {
426
- const a = ee(e);
427
- return [X(a, "success", "Success"), X(a, "processing", "Info"), X(a, "error", "Error"), X(a, "warning", "Warning")];
428
- }, ae), ua = /* @__PURE__ */ d.forwardRef((e, a) => {
429
- var ne;
430
- const {
431
- prefixCls: l,
432
- className: t,
433
- rootClassName: s,
434
- style: c,
435
- children: r,
436
- icon: o,
437
- color: u,
438
- variant: C,
439
- onClose: i,
440
- bordered: S,
441
- disabled: z,
442
- href: h,
443
- target: y,
444
- styles: H,
445
- classNames: x,
446
- ...w
447
- } = e, {
448
- getPrefixCls: V,
449
- direction: $,
450
- className: M,
451
- variant: W,
452
- style: D,
453
- classNames: g,
454
- styles: J
455
- } = pe("tag");
456
- if (process.env.NODE_ENV !== "production") {
457
- const n = Ue("Tag");
458
- n.deprecated(S !== !1, "bordered={false}", 'variant="filled"'), n.deprecated(!(u != null && u.endsWith("-inverse")), 'color="xxx-inverse"', 'variant="solid"');
459
- }
460
- const [_, L, P, O, F] = oa(e, W), K = P || O, Q = d.useContext(ye), f = z ?? Q, {
461
- tag: Y
462
- } = d.useContext(Ce), [Z, q] = d.useState(!0), G = Je(w, ["closeIcon", "closable"]), m = {
463
- ...e,
464
- color: L,
465
- variant: _,
466
- disabled: f
467
- }, E = U(D), B = U(c), [T, N] = he([g, x], [J, E, H, B], {
468
- props: m
469
- }), Te = d.useMemo(() => {
470
- let n = N.root;
471
- return f || (n = {
472
- ...F,
473
- ...n
474
- }), n;
475
- }, [N.root, F, f]), p = V("tag", l), [Ne, De] = le(p), Ee = I(p, M, T.root, `${p}-${_}`, {
476
- [`${p}-${L}`]: K,
477
- [`${p}-hidden`]: !Z,
478
- [`${p}-rtl`]: $ === "rtl",
479
- [`${p}-disabled`]: f
480
- }, t, s, Ne, De), re = (n) => {
481
- f || (n.stopPropagation(), i == null || i(n), !n.defaultPrevented && (h && n.preventDefault(), q(!1)));
482
- }, te = (n) => {
483
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.repeat || n.currentTarget.click());
484
- }, [, Ie] = ra(ie(e), ie(Y), {
485
- closable: !1,
486
- closeIconRender: (n) => {
487
- const ze = /* @__PURE__ */ d.createElement("span", {
488
- role: "button",
489
- tabIndex: f ? -1 : 0,
490
- "aria-disabled": f || void 0,
491
- className: I(`${p}-close-icon`, T.close),
492
- onClick: re,
493
- onKeyDown: te,
494
- style: N.close
495
- }, n);
496
- return ea(n, ze, (b) => ({
497
- onClick: (R) => {
498
- var A;
499
- (A = b == null ? void 0 : b.onClick) == null || A.call(b, R), re(R);
500
- },
501
- onKeyDown: (R) => {
502
- var A;
503
- (A = b == null ? void 0 : b.onKeyDown) == null || A.call(b, R), R.defaultPrevented || te(R);
504
- },
505
- role: "button",
506
- tabIndex: f ? -1 : 0,
507
- "aria-disabled": f || void 0,
508
- className: I(b == null ? void 0 : b.className, `${p}-close-icon`, T.close),
509
- style: {
510
- ...N.close,
511
- ...b == null ? void 0 : b.style
512
- }
513
- }));
514
- }
515
- }), we = Qe(w.onClick) || r && r.type === "a", oe = Ye(o, {
516
- className: I(/* @__PURE__ */ d.isValidElement(o) ? (ne = o.props) == null ? void 0 : ne.className : void 0, T.icon),
517
- style: N.icon
518
- }), Be = oe ? /* @__PURE__ */ d.createElement(d.Fragment, null, oe, Ze(r) && /* @__PURE__ */ d.createElement("span", {
519
- className: T.content,
520
- style: N.content
521
- }, r)) : r, Re = h ? "a" : "span", ce = /* @__PURE__ */ d.createElement(Re, {
522
- ...G,
523
- ref: a,
524
- className: Ee,
525
- style: Te,
526
- href: f ? void 0 : h,
527
- target: y,
528
- onClick: f ? void 0 : G.onClick,
529
- ...h && f ? {
530
- "aria-disabled": !0
531
- } : {}
532
- }, Be, Ie, P && /* @__PURE__ */ d.createElement(na, {
533
- key: "preset",
534
- prefixCls: p
535
- }), O && /* @__PURE__ */ d.createElement(ia, {
536
- key: "status",
537
- prefixCls: p
538
- }));
539
- return we ? /* @__PURE__ */ d.createElement(ke, {
540
- component: "Tag"
541
- }, ce) : ce;
542
- }), se = ua;
543
- process.env.NODE_ENV !== "production" && (se.displayName = "Tag");
544
- se.CheckableTag = $e;
545
- se.CheckableTagGroup = Se;
546
- export {
547
- se as T,
548
- ie as p,
549
- ra as u
550
- };