@cloudtower/eagle 0.25.19 → 0.25.22

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.
@@ -1,3 +1,3 @@
1
- import { UnitFn } from "../../spec";
2
- declare const Percent: UnitFn;
1
+ import { PercentFn } from "../../spec";
2
+ declare const Percent: PercentFn;
3
3
  export default Percent;
@@ -1881,89 +1881,6 @@ html body {
1881
1881
  position: absolute;
1882
1882
  }
1883
1883
 
1884
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal {
1885
- flex-direction: row;
1886
- justify-content: stretch;
1887
- }
1888
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item {
1889
- padding: 0;
1890
- margin-right: 4px;
1891
- flex: 1;
1892
- overflow: visible;
1893
- }
1894
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-tail, .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-icon {
1895
- display: none;
1896
- }
1897
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content {
1898
- width: 100%;
1899
- min-height: unset;
1900
- }
1901
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title {
1902
- height: 26px;
1903
- line-height: 26px;
1904
- width: 100%;
1905
- text-align: center;
1906
- padding: 0;
1907
- font-size: 12px;
1908
- font-weight: normal;
1909
- }
1910
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title .step-count {
1911
- margin-right: 10px;
1912
- }
1913
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title::after {
1914
- display: none;
1915
- }
1916
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child .ant-steps-item-container {
1917
- border-radius: 4px 0 0 4px;
1918
- }
1919
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child {
1920
- margin-right: 0;
1921
- }
1922
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child .ant-steps-item-container {
1923
- border-radius: 0 4px 4px 0;
1924
- }
1925
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:not(.s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child)::after {
1926
- content: "";
1927
- width: 0;
1928
- height: 0;
1929
- border: 13px solid transparent;
1930
- position: absolute;
1931
- top: 0;
1932
- border-left: 8px solid rgba(237, 241, 250, 0.6);
1933
- right: -21px;
1934
- z-index: 2;
1935
- }
1936
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:not(.s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child)::before {
1937
- content: "";
1938
- width: 0;
1939
- height: 0;
1940
- border: 13px solid transparent;
1941
- position: absolute;
1942
- top: 0;
1943
- border-left: 8px solid #fff;
1944
- left: 0;
1945
- }
1946
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active .ant-steps-item-container {
1947
- background-color: rgba(0, 136, 255, 0.1);
1948
- }
1949
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active::after {
1950
- border-left-color: rgba(0, 136, 255, 0.1) !important;
1951
- }
1952
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active .ant-steps-item-title {
1953
- color: #005ed1;
1954
- }
1955
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-wait .ant-steps-item-container,
1956
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-finish .ant-steps-item-container {
1957
- background-color: rgba(237, 241, 250, 0.6);
1958
- }
1959
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-wait .ant-steps-item-title,
1960
- .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-finish .ant-steps-item-title {
1961
- color: rgba(44, 56, 82, 0.6);
1962
- }
1963
- .s3mgie3 .ant-steps:not(.ant-steps-dot):not(.ant-steps-navigation):not(.ant-steps-vertical) .ant-steps-item {
1964
- padding: 0;
1965
- }
1966
-
1967
1884
  .p12gwtiw {
1968
1885
  display: flex;
1969
1886
  justify-content: space-between;
@@ -2021,61 +1938,6 @@ html body {
2021
1938
  line-height: 18px;
2022
1939
  }
2023
1940
 
2024
- .s34f1qb.ant-switch {
2025
- min-width: 40px;
2026
- height: 24px;
2027
- background: rgba(172, 186, 211, 0.6);
2028
- overflow: hidden;
2029
- }
2030
- .s34f1qb.ant-switch:focus {
2031
- box-shadow: 0 0 0 2px rgba(225, 230, 241, 0.6);
2032
- }
2033
- .s34f1qb.ant-switch-small {
2034
- min-width: 26px;
2035
- height: 16px;
2036
- }
2037
- .s34f1qb.ant-switch-large {
2038
- min-width: 52px;
2039
- height: 32px;
2040
- }
2041
- .s34f1qb.ant-switch .ant-switch-handle {
2042
- height: 20px;
2043
- width: 20px;
2044
- }
2045
- .s34f1qb.ant-switch .ant-switch-handle::before {
2046
- border-radius: 10px;
2047
- transition-delay: 120ms;
2048
- }
2049
- .s34f1qb.ant-switch-small .ant-switch-handle {
2050
- height: 14px;
2051
- width: 14px;
2052
- top: 1px;
2053
- left: 1px;
2054
- }
2055
- .s34f1qb.ant-switch-large .ant-switch-handle {
2056
- height: 28px;
2057
- width: 28px;
2058
- }
2059
- .s34f1qb.ant-switch-large .ant-switch-handle::before {
2060
- border-radius: 14px;
2061
- }
2062
- .s34f1qb.ant-switch-checked {
2063
- background-color: #00ba5d;
2064
- }
2065
- .s34f1qb.ant-switch-checked .ant-switch-handle {
2066
- left: calc(100% - 20px - 2px);
2067
- }
2068
- .s34f1qb.ant-switch-small.ant-switch-checked .ant-switch-handle {
2069
- left: calc(100% - 14px - 1px);
2070
- }
2071
- .s34f1qb.ant-switch-large.ant-switch-checked .ant-switch-handle {
2072
- left: calc(100% - 28px - 2px);
2073
- }
2074
-
2075
- .c1to9vb9 {
2076
- margin-left: 5px;
2077
- }
2078
-
2079
1941
  .rxbeqvl.ant-radio-wrapper {
2080
1942
  display: inline-flex;
2081
1943
  align-items: baseline;
@@ -2217,6 +2079,89 @@ html body {
2217
2079
  width: 36px;
2218
2080
  }
2219
2081
 
2082
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal {
2083
+ flex-direction: row;
2084
+ justify-content: stretch;
2085
+ }
2086
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item {
2087
+ padding: 0;
2088
+ margin-right: 4px;
2089
+ flex: 1;
2090
+ overflow: visible;
2091
+ }
2092
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-tail, .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-icon {
2093
+ display: none;
2094
+ }
2095
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content {
2096
+ width: 100%;
2097
+ min-height: unset;
2098
+ }
2099
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title {
2100
+ height: 26px;
2101
+ line-height: 26px;
2102
+ width: 100%;
2103
+ text-align: center;
2104
+ padding: 0;
2105
+ font-size: 12px;
2106
+ font-weight: normal;
2107
+ }
2108
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title .step-count {
2109
+ margin-right: 10px;
2110
+ }
2111
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item .ant-steps-item-content .ant-steps-item-title::after {
2112
+ display: none;
2113
+ }
2114
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child .ant-steps-item-container {
2115
+ border-radius: 4px 0 0 4px;
2116
+ }
2117
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child {
2118
+ margin-right: 0;
2119
+ }
2120
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child .ant-steps-item-container {
2121
+ border-radius: 0 4px 4px 0;
2122
+ }
2123
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:not(.s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:last-child)::after {
2124
+ content: "";
2125
+ width: 0;
2126
+ height: 0;
2127
+ border: 13px solid transparent;
2128
+ position: absolute;
2129
+ top: 0;
2130
+ border-left: 8px solid rgba(237, 241, 250, 0.6);
2131
+ right: -21px;
2132
+ z-index: 2;
2133
+ }
2134
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:not(.s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child)::before {
2135
+ content: "";
2136
+ width: 0;
2137
+ height: 0;
2138
+ border: 13px solid transparent;
2139
+ position: absolute;
2140
+ top: 0;
2141
+ border-left: 8px solid #fff;
2142
+ left: 0;
2143
+ }
2144
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active .ant-steps-item-container {
2145
+ background-color: rgba(0, 136, 255, 0.1);
2146
+ }
2147
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active::after {
2148
+ border-left-color: rgba(0, 136, 255, 0.1) !important;
2149
+ }
2150
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-active .ant-steps-item-title {
2151
+ color: #005ed1;
2152
+ }
2153
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-wait .ant-steps-item-container,
2154
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-finish .ant-steps-item-container {
2155
+ background-color: rgba(237, 241, 250, 0.6);
2156
+ }
2157
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-wait .ant-steps-item-title,
2158
+ .s3mgie3 .ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item-finish .ant-steps-item-title {
2159
+ color: rgba(44, 56, 82, 0.6);
2160
+ }
2161
+ .s3mgie3 .ant-steps:not(.ant-steps-dot):not(.ant-steps-navigation):not(.ant-steps-vertical) .ant-steps-item {
2162
+ padding: 0;
2163
+ }
2164
+
2220
2165
  .cz04yix {
2221
2166
  display: flex;
2222
2167
  flex-direction: column;
@@ -2882,6 +2827,61 @@ input.rrg1fkn.ant-input {
2882
2827
  border-bottom-left-radius: 0;
2883
2828
  }
2884
2829
 
2830
+ .s34f1qb.ant-switch {
2831
+ min-width: 40px;
2832
+ height: 24px;
2833
+ background: rgba(172, 186, 211, 0.6);
2834
+ overflow: hidden;
2835
+ }
2836
+ .s34f1qb.ant-switch:focus {
2837
+ box-shadow: 0 0 0 2px rgba(225, 230, 241, 0.6);
2838
+ }
2839
+ .s34f1qb.ant-switch-small {
2840
+ min-width: 26px;
2841
+ height: 16px;
2842
+ }
2843
+ .s34f1qb.ant-switch-large {
2844
+ min-width: 52px;
2845
+ height: 32px;
2846
+ }
2847
+ .s34f1qb.ant-switch .ant-switch-handle {
2848
+ height: 20px;
2849
+ width: 20px;
2850
+ }
2851
+ .s34f1qb.ant-switch .ant-switch-handle::before {
2852
+ border-radius: 10px;
2853
+ transition-delay: 120ms;
2854
+ }
2855
+ .s34f1qb.ant-switch-small .ant-switch-handle {
2856
+ height: 14px;
2857
+ width: 14px;
2858
+ top: 1px;
2859
+ left: 1px;
2860
+ }
2861
+ .s34f1qb.ant-switch-large .ant-switch-handle {
2862
+ height: 28px;
2863
+ width: 28px;
2864
+ }
2865
+ .s34f1qb.ant-switch-large .ant-switch-handle::before {
2866
+ border-radius: 14px;
2867
+ }
2868
+ .s34f1qb.ant-switch-checked {
2869
+ background-color: #00ba5d;
2870
+ }
2871
+ .s34f1qb.ant-switch-checked .ant-switch-handle {
2872
+ left: calc(100% - 20px - 2px);
2873
+ }
2874
+ .s34f1qb.ant-switch-small.ant-switch-checked .ant-switch-handle {
2875
+ left: calc(100% - 14px - 1px);
2876
+ }
2877
+ .s34f1qb.ant-switch-large.ant-switch-checked .ant-switch-handle {
2878
+ left: calc(100% - 28px - 2px);
2879
+ }
2880
+
2881
+ .c1to9vb9 {
2882
+ margin-left: 5px;
2883
+ }
2884
+
2885
2885
  .t1upn1sz {
2886
2886
  height: 100%;
2887
2887
  }
@@ -3876,6 +3876,20 @@ input.rrg1fkn.ant-input {
3876
3876
  margin-left: 24px;
3877
3877
  }
3878
3878
 
3879
+ .igz4le8 {
3880
+ height: 24px;
3881
+ width: 56px !important;
3882
+ margin-right: 4px;
3883
+ }
3884
+
3885
+ .c1riexje {
3886
+ color: rgba(44, 56, 82, 0.6);
3887
+ }
3888
+
3889
+ .iiqau4c.ant-input-group.ant-input-group-compact {
3890
+ display: flex;
3891
+ }
3892
+
3879
3893
  .shq1k1g.ant-select, .shq1k1g.ant-select .ant-select-selector {
3880
3894
  border-radius: 6px;
3881
3895
  }
@@ -3931,20 +3945,6 @@ input.rrg1fkn.ant-input {
3931
3945
  transform: rotate(180deg);
3932
3946
  }
3933
3947
 
3934
- .igz4le8 {
3935
- height: 24px;
3936
- width: 56px !important;
3937
- margin-right: 4px;
3938
- }
3939
-
3940
- .c1riexje {
3941
- color: rgba(44, 56, 82, 0.6);
3942
- }
3943
-
3944
- .iiqau4c.ant-input-group.ant-input-group-compact {
3945
- display: flex;
3946
- }
3947
-
3948
3948
  .m1thnes4 {
3949
3949
  color: rgba(44, 56, 82, 0.6);
3950
3950
  text-align: center;
package/dist/esm/index.js CHANGED
@@ -172,12 +172,17 @@ function formatBytes(bytes, decimals = 2) {
172
172
  unit: units[i]
173
173
  };
174
174
  }
175
- function formatPercent(input, decimals = 2) {
176
- if (input <= 0 || input === MAGIC_METRIC_NULL) {
175
+ function formatPercent(input, decimals = 2, saturated = true) {
176
+ if (input === MAGIC_METRIC_NULL) {
177
177
  input = 0;
178
178
  }
179
- if (input > 100) {
180
- input = 100;
179
+ if (saturated) {
180
+ if (input <= 0) {
181
+ input = 0;
182
+ }
183
+ if (input > 100) {
184
+ input = 100;
185
+ }
181
186
  }
182
187
  const value = input.toFixed(decimals);
183
188
  if (parseFloat(value) === 0 && input > 0) {
@@ -3066,6 +3071,7 @@ var __spreadValues$h = (a, b) => {
3066
3071
  const Percent = ({
3067
3072
  rawValue,
3068
3073
  decimals,
3074
+ saturated,
3069
3075
  valueClassName,
3070
3076
  unitClassName,
3071
3077
  emptyProps
@@ -3073,7 +3079,7 @@ const Percent = ({
3073
3079
  if (isEmpty(rawValue)) {
3074
3080
  return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$h({}, emptyProps));
3075
3081
  }
3076
- const { value, unit } = formatPercent(rawValue, decimals);
3082
+ const { value, unit } = formatPercent(rawValue, decimals, saturated);
3077
3083
  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));
3078
3084
  };
3079
3085