@cloudtower/eagle 0.26.10 → 0.26.11

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/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Alert as Alert$1, Badge as Badge$1, Button as Button$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1, Form as Form$1, Modal as Modal$1, Steps as Steps$1, Dropdown, Menu, Progress as Progress$1, Radio as Radio$1, Switch as Switch$1, Table as Table$1, Space, List, Tag as Tag$1, Row, Col, Tree, Divider, Skeleton, Layout, AutoComplete, Popover, Timeline, Typography, Cascader, Upload, Calendar, Tabs, message, Empty as Empty$1, Collapse, TreeSelect, Drawer, ConfigProvider } from 'antd';
1
+ import { Alert as Alert$1, Tooltip as Tooltip$1, Badge as Badge$1, Button as Button$1, Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1, Form as Form$1, Modal as Modal$1, Steps as Steps$1, Dropdown, Menu, Progress as Progress$1, Radio as Radio$1, Switch as Switch$1, Table as Table$1, Space, List, Tag as Tag$1, Row, Col, Tree, Divider, Skeleton, Layout, AutoComplete, Popover, Timeline, Typography, Cascader, Upload, Calendar, Tabs, message, Empty as Empty$1, Collapse, TreeSelect, Drawer, ConfigProvider } from 'antd';
2
2
  export { Col, Row } from 'antd';
3
3
  import * as React from 'react';
4
4
  import React__default, { useState, useMemo, useRef, useCallback, useEffect, forwardRef, Fragment, useLayoutEffect, createContext, memo, useImperativeHandle, useContext } from 'react';
@@ -498,22 +498,6 @@ const Alert = _a => {
498
498
  }));
499
499
  };
500
500
 
501
- const useParrotTranslation = () => {
502
- return useTranslation(void 0, {
503
- i18n: parrotI18n
504
- });
505
- };
506
-
507
- const Arch = (props) => {
508
- const { t } = useParrotTranslation();
509
- const { architecture } = props;
510
- let text = "";
511
- if (architecture) {
512
- text = t(`components.Architecture_${architecture}`);
513
- }
514
- return /* @__PURE__ */ React__default.createElement("span", null, text);
515
- };
516
-
517
501
  var __defProp$P = Object.defineProperty;
518
502
  var __defProps$z = Object.defineProperties;
519
503
  var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
@@ -545,31 +529,126 @@ var __objRest$t = (source, exclude) => {
545
529
  }
546
530
  return target;
547
531
  };
548
- const Badge = (_a) => {
549
- var _b = _a, { type = "error", className } = _b, props = __objRest$t(_b, ["type", "className"]);
532
+ let componentId = 0;
533
+ const Tooltip = (props) => {
534
+ const _a = props, {
535
+ followMouse,
536
+ overlayClassName,
537
+ overlayStyle,
538
+ children
539
+ } = _a, restProps = __objRest$t(_a, [
540
+ "followMouse",
541
+ "overlayClassName",
542
+ "overlayStyle",
543
+ "children"
544
+ ]);
545
+ const id = useRef(++componentId);
546
+ const uniquePopupClass = `kit-popup-${id.current}`;
547
+ const uniqueContainerClass = `kit-tooltip-${id.current}`;
548
+ const _children = useMemo(() => {
549
+ if (followMouse) {
550
+ const child = React__default.isValidElement(children) ? children : /* @__PURE__ */ React__default.createElement("span", null, children);
551
+ return React__default.cloneElement(child, {
552
+ className: cs(child.props.className, uniqueContainerClass)
553
+ });
554
+ } else {
555
+ return children;
556
+ }
557
+ }, [children, followMouse, uniqueContainerClass]);
558
+ const onmousemove = useCallback(
559
+ (event) => {
560
+ const popup = document.querySelector(`.${uniquePopupClass}`);
561
+ if (!popup)
562
+ return;
563
+ popup.style.left = event.pageX + "px";
564
+ popup.style.top = event.pageY + "px";
565
+ },
566
+ [uniquePopupClass]
567
+ );
568
+ useEffect(() => {
569
+ if (followMouse) {
570
+ const container = document.querySelector(
571
+ `.${uniqueContainerClass}`
572
+ );
573
+ container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
574
+ return () => {
575
+ container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
576
+ };
577
+ }
578
+ }, [followMouse, onmousemove, uniqueContainerClass]);
550
579
  return /* @__PURE__ */ React__default.createElement(
551
- Badge$1,
552
- __spreadProps$z(__spreadValues$P({
553
- className: cx(`badge-${type}`, className)
554
- }, props), {
555
- showZero: false
580
+ Tooltip$1,
581
+ __spreadProps$z(__spreadValues$P({}, restProps), {
582
+ overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
583
+ children: _children,
584
+ overlayStyle: followMouse ? __spreadValues$P({
585
+ transform: "translate(-50%, -100%)",
586
+ pointerEvents: "none"
587
+ }, overlayStyle) : overlayStyle
556
588
  })
557
589
  );
558
590
  };
559
591
 
560
- function isEmpty(rawValue) {
561
- if (rawValue === null || rawValue === void 0 || rawValue === MAGIC_METRIC_NULL || Number.isNaN(rawValue) || !Number.isFinite(rawValue)) {
562
- return true;
592
+ const Inline = "i1e4sgug";
593
+ const Truncate = props => {
594
+ const {
595
+ text,
596
+ len = 100,
597
+ frontLen,
598
+ backLen = 4,
599
+ hoverShowFullText = true,
600
+ className,
601
+ inline
602
+ } = props;
603
+ if (len <= 0) {
604
+ console.error("[Truncate] prop len can not be 0 or negative number");
605
+ return null;
563
606
  }
564
- return false;
565
- }
607
+ if (backLen < 0) {
608
+ console.error("[Truncate] prop backLen can not be negative number");
609
+ return null;
610
+ }
611
+ if (frontLen && frontLen < 0) {
612
+ console.error("[Truncate] prop frontLen can not be negative number");
613
+ return null;
614
+ }
615
+ const ellipse = "...";
616
+ let _backLen = Math.min(backLen, text.length - ellipse.length, len - ellipse.length);
617
+ const _frontLen = frontLen !== void 0 ? Math.min(frontLen, text.length - ellipse.length, len - ellipse.length) : Math.max(len - _backLen - ellipse.length, 0);
618
+ if (_frontLen + _backLen + ellipse.length > len) {
619
+ _backLen = len - _frontLen - ellipse.length;
620
+ }
621
+ const truncated = text.length <= len ? text : text.slice(0, _frontLen) + ellipse + text.slice(text.length - _backLen);
622
+ const Text = /* @__PURE__ */React__default.createElement("div", {
623
+ className: cs([className, inline && Inline])
624
+ }, truncated);
625
+ if (!hoverShowFullText || text.length <= len) {
626
+ return Text;
627
+ }
628
+ return /* @__PURE__ */React__default.createElement(Tooltip, {
629
+ title: text
630
+ }, Text);
631
+ };
566
632
 
567
- const Empty = (props) => {
568
- const { className, style } = props;
569
- return /* @__PURE__ */ React__default.createElement("span", { className, style }, "-");
633
+ const useParrotTranslation = () => {
634
+ return useTranslation(void 0, {
635
+ i18n: parrotI18n
636
+ });
637
+ };
638
+
639
+ const Arch = (props) => {
640
+ const { t } = useParrotTranslation();
641
+ const { architecture } = props;
642
+ let text = "";
643
+ if (architecture) {
644
+ text = t(`components.Architecture_${architecture}`);
645
+ }
646
+ return /* @__PURE__ */ React__default.createElement("span", null, text);
570
647
  };
571
648
 
572
649
  var __defProp$O = Object.defineProperty;
650
+ var __defProps$y = Object.defineProperties;
651
+ var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
573
652
  var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
574
653
  var __hasOwnProp$P = Object.prototype.hasOwnProperty;
575
654
  var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
@@ -585,18 +664,41 @@ var __spreadValues$O = (a, b) => {
585
664
  }
586
665
  return a;
587
666
  };
588
- const Bit = ({
589
- rawValue,
590
- decimals,
591
- unitClassName,
592
- valueClassName,
593
- emptyProps
594
- }) => {
595
- if (isEmpty(rawValue)) {
596
- return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$O({}, emptyProps));
667
+ var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
668
+ var __objRest$s = (source, exclude) => {
669
+ var target = {};
670
+ for (var prop in source)
671
+ if (__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0)
672
+ target[prop] = source[prop];
673
+ if (source != null && __getOwnPropSymbols$P)
674
+ for (var prop of __getOwnPropSymbols$P(source)) {
675
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$P.call(source, prop))
676
+ target[prop] = source[prop];
677
+ }
678
+ return target;
679
+ };
680
+ const Badge = (_a) => {
681
+ var _b = _a, { type = "error", className } = _b, props = __objRest$s(_b, ["type", "className"]);
682
+ return /* @__PURE__ */ React__default.createElement(
683
+ Badge$1,
684
+ __spreadProps$y(__spreadValues$O({
685
+ className: cx(`badge-${type}`, className)
686
+ }, props), {
687
+ showZero: false
688
+ })
689
+ );
690
+ };
691
+
692
+ function isEmpty(rawValue) {
693
+ if (rawValue === null || rawValue === void 0 || rawValue === MAGIC_METRIC_NULL || Number.isNaN(rawValue) || !Number.isFinite(rawValue)) {
694
+ return true;
597
695
  }
598
- const { value, unit } = formatBits(rawValue, decimals);
599
- return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
696
+ return false;
697
+ }
698
+
699
+ const Empty = (props) => {
700
+ const { className, style } = props;
701
+ return /* @__PURE__ */ React__default.createElement("span", { className, style }, "-");
600
702
  };
601
703
 
602
704
  var __defProp$N = Object.defineProperty;
@@ -615,17 +717,17 @@ var __spreadValues$N = (a, b) => {
615
717
  }
616
718
  return a;
617
719
  };
618
- const BitPerSeconds = ({
720
+ const Bit = ({
619
721
  rawValue,
620
722
  decimals,
621
- valueClassName,
622
723
  unitClassName,
724
+ valueClassName,
623
725
  emptyProps
624
726
  }) => {
625
727
  if (isEmpty(rawValue)) {
626
728
  return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$N({}, emptyProps));
627
729
  }
628
- const { value, unit } = formatBitPerSecond(rawValue, decimals);
730
+ const { value, unit } = formatBits(rawValue, decimals);
629
731
  return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
630
732
  };
631
733
 
@@ -645,7 +747,7 @@ var __spreadValues$M = (a, b) => {
645
747
  }
646
748
  return a;
647
749
  };
648
- const Bps = ({
750
+ const BitPerSeconds = ({
649
751
  rawValue,
650
752
  decimals,
651
753
  valueClassName,
@@ -655,6 +757,36 @@ const Bps = ({
655
757
  if (isEmpty(rawValue)) {
656
758
  return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$M({}, emptyProps));
657
759
  }
760
+ const { value, unit } = formatBitPerSecond(rawValue, decimals);
761
+ return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
762
+ };
763
+
764
+ var __defProp$L = Object.defineProperty;
765
+ var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
766
+ var __hasOwnProp$M = Object.prototype.hasOwnProperty;
767
+ var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
768
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
769
+ var __spreadValues$L = (a, b) => {
770
+ for (var prop in b || (b = {}))
771
+ if (__hasOwnProp$M.call(b, prop))
772
+ __defNormalProp$L(a, prop, b[prop]);
773
+ if (__getOwnPropSymbols$M)
774
+ for (var prop of __getOwnPropSymbols$M(b)) {
775
+ if (__propIsEnum$M.call(b, prop))
776
+ __defNormalProp$L(a, prop, b[prop]);
777
+ }
778
+ return a;
779
+ };
780
+ const Bps = ({
781
+ rawValue,
782
+ decimals,
783
+ valueClassName,
784
+ unitClassName,
785
+ emptyProps
786
+ }) => {
787
+ if (isEmpty(rawValue)) {
788
+ return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$L({}, emptyProps));
789
+ }
658
790
  const { value, unit } = formatBps(rawValue, decimals);
659
791
  return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
660
792
  };
@@ -794,28 +926,28 @@ const HoverableElement = (props) => {
794
926
  return icon != null ? React__default.cloneElement(icon, { className }) : null;
795
927
  };
796
928
 
797
- var __defProp$L = Object.defineProperty;
798
- var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
799
- var __hasOwnProp$M = Object.prototype.hasOwnProperty;
800
- var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
801
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, {
929
+ var __defProp$K = Object.defineProperty;
930
+ var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
931
+ var __hasOwnProp$L = Object.prototype.hasOwnProperty;
932
+ var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
933
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, {
802
934
  enumerable: true,
803
935
  configurable: true,
804
936
  writable: true,
805
937
  value
806
938
  }) : obj[key] = value;
807
- var __spreadValues$L = (a, b) => {
808
- for (var prop in b || (b = {})) if (__hasOwnProp$M.call(b, prop)) __defNormalProp$L(a, prop, b[prop]);
809
- if (__getOwnPropSymbols$M) for (var prop of __getOwnPropSymbols$M(b)) {
810
- if (__propIsEnum$M.call(b, prop)) __defNormalProp$L(a, prop, b[prop]);
939
+ var __spreadValues$K = (a, b) => {
940
+ for (var prop in b || (b = {})) if (__hasOwnProp$L.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
941
+ if (__getOwnPropSymbols$L) for (var prop of __getOwnPropSymbols$L(b)) {
942
+ if (__propIsEnum$L.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
811
943
  }
812
944
  return a;
813
945
  };
814
- var __objRest$s = (source, exclude) => {
946
+ var __objRest$r = (source, exclude) => {
815
947
  var target = {};
816
- for (var prop in source) if (__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
817
- if (source != null && __getOwnPropSymbols$M) for (var prop of __getOwnPropSymbols$M(source)) {
818
- if (exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop)) target[prop] = source[prop];
948
+ for (var prop in source) if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
949
+ if (source != null && __getOwnPropSymbols$L) for (var prop of __getOwnPropSymbols$L(source)) {
950
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop)) target[prop] = source[prop];
819
951
  }
820
952
  return target;
821
953
  };
@@ -838,11 +970,11 @@ const Button = React__default.forwardRef((props, ref) => {
838
970
  onMouseLeave,
839
971
  size = "middle"
840
972
  } = _a,
841
- restProps = __objRest$s(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
973
+ restProps = __objRest$r(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
842
974
  const [status, setStatus] = useState("normal");
843
975
  const hasIcon = prefixIcon || suffixIcon;
844
976
  const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
845
- return /* @__PURE__ */React__default.createElement(Button$1, __spreadValues$L({
977
+ return /* @__PURE__ */React__default.createElement(Button$1, __spreadValues$K({
846
978
  ref,
847
979
  className: cs(className, ButtonStyle$1, type === "link" && NoPadding, (prefixIcon || suffixIcon) && "has-icon", size === "large" && Typo.Label.l1_regular_title, size === "middle" && Typo.Label.l2_regular_title, size === "small" && Typo.Label.l3_regular_title, type && `ant-btn-${type}`, !children && children !== 0 && restProps.icon && "ant-btn-icon-only"),
848
980
  type: isAntdButtonTypes(type) ? type : void 0,
@@ -872,97 +1004,6 @@ const Button = React__default.forwardRef((props, ref) => {
872
1004
  }));
873
1005
  });
874
1006
 
875
- var __defProp$K = Object.defineProperty;
876
- var __defProps$y = Object.defineProperties;
877
- var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
878
- var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
879
- var __hasOwnProp$L = Object.prototype.hasOwnProperty;
880
- var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
881
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
882
- var __spreadValues$K = (a, b) => {
883
- for (var prop in b || (b = {}))
884
- if (__hasOwnProp$L.call(b, prop))
885
- __defNormalProp$K(a, prop, b[prop]);
886
- if (__getOwnPropSymbols$L)
887
- for (var prop of __getOwnPropSymbols$L(b)) {
888
- if (__propIsEnum$L.call(b, prop))
889
- __defNormalProp$K(a, prop, b[prop]);
890
- }
891
- return a;
892
- };
893
- var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
894
- var __objRest$r = (source, exclude) => {
895
- var target = {};
896
- for (var prop in source)
897
- if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0)
898
- target[prop] = source[prop];
899
- if (source != null && __getOwnPropSymbols$L)
900
- for (var prop of __getOwnPropSymbols$L(source)) {
901
- if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop))
902
- target[prop] = source[prop];
903
- }
904
- return target;
905
- };
906
- let componentId = 0;
907
- const Tooltip = (props) => {
908
- const _a = props, {
909
- followMouse,
910
- overlayClassName,
911
- overlayStyle,
912
- children
913
- } = _a, restProps = __objRest$r(_a, [
914
- "followMouse",
915
- "overlayClassName",
916
- "overlayStyle",
917
- "children"
918
- ]);
919
- const id = useRef(++componentId);
920
- const uniquePopupClass = `kit-popup-${id.current}`;
921
- const uniqueContainerClass = `kit-tooltip-${id.current}`;
922
- const _children = useMemo(() => {
923
- if (followMouse) {
924
- const child = React__default.isValidElement(children) ? children : /* @__PURE__ */ React__default.createElement("span", null, children);
925
- return React__default.cloneElement(child, {
926
- className: cs(child.props.className, uniqueContainerClass)
927
- });
928
- } else {
929
- return children;
930
- }
931
- }, [children, followMouse, uniqueContainerClass]);
932
- const onmousemove = useCallback(
933
- (event) => {
934
- const popup = document.querySelector(`.${uniquePopupClass}`);
935
- if (!popup)
936
- return;
937
- popup.style.left = event.pageX + "px";
938
- popup.style.top = event.pageY + "px";
939
- },
940
- [uniquePopupClass]
941
- );
942
- useEffect(() => {
943
- if (followMouse) {
944
- const container = document.querySelector(
945
- `.${uniqueContainerClass}`
946
- );
947
- container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
948
- return () => {
949
- container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
950
- };
951
- }
952
- }, [followMouse, onmousemove, uniqueContainerClass]);
953
- return /* @__PURE__ */ React__default.createElement(
954
- Tooltip$1,
955
- __spreadProps$y(__spreadValues$K({}, restProps), {
956
- overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
957
- children: _children,
958
- overlayStyle: followMouse ? __spreadValues$K({
959
- transform: "translate(-50%, -100%)",
960
- pointerEvents: "none"
961
- }, overlayStyle) : overlayStyle
962
- })
963
- );
964
- };
965
-
966
1007
  var __defProp$J = Object.defineProperty;
967
1008
  var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
968
1009
  var __hasOwnProp$K = Object.prototype.hasOwnProperty;
@@ -4832,7 +4873,7 @@ const Size$1 = {
4832
4873
  medium: "mfsz1jz"
4833
4874
  };
4834
4875
  const TagStyle$1 = "tnd6h4m";
4835
- const IconStyle = "i1qw4clm";
4876
+ const IconStyle$1 = "i1qw4clm";
4836
4877
 
4837
4878
  var __defProp$5 = Object.defineProperty;
4838
4879
  var __defProps$5 = Object.defineProperties;
@@ -4883,7 +4924,7 @@ const SplitTag = _a => {
4883
4924
  [`ant-tag-${color}`]: PresetColors$2.includes(color)
4884
4925
  }, "inside-tag")
4885
4926
  }, icon && /* @__PURE__ */React__default.createElement("span", {
4886
- className: cs("ui-kit-tag-icon", IconStyle)
4927
+ className: cs("ui-kit-tag-icon", IconStyle$1)
4887
4928
  }, icon), primaryContent), secondaryContent);
4888
4929
  };
4889
4930
 
@@ -4918,7 +4959,18 @@ var __objRest$1 = (source, exclude) => {
4918
4959
  }
4919
4960
  return target;
4920
4961
  };
4921
- const PresetColors$1 = [...PresetColors$2, "red-ontint", "green-ontint"];
4962
+ const PresetColors$1 = [
4963
+ ...PresetColors$2,
4964
+ "red-ontint",
4965
+ "green-ontint"
4966
+ ];
4967
+ const AntdColorMap = {
4968
+ processing: "blue",
4969
+ success: "green",
4970
+ error: "red",
4971
+ warn: "yellow",
4972
+ default: "gray"
4973
+ };
4922
4974
  const Tag = (_a) => {
4923
4975
  var _b = _a, {
4924
4976
  size = "small",
@@ -4935,17 +4987,18 @@ const Tag = (_a) => {
4935
4987
  "icon",
4936
4988
  "children"
4937
4989
  ]);
4990
+ const computedColor = AntdColorMap[color] || color;
4938
4991
  return /* @__PURE__ */ React__default.createElement(
4939
4992
  Tag$1,
4940
4993
  __spreadProps$4(__spreadValues$4({}, props), {
4941
4994
  className: cs(className, Size$1[size], TagStyle$1, Typo.Label.l4_regular, {
4942
- [`ant-tag-${color}`]: PresetColors$1.includes(color),
4995
+ [`ant-tag-${computedColor}`]: PresetColors$1.includes(computedColor),
4943
4996
  "tag-hover": hoverable
4944
4997
  }),
4945
4998
  closable: false,
4946
- color: color === "gray" ? void 0 : color
4999
+ color: computedColor === "gray" ? void 0 : computedColor
4947
5000
  }),
4948
- icon && /* @__PURE__ */ React__default.createElement("span", { className: cs("ui-kit-tag-icon", IconStyle) }, icon),
5001
+ icon && /* @__PURE__ */ React__default.createElement("span", { className: IconStyle$1 }, icon),
4949
5002
  children
4950
5003
  );
4951
5004
  };
@@ -5101,6 +5154,8 @@ const TimeZoneOption = ({
5101
5154
  })));
5102
5155
  };
5103
5156
 
5157
+ const IconStyle = "iwsze0q";
5158
+
5104
5159
  var __defProp$3 = Object.defineProperty;
5105
5160
  var __defProps$3 = Object.defineProperties;
5106
5161
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
@@ -5142,9 +5197,11 @@ const Token = _a => {
5142
5197
  size = "small",
5143
5198
  color = "gray",
5144
5199
  className,
5145
- checked
5200
+ icon,
5201
+ checked,
5202
+ children
5146
5203
  } = _b,
5147
- props = __objRest(_b, ["size", "color", "className", "checked"]);
5204
+ props = __objRest(_b, ["size", "color", "className", "icon", "checked", "children"]);
5148
5205
  return /* @__PURE__ */React__default.createElement(Tag$1, __spreadProps$3(__spreadValues$3({}, props), {
5149
5206
  className: cs(className, Size[size], TokenStyle, {
5150
5207
  [Typo.Label.l4_regular]: size === "small" || size === "medium",
@@ -5158,7 +5215,9 @@ const Token = _a => {
5158
5215
  iconWidth: 16
5159
5216
  }),
5160
5217
  color: color === "gray" ? void 0 : color
5161
- }));
5218
+ }), icon && /* @__PURE__ */React__default.createElement("span", {
5219
+ className: cs("ui-kit-tag-icon", IconStyle)
5220
+ }, icon), children);
5162
5221
  };
5163
5222
 
5164
5223
  function getAntdKit() {
@@ -5251,7 +5310,8 @@ function getAntdKit() {
5251
5310
  antdTreeSelect: TreeSelect,
5252
5311
  antdDrawer: Drawer,
5253
5312
  antdSteps: Steps$1,
5254
- card: Card
5313
+ card: Card,
5314
+ truncate: Truncate
5255
5315
  };
5256
5316
  kit.option.isSelectOption = true;
5257
5317
  kit.button.__ANT_BUTTON = true;
@@ -5561,4 +5621,4 @@ const useUIKit = () => {
5561
5621
  return useContext(kitContext);
5562
5622
  };
5563
5623
 
5564
- export { Architecture, BaseIcon, Button, ButtonStyle, FailedLoad, FullView, Icon, InputTagItem, KitStoreProvider, ModalActions, ModalStack, Typo, UIKitProvider, UIKitStore, ValidateTriggerType, WizardBody, antdKit, closeModal, createBatchMessageMethods, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
5624
+ export { Architecture, BaseIcon, Button, ButtonStyle, FailedLoad, FullView, Icon, InputTagItem, KitStoreProvider, ModalActions, ModalStack, Truncate, Typo, UIKitProvider, UIKitStore, ValidateTriggerType, WizardBody, antdKit, closeModal, createBatchMessageMethods, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };