@cloudtower/eagle 0.22.5 → 0.22.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -131,6 +131,92 @@
131
131
  }
132
132
  };
133
133
 
134
+ const HoverableElement = (props) => {
135
+ const { className, hover = false, icon, hoverEle } = props;
136
+ if (hover) {
137
+ return hoverEle != null ? React.cloneElement(hoverEle, { className }) : null;
138
+ }
139
+ return icon != null ? React.cloneElement(icon, { className }) : null;
140
+ };
141
+
142
+ var __defProp$s = Object.defineProperty;
143
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
144
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
145
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
146
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, {
147
+ enumerable: true,
148
+ configurable: true,
149
+ writable: true,
150
+ value
151
+ }) : obj[key] = value;
152
+ var __spreadValues$s = (a, b) => {
153
+ for (var prop in b || (b = {})) if (__hasOwnProp$t.call(b, prop)) __defNormalProp$s(a, prop, b[prop]);
154
+ if (__getOwnPropSymbols$t) for (var prop of __getOwnPropSymbols$t(b)) {
155
+ if (__propIsEnum$t.call(b, prop)) __defNormalProp$s(a, prop, b[prop]);
156
+ }
157
+ return a;
158
+ };
159
+ var __objRest$n = (source, exclude) => {
160
+ var target = {};
161
+ for (var prop in source) if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
162
+ if (source != null && __getOwnPropSymbols$t) for (var prop of __getOwnPropSymbols$t(source)) {
163
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop)) target[prop] = source[prop];
164
+ }
165
+ return target;
166
+ };
167
+ const ButtonStyle$1 = "buj61ew";
168
+ const NoPadding = "nchllas";
169
+ const isAntdButtonTypes = type => {
170
+ return Boolean(type && ["default", "primary", "ghost", "dashed", "link", "text"].includes(type));
171
+ };
172
+ const Button = React.forwardRef((props, ref) => {
173
+ const _a = props,
174
+ {
175
+ type,
176
+ className,
177
+ children,
178
+ prefixIcon,
179
+ hoverPrefixIcon,
180
+ suffixIcon,
181
+ hoverSuffixIcon,
182
+ onMouseEnter,
183
+ onMouseLeave,
184
+ size = "middle"
185
+ } = _a,
186
+ restProps = __objRest$n(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
187
+ const [status, setStatus] = React.useState("normal");
188
+ const hasIcon = prefixIcon || suffixIcon;
189
+ const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
190
+ return /* @__PURE__ */React.createElement(antd.Button, __spreadValues$s({
191
+ ref,
192
+ 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"),
193
+ type: isAntdButtonTypes(type) ? type : void 0,
194
+ onMouseEnter: e => {
195
+ onMouseEnter == null ? void 0 : onMouseEnter(e);
196
+ if (hasIcon && hasHoverIcon) {
197
+ setStatus("hover");
198
+ }
199
+ },
200
+ onMouseLeave: e => {
201
+ onMouseLeave == null ? void 0 : onMouseLeave(e);
202
+ if (hasIcon && hasHoverIcon) {
203
+ setStatus("normal");
204
+ }
205
+ },
206
+ size
207
+ }, restProps), prefixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
208
+ icon: prefixIcon,
209
+ hoverEle: hoverPrefixIcon,
210
+ hover: status === "hover",
211
+ className: "button-prefix-icon"
212
+ }), children, suffixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
213
+ icon: suffixIcon,
214
+ hoverEle: hoverSuffixIcon,
215
+ hover: status === "hover",
216
+ className: "button-suffix-icon"
217
+ }));
218
+ });
219
+
134
220
  var __defProp$r = Object.defineProperty;
135
221
  var __defProps$k = Object.defineProperties;
136
222
  var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
@@ -1151,6 +1237,9 @@
1151
1237
  const HOUR = 60 * MINUTE;
1152
1238
  const DAY = 24 * HOUR;
1153
1239
 
1240
+ const EMPTY_FUNCTION = () => {
1241
+ };
1242
+
1154
1243
  function getSize(el) {
1155
1244
  if (!el) {
1156
1245
  return {
@@ -2161,92 +2250,6 @@
2161
2250
  });
2162
2251
  }
2163
2252
 
2164
- const HoverableElement = (props) => {
2165
- const { className, hover = false, icon, hoverEle } = props;
2166
- if (hover) {
2167
- return hoverEle != null ? React.cloneElement(hoverEle, { className }) : null;
2168
- }
2169
- return icon != null ? React.cloneElement(icon, { className }) : null;
2170
- };
2171
-
2172
- var __defProp$5 = Object.defineProperty;
2173
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2174
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2175
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2176
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
2177
- enumerable: true,
2178
- configurable: true,
2179
- writable: true,
2180
- value
2181
- }) : obj[key] = value;
2182
- var __spreadValues$5 = (a, b) => {
2183
- for (var prop in b || (b = {})) if (__hasOwnProp$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
2184
- if (__getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(b)) {
2185
- if (__propIsEnum$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
2186
- }
2187
- return a;
2188
- };
2189
- var __objRest$4 = (source, exclude) => {
2190
- var target = {};
2191
- for (var prop in source) if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
2192
- if (source != null && __getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(source)) {
2193
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop)) target[prop] = source[prop];
2194
- }
2195
- return target;
2196
- };
2197
- const ButtonStyle$1 = "buj61ew";
2198
- const NoPadding = "nchllas";
2199
- const isAntdButtonTypes = type => {
2200
- return Boolean(type && ["default", "primary", "ghost", "dashed", "link", "text"].includes(type));
2201
- };
2202
- const Button = React.forwardRef((props, ref) => {
2203
- const _a = props,
2204
- {
2205
- type,
2206
- className,
2207
- children,
2208
- prefixIcon,
2209
- hoverPrefixIcon,
2210
- suffixIcon,
2211
- hoverSuffixIcon,
2212
- onMouseEnter,
2213
- onMouseLeave,
2214
- size = "middle"
2215
- } = _a,
2216
- restProps = __objRest$4(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
2217
- const [status, setStatus] = React.useState("normal");
2218
- const hasIcon = prefixIcon || suffixIcon;
2219
- const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
2220
- return /* @__PURE__ */React.createElement(antd.Button, __spreadValues$5({
2221
- ref,
2222
- 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"),
2223
- type: isAntdButtonTypes(type) ? type : void 0,
2224
- onMouseEnter: e => {
2225
- onMouseEnter == null ? void 0 : onMouseEnter(e);
2226
- if (hasIcon && hasHoverIcon) {
2227
- setStatus("hover");
2228
- }
2229
- },
2230
- onMouseLeave: e => {
2231
- onMouseLeave == null ? void 0 : onMouseLeave(e);
2232
- if (hasIcon && hasHoverIcon) {
2233
- setStatus("normal");
2234
- }
2235
- },
2236
- size
2237
- }, restProps), prefixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
2238
- icon: prefixIcon,
2239
- hoverEle: hoverPrefixIcon,
2240
- hover: status === "hover",
2241
- className: "button-prefix-icon"
2242
- }), children, suffixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
2243
- icon: suffixIcon,
2244
- hoverEle: hoverSuffixIcon,
2245
- hover: status === "hover",
2246
- className: "button-suffix-icon"
2247
- }));
2248
- });
2249
-
2250
2253
  const ctx = React.createContext({
2251
2254
  store,
2252
2255
  storeState: store.getState()
@@ -2258,33 +2261,33 @@
2258
2261
  const useKitDispatch = reactRedux.createDispatchHook(ctx);
2259
2262
  const useKitSelector = reactRedux.createSelectorHook(ctx);
2260
2263
 
2261
- var __defProp$4 = Object.defineProperty;
2264
+ var __defProp$5 = Object.defineProperty;
2262
2265
  var __defProps$2 = Object.defineProperties;
2263
2266
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2264
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2265
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2266
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2267
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2268
- var __spreadValues$4 = (a, b) => {
2267
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2268
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2269
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2270
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2271
+ var __spreadValues$5 = (a, b) => {
2269
2272
  for (var prop in b || (b = {}))
2270
- if (__hasOwnProp$4.call(b, prop))
2271
- __defNormalProp$4(a, prop, b[prop]);
2272
- if (__getOwnPropSymbols$4)
2273
- for (var prop of __getOwnPropSymbols$4(b)) {
2274
- if (__propIsEnum$4.call(b, prop))
2275
- __defNormalProp$4(a, prop, b[prop]);
2273
+ if (__hasOwnProp$5.call(b, prop))
2274
+ __defNormalProp$5(a, prop, b[prop]);
2275
+ if (__getOwnPropSymbols$5)
2276
+ for (var prop of __getOwnPropSymbols$5(b)) {
2277
+ if (__propIsEnum$5.call(b, prop))
2278
+ __defNormalProp$5(a, prop, b[prop]);
2276
2279
  }
2277
2280
  return a;
2278
2281
  };
2279
2282
  var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2280
- var __objRest$3 = (source, exclude) => {
2283
+ var __objRest$4 = (source, exclude) => {
2281
2284
  var target = {};
2282
2285
  for (var prop in source)
2283
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
2286
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
2284
2287
  target[prop] = source[prop];
2285
- if (source != null && __getOwnPropSymbols$4)
2286
- for (var prop of __getOwnPropSymbols$4(source)) {
2287
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
2288
+ if (source != null && __getOwnPropSymbols$5)
2289
+ for (var prop of __getOwnPropSymbols$5(source)) {
2290
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
2288
2291
  target[prop] = source[prop];
2289
2292
  }
2290
2293
  return target;
@@ -2310,7 +2313,7 @@
2310
2313
  showCancel = true,
2311
2314
  showOk = true,
2312
2315
  afterClose
2313
- } = _a, restProps = __objRest$3(_a, [
2316
+ } = _a, restProps = __objRest$4(_a, [
2314
2317
  "error",
2315
2318
  "okText",
2316
2319
  "cancelText",
@@ -2365,7 +2368,7 @@
2365
2368
  }
2366
2369
  return /* @__PURE__ */ React.createElement(
2367
2370
  antd.Modal,
2368
- __spreadProps$2(__spreadValues$4({
2371
+ __spreadProps$2(__spreadValues$5({
2369
2372
  maskClosable,
2370
2373
  className: cs(
2371
2374
  className,
@@ -2400,7 +2403,7 @@
2400
2403
  prevText
2401
2404
  ), error && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React.createElement(
2402
2405
  Button,
2403
- __spreadValues$4({
2406
+ __spreadValues$5({
2404
2407
  type: "quiet",
2405
2408
  onMouseDown: (e) => {
2406
2409
  e.preventDefault();
@@ -2414,7 +2417,7 @@
2414
2417
  cancelText
2415
2418
  ), showOk && /* @__PURE__ */ React.createElement(
2416
2419
  Button,
2417
- __spreadValues$4({
2420
+ __spreadValues$5({
2418
2421
  onClick: (e) => {
2419
2422
  var _a2, _b2;
2420
2423
  onOk == null ? void 0 : onOk(e);
@@ -2461,6 +2464,133 @@
2461
2464
  );
2462
2465
  };
2463
2466
 
2467
+ var __defProp$4 = Object.defineProperty;
2468
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2469
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2470
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2471
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
2472
+ enumerable: true,
2473
+ configurable: true,
2474
+ writable: true,
2475
+ value
2476
+ }) : obj[key] = value;
2477
+ var __spreadValues$4 = (a, b) => {
2478
+ for (var prop in b || (b = {})) if (__hasOwnProp$4.call(b, prop)) __defNormalProp$4(a, prop, b[prop]);
2479
+ if (__getOwnPropSymbols$4) for (var prop of __getOwnPropSymbols$4(b)) {
2480
+ if (__propIsEnum$4.call(b, prop)) __defNormalProp$4(a, prop, b[prop]);
2481
+ }
2482
+ return a;
2483
+ };
2484
+ var __objRest$3 = (source, exclude) => {
2485
+ var target = {};
2486
+ for (var prop in source) if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
2487
+ if (source != null && __getOwnPropSymbols$4) for (var prop of __getOwnPropSymbols$4(source)) {
2488
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop)) target[prop] = source[prop];
2489
+ }
2490
+ return target;
2491
+ };
2492
+ const RadioStyle = "rxbeqvl";
2493
+ const RadioGroupStyle = "r5ie79y";
2494
+ const RadioButtonStyle = "r1f0aqcc";
2495
+ const KitRadioGroupContext = React.createContext({});
2496
+ const Radio = _a => {
2497
+ var _b = _a,
2498
+ {
2499
+ children,
2500
+ className,
2501
+ checked,
2502
+ compact = false
2503
+ } = _b,
2504
+ props = __objRest$3(_b, ["children", "className", "checked", "compact"]);
2505
+ const {
2506
+ description
2507
+ } = props;
2508
+ const context = React.useContext(KitRadioGroupContext);
2509
+ if (description) {
2510
+ children = /* @__PURE__ */React.createElement(React.Fragment, null, children, /* @__PURE__ */React.createElement("div", {
2511
+ className: core.cx("radio-description", Typo.Label.l4_regular)
2512
+ }, description));
2513
+ }
2514
+ return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(antd.Radio, __spreadValues$4({
2515
+ className: core.cx(className, RadioStyle, compact && "compact"),
2516
+ checked: checked || false,
2517
+ "data-test": context.name ? `${context.name}-${String(props.value)}` : String(props.value)
2518
+ }, props), children ? children : null));
2519
+ };
2520
+ const RadioGroup = _c => {
2521
+ var _d = _c,
2522
+ {
2523
+ children,
2524
+ className
2525
+ } = _d,
2526
+ props = __objRest$3(_d, ["children", "className"]);
2527
+ return /* @__PURE__ */React.createElement(KitRadioGroupContext.Provider, {
2528
+ value: {
2529
+ disabled: props.disabled,
2530
+ name: props.name
2531
+ }
2532
+ }, /* @__PURE__ */React.createElement(antd.Radio.Group, __spreadValues$4({
2533
+ className: core.cx(className, RadioGroupStyle)
2534
+ }, props), children ? children : null));
2535
+ };
2536
+ const RadioButton = _e => {
2537
+ var _f = _e,
2538
+ {
2539
+ children,
2540
+ className
2541
+ } = _f,
2542
+ props = __objRest$3(_f, ["children", "className"]);
2543
+ const {
2544
+ type,
2545
+ placeholder = "Label",
2546
+ onInputChange = EMPTY_FUNCTION,
2547
+ min,
2548
+ max,
2549
+ precision,
2550
+ initialValue
2551
+ } = props;
2552
+ const [inputValue, setInputValue] = React.useState(initialValue);
2553
+ const radioButtonValue = type === "input" || type === "input-number" ? inputValue : props.value;
2554
+ const radioGroupContext = React.useContext(KitRadioGroupContext);
2555
+ const renderInput = () => {
2556
+ const inputDisabled = props.disabled || (radioGroupContext == null ? void 0 : radioGroupContext.disabled);
2557
+ if (type === "input-number") return /* @__PURE__ */React.createElement(antd.InputNumber, {
2558
+ className: "ant-radio-button-input",
2559
+ placeholder,
2560
+ disabled: inputDisabled,
2561
+ value: !_.isNil(inputValue) ? Number(inputValue) : void 0,
2562
+ min,
2563
+ max,
2564
+ precision,
2565
+ onChange: value => {
2566
+ const val = value || 0;
2567
+ setInputValue(val);
2568
+ onInputChange(val);
2569
+ }
2570
+ });
2571
+ return /* @__PURE__ */React.createElement(antd.Input, {
2572
+ className: "ant-radio-button-input",
2573
+ placeholder,
2574
+ disabled: inputDisabled,
2575
+ value: inputValue,
2576
+ onChange: e => {
2577
+ setInputValue(e.target.value);
2578
+ onInputChange(e.target.value);
2579
+ }
2580
+ });
2581
+ };
2582
+ const renderChildren = () => {
2583
+ if (type !== "input" && type !== "input-number") return children ? children : null;
2584
+ return /* @__PURE__ */React.createElement(React.Fragment, null, renderInput(), /* @__PURE__ */React.createElement("span", {
2585
+ className: "ant-radio-button-input-label"
2586
+ }, typeof children === "string" ? children : ""));
2587
+ };
2588
+ return /* @__PURE__ */React.createElement(antd.Radio.Button, __spreadValues$4({
2589
+ className: core.cx(className, RadioButtonStyle),
2590
+ value: radioButtonValue
2591
+ }, props), renderChildren());
2592
+ };
2593
+
2464
2594
  var __defProp$3 = Object.defineProperty;
2465
2595
  var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2466
2596
  var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
@@ -2738,6 +2868,97 @@
2738
2868
  }));
2739
2869
  };
2740
2870
 
2871
+ var __defProp$1 = Object.defineProperty;
2872
+ var __defProps = Object.defineProperties;
2873
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2874
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2875
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2876
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2877
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2878
+ var __spreadValues$1 = (a, b) => {
2879
+ for (var prop in b || (b = {}))
2880
+ if (__hasOwnProp$1.call(b, prop))
2881
+ __defNormalProp$1(a, prop, b[prop]);
2882
+ if (__getOwnPropSymbols$1)
2883
+ for (var prop of __getOwnPropSymbols$1(b)) {
2884
+ if (__propIsEnum$1.call(b, prop))
2885
+ __defNormalProp$1(a, prop, b[prop]);
2886
+ }
2887
+ return a;
2888
+ };
2889
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2890
+ var __objRest$1 = (source, exclude) => {
2891
+ var target = {};
2892
+ for (var prop in source)
2893
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2894
+ target[prop] = source[prop];
2895
+ if (source != null && __getOwnPropSymbols$1)
2896
+ for (var prop of __getOwnPropSymbols$1(source)) {
2897
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2898
+ target[prop] = source[prop];
2899
+ }
2900
+ return target;
2901
+ };
2902
+ let componentId = 0;
2903
+ const Tooltip = (props) => {
2904
+ const _a = props, {
2905
+ followMouse,
2906
+ overlayClassName,
2907
+ overlayStyle,
2908
+ children
2909
+ } = _a, restProps = __objRest$1(_a, [
2910
+ "followMouse",
2911
+ "overlayClassName",
2912
+ "overlayStyle",
2913
+ "children"
2914
+ ]);
2915
+ const id = React.useRef(++componentId);
2916
+ const uniquePopupClass = `kit-popup-${id.current}`;
2917
+ const uniqueContainerClass = `kit-tooltip-${id.current}`;
2918
+ const _children = React.useMemo(() => {
2919
+ if (followMouse) {
2920
+ const child = React.isValidElement(children) ? children : /* @__PURE__ */ React.createElement("span", null, children);
2921
+ return React.cloneElement(child, {
2922
+ className: cs(child.props.className, uniqueContainerClass)
2923
+ });
2924
+ } else {
2925
+ return children;
2926
+ }
2927
+ }, [children, followMouse, uniqueContainerClass]);
2928
+ const onmousemove = React.useCallback(
2929
+ (event) => {
2930
+ const popup = document.querySelector(`.${uniquePopupClass}`);
2931
+ if (!popup)
2932
+ return;
2933
+ popup.style.left = event.pageX + "px";
2934
+ popup.style.top = event.pageY + "px";
2935
+ },
2936
+ [uniquePopupClass]
2937
+ );
2938
+ React.useEffect(() => {
2939
+ if (followMouse) {
2940
+ const container = document.querySelector(
2941
+ `.${uniqueContainerClass}`
2942
+ );
2943
+ container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
2944
+ return () => {
2945
+ container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
2946
+ };
2947
+ }
2948
+ }, [followMouse, onmousemove, uniqueContainerClass]);
2949
+ return /* @__PURE__ */ React.createElement(
2950
+ antd.Tooltip,
2951
+ __spreadProps(__spreadValues$1({}, restProps), {
2952
+ overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
2953
+ children: _children,
2954
+ overlayStyle: followMouse ? __spreadValues$1({
2955
+ transform: "translate(-50%, -100%)",
2956
+ pointerEvents: "none"
2957
+ }, overlayStyle) : overlayStyle
2958
+ })
2959
+ );
2960
+ };
2961
+
2741
2962
  const flatTimeZones = _.sortBy(_.uniqBy(TimeZones.reduce((sum, zone) => {
2742
2963
  const utcZones = zone.utc.map(utc => {
2743
2964
  return {
@@ -2855,14 +3076,19 @@
2855
3076
  select: Select,
2856
3077
  option: antd.Select.Option,
2857
3078
  table: Table,
3079
+ button: Button,
2858
3080
  modal: Modal,
2859
3081
  dropdown: antd.Dropdown,
3082
+ tooltip: Tooltip,
2860
3083
  input: Input,
2861
3084
  textArea: TextArea,
2862
3085
  checkbox: Checkbox,
2863
3086
  fields,
2864
3087
  inputGroup: InputGroup,
2865
3088
  searchInput: SearchInput,
3089
+ radio: Radio,
3090
+ radioGroup: RadioGroup,
3091
+ radioButton: RadioButton,
2866
3092
  divider: antd.Divider,
2867
3093
  list: antd.List,
2868
3094
  listItem: antd.List.Item,
@@ -2879,97 +3105,6 @@
2879
3105
  }
2880
3106
  const antdKit = getAntdKit();
2881
3107
 
2882
- var __defProp$1 = Object.defineProperty;
2883
- var __defProps = Object.defineProperties;
2884
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2885
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2886
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2887
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2888
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2889
- var __spreadValues$1 = (a, b) => {
2890
- for (var prop in b || (b = {}))
2891
- if (__hasOwnProp$1.call(b, prop))
2892
- __defNormalProp$1(a, prop, b[prop]);
2893
- if (__getOwnPropSymbols$1)
2894
- for (var prop of __getOwnPropSymbols$1(b)) {
2895
- if (__propIsEnum$1.call(b, prop))
2896
- __defNormalProp$1(a, prop, b[prop]);
2897
- }
2898
- return a;
2899
- };
2900
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2901
- var __objRest$1 = (source, exclude) => {
2902
- var target = {};
2903
- for (var prop in source)
2904
- if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2905
- target[prop] = source[prop];
2906
- if (source != null && __getOwnPropSymbols$1)
2907
- for (var prop of __getOwnPropSymbols$1(source)) {
2908
- if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2909
- target[prop] = source[prop];
2910
- }
2911
- return target;
2912
- };
2913
- let componentId = 0;
2914
- const Tooltip = (props) => {
2915
- const _a = props, {
2916
- followMouse,
2917
- overlayClassName,
2918
- overlayStyle,
2919
- children
2920
- } = _a, restProps = __objRest$1(_a, [
2921
- "followMouse",
2922
- "overlayClassName",
2923
- "overlayStyle",
2924
- "children"
2925
- ]);
2926
- const id = React.useRef(++componentId);
2927
- const uniquePopupClass = `kit-popup-${id.current}`;
2928
- const uniqueContainerClass = `kit-tooltip-${id.current}`;
2929
- const _children = React.useMemo(() => {
2930
- if (followMouse) {
2931
- const child = React.isValidElement(children) ? children : /* @__PURE__ */ React.createElement("span", null, children);
2932
- return React.cloneElement(child, {
2933
- className: cs(child.props.className, uniqueContainerClass)
2934
- });
2935
- } else {
2936
- return children;
2937
- }
2938
- }, [children, followMouse, uniqueContainerClass]);
2939
- const onmousemove = React.useCallback(
2940
- (event) => {
2941
- const popup = document.querySelector(`.${uniquePopupClass}`);
2942
- if (!popup)
2943
- return;
2944
- popup.style.left = event.pageX + "px";
2945
- popup.style.top = event.pageY + "px";
2946
- },
2947
- [uniquePopupClass]
2948
- );
2949
- React.useEffect(() => {
2950
- if (followMouse) {
2951
- const container = document.querySelector(
2952
- `.${uniqueContainerClass}`
2953
- );
2954
- container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
2955
- return () => {
2956
- container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
2957
- };
2958
- }
2959
- }, [followMouse, onmousemove, uniqueContainerClass]);
2960
- return /* @__PURE__ */ React.createElement(
2961
- antd.Tooltip,
2962
- __spreadProps(__spreadValues$1({}, restProps), {
2963
- overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
2964
- children: _children,
2965
- overlayStyle: followMouse ? __spreadValues$1({
2966
- transform: "translate(-50%, -100%)",
2967
- pointerEvents: "none"
2968
- }, overlayStyle) : overlayStyle
2969
- })
2970
- );
2971
- };
2972
-
2973
3108
  var __defProp = Object.defineProperty;
2974
3109
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2975
3110
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -3120,8 +3255,6 @@
3120
3255
  return dayjs(tick).format("MM/DD");
3121
3256
  };
3122
3257
 
3123
- React.createContext({});
3124
-
3125
3258
  var Architecture = /* @__PURE__ */ ((Architecture2) => {
3126
3259
  Architecture2["Aarch64"] = "AARCH64";
3127
3260
  Architecture2["X86_64"] = "X86_64";
@@ -3166,6 +3299,7 @@
3166
3299
  exports.TBODY_SELECTOR = TBODY_SELECTOR;
3167
3300
  exports.THEAD_SELECTOR = THEAD_SELECTOR;
3168
3301
  exports.TaskStatus = TaskStatus;
3302
+ exports.Typo = Typo;
3169
3303
  exports.UIKitProvider = UIKitProvider;
3170
3304
  exports.UserSource = UserSource;
3171
3305
  exports.antdKit = antdKit;