@cloudtower/eagle 0.31.16 → 0.31.17

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 (35) hide show
  1. package/dist/cjs/core/Fields/FieldsEnum/index.js +1 -1
  2. package/dist/cjs/core/LegacySelect/index.js +185 -0
  3. package/dist/cjs/core/LegacySelect/select.style.js +5 -0
  4. package/dist/cjs/core/Select/index.js +106 -117
  5. package/dist/cjs/core/Select/select.style.js +11 -0
  6. package/dist/cjs/core/Select/select.widgets.js +63 -0
  7. package/dist/cjs/core/TimeZoneSelect/index.js +1 -1
  8. package/dist/cjs/core/index.js +9 -9
  9. package/dist/cjs/index.js +185 -181
  10. package/dist/cjs/legacy-antd.js +137 -135
  11. package/dist/cjs/stats1.html +1 -1
  12. package/dist/components.css +1582 -1399
  13. package/dist/esm/core/Fields/FieldsEnum/index.js +4 -4
  14. package/dist/esm/core/LegacySelect/index.js +177 -0
  15. package/dist/esm/core/LegacySelect/select.style.js +3 -0
  16. package/dist/esm/core/Select/index.js +104 -116
  17. package/dist/esm/core/Select/select.style.js +6 -0
  18. package/dist/esm/core/Select/select.widgets.js +57 -0
  19. package/dist/esm/core/TimeZoneSelect/index.js +2 -2
  20. package/dist/esm/index.js +5 -3
  21. package/dist/esm/legacy-antd.js +2 -0
  22. package/dist/esm/stats1.html +1 -1
  23. package/dist/src/core/LegacySelect/index.d.ts +4 -0
  24. package/dist/src/core/LegacySelect/select.style.d.ts +1 -0
  25. package/dist/src/core/LegacySelect/select.type.d.ts +31 -0
  26. package/dist/src/core/Select/index.d.ts +1 -0
  27. package/dist/src/core/Select/select.style.d.ts +4 -0
  28. package/dist/src/core/Select/select.type.d.ts +6 -30
  29. package/dist/src/core/Select/select.widgets.d.ts +7 -0
  30. package/dist/src/core/index.d.ts +4 -2
  31. package/dist/src/spec/base.d.ts +2 -1
  32. package/dist/stories/docs/core/{Select.Simple.stories.d.ts → LegacySelect.Simple.stories.d.ts} +3 -3
  33. package/dist/stories/docs/core/LegacySelect.stories.d.ts +16 -0
  34. package/dist/style.css +1358 -1206
  35. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { Select as Select$1 } from 'antd';
1
+ import { Select } from 'antd';
2
2
  import React__default from 'react';
3
- import Select from '../../Select/index.js';
3
+ import LegacySelect from '../../LegacySelect/index.js';
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -40,10 +40,10 @@ const FieldsEnum = (_a) => {
40
40
  "enumValues",
41
41
  "emptyLabel"
42
42
  ]);
43
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Select, __spreadValues({}, restProps), emptyLabel && /* @__PURE__ */ React__default.createElement(Select$1.Option, { value: "" }, emptyLabel), enumValues.map((v) => {
43
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(LegacySelect, __spreadValues({}, restProps), emptyLabel && /* @__PURE__ */ React__default.createElement(Select.Option, { value: "" }, emptyLabel), enumValues.map((v) => {
44
44
  const item = typeof v === "string" ? { value: v, text: v } : v;
45
45
  return /* @__PURE__ */ React__default.createElement(
46
- Select$1.Option,
46
+ Select.Option,
47
47
  {
48
48
  key: item.value,
49
49
  value: item.value,
@@ -0,0 +1,177 @@
1
+ import Loading from '../Loading/index.js';
2
+ import { Typo } from '../Typo/index.js';
3
+ import { Select } from 'antd';
4
+ import cs from 'classnames';
5
+ import _ from 'lodash';
6
+ import React__default, { useMemo, useRef, useEffect } from 'react';
7
+ import { findDOMNode } from 'react-dom';
8
+ import { isElement } from 'react-is';
9
+ import { SelectStyle } from './select.style.js';
10
+
11
+ var __defProp = Object.defineProperty;
12
+ var __defProps = Object.defineProperties;
13
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
14
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
17
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
+ var __spreadValues = (a, b) => {
19
+ for (var prop in b || (b = {}))
20
+ if (__hasOwnProp.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ if (__getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(b)) {
24
+ if (__propIsEnum.call(b, prop))
25
+ __defNormalProp(a, prop, b[prop]);
26
+ }
27
+ return a;
28
+ };
29
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
30
+ var __objRest = (source, exclude) => {
31
+ var target = {};
32
+ for (var prop in source)
33
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
34
+ target[prop] = source[prop];
35
+ if (source != null && __getOwnPropSymbols)
36
+ for (var prop of __getOwnPropSymbols(source)) {
37
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
38
+ target[prop] = source[prop];
39
+ }
40
+ return target;
41
+ };
42
+ const LegacySelect = (_a) => {
43
+ var _b = _a, {
44
+ input,
45
+ multiple,
46
+ className,
47
+ scrollBottomBuffer = 0,
48
+ onScrollBottom,
49
+ onPopupScroll,
50
+ onSearch,
51
+ showSearch,
52
+ filterOption,
53
+ loading,
54
+ notFoundContent,
55
+ children,
56
+ error,
57
+ selectLimit,
58
+ dropdownClassName,
59
+ danger,
60
+ size = "middle",
61
+ meta,
62
+ placeholder
63
+ } = _b, restProps = __objRest(_b, [
64
+ "input",
65
+ "multiple",
66
+ "className",
67
+ "scrollBottomBuffer",
68
+ "onScrollBottom",
69
+ "onPopupScroll",
70
+ "onSearch",
71
+ "showSearch",
72
+ "filterOption",
73
+ "loading",
74
+ "notFoundContent",
75
+ "children",
76
+ "error",
77
+ "selectLimit",
78
+ "dropdownClassName",
79
+ "danger",
80
+ "size",
81
+ "meta",
82
+ "placeholder"
83
+ ]);
84
+ var _a2;
85
+ const limitExceeded = multiple && selectLimit && selectLimit <= (((_a2 = input.value) == null ? void 0 : _a2.length) || 0);
86
+ const typo = {
87
+ large: Typo.Label.l2_regular,
88
+ middle: Typo.Label.l3_regular,
89
+ small: Typo.Label.l4_regular
90
+ }[size];
91
+ const _danger = useMemo(() => {
92
+ if (danger !== void 0) {
93
+ return danger;
94
+ }
95
+ return (meta == null ? void 0 : meta.touched) && meta.invalid;
96
+ }, [danger, meta]);
97
+ const selectRef = useRef(null);
98
+ useEffect(() => {
99
+ if (!selectRef.current) {
100
+ return;
101
+ }
102
+ const realDom = findDOMNode(selectRef.current);
103
+ if (realDom) {
104
+ const inputDom = realDom.getElementsByClassName(
105
+ "ant-select-selection-search-input"
106
+ )[0];
107
+ const item = realDom.getElementsByClassName(
108
+ "ant-select-selection-item"
109
+ )[0];
110
+ inputDom && (placeholder || item) && inputDom.setAttribute(
111
+ "data-test",
112
+ String(placeholder || item.textContent)
113
+ );
114
+ }
115
+ }, [selectRef, placeholder]);
116
+ return /* @__PURE__ */ React__default.createElement(
117
+ Select,
118
+ __spreadValues(__spreadProps(__spreadValues({}, input), {
119
+ ref: selectRef,
120
+ size,
121
+ value: multiple ? input.value || [] : input.value || void 0,
122
+ onChange: (e, option) => {
123
+ var _a3, _b2;
124
+ if (Array.isArray(e) && e.some((v) => v === "")) {
125
+ (_a3 = input.onChange) == null ? void 0 : _a3.call(input, [], option);
126
+ } else {
127
+ (_b2 = input.onChange) == null ? void 0 : _b2.call(input, e, option);
128
+ }
129
+ },
130
+ onBlur: () => {
131
+ var _a3;
132
+ return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
133
+ },
134
+ mode: multiple ? "multiple" : void 0,
135
+ className: cs(
136
+ SelectStyle,
137
+ "select",
138
+ className,
139
+ limitExceeded && "select-event-none",
140
+ _danger ? "select-error" : "",
141
+ typo
142
+ ),
143
+ "data-size": size,
144
+ dropdownClassName: cs(dropdownClassName, limitExceeded && "display-none"),
145
+ showSearch: multiple ? void 0 : typeof showSearch === "undefined" ? Boolean(onSearch) : showSearch,
146
+ filterOption: onSearch === void 0 ? filterOption === void 0 ? (input2, option) => {
147
+ const label = option == null ? void 0 : option.label;
148
+ if (!label || typeof label !== "string") {
149
+ return false;
150
+ }
151
+ return label.toLowerCase().includes(input2.toLowerCase());
152
+ } : filterOption : false,
153
+ onSearch: onSearch && _.debounce(onSearch, 100),
154
+ onPopupScroll: (e) => {
155
+ onPopupScroll == null ? void 0 : onPopupScroll(e);
156
+ const el = e.currentTarget;
157
+ if (el.scrollHeight - el.offsetHeight - el.scrollTop <= scrollBottomBuffer) {
158
+ onScrollBottom == null ? void 0 : onScrollBottom();
159
+ }
160
+ },
161
+ notFoundContent: loading ? /* @__PURE__ */ React__default.createElement(Loading, null) : notFoundContent,
162
+ dropdownRender: (menu) => /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, error || menu),
163
+ loading,
164
+ placeholder
165
+ }), restProps),
166
+ React__default.Children.map(children, (child) => {
167
+ return isElement(child) ? __spreadProps(__spreadValues({}, child), {
168
+ props: __spreadProps(__spreadValues({}, child.props), {
169
+ "data-test": child.props.value
170
+ })
171
+ }) : child;
172
+ })
173
+ );
174
+ };
175
+ var LegacySelect$1 = LegacySelect;
176
+
177
+ export { LegacySelect$1 as default };
@@ -0,0 +1,3 @@
1
+ const SelectStyle = "E_s17wv897";
2
+
3
+ export { SelectStyle };
@@ -1,11 +1,11 @@
1
- import Loading from '../Loading/index.js';
1
+ import { ArrowChevronDown16BoldTertiaryIcon, ArrowChevronDown16BoldBlueIcon, ArrowChevronUp16BoldBlueIcon, Search16BlueIcon, ArrowChevronDown16BoldSecondaryIcon, ArrowChevronUp16BoldSecondaryIcon, Search16SecondaryIcon } from '@cloudtower/icons-react';
2
+ import Icon from '../Icon/index.js';
3
+ import LegacySelect from '../LegacySelect/index.js';
2
4
  import { Typo } from '../Typo/index.js';
3
- import { Select as Select$2 } from 'antd';
5
+ import useParrotTranslation from '../../hooks/useParrotTranslation.js';
4
6
  import cs from 'classnames';
5
- import _ from 'lodash';
6
- import React__default, { useMemo, useRef, useEffect } from 'react';
7
- import { findDOMNode } from 'react-dom';
8
- import { isElement } from 'react-is';
7
+ import React__default from 'react';
8
+ import { SelectStyle, SelectIconStyle, SelectSizeStyle, PlaceholderTextStyle } from './select.style.js';
9
9
 
10
10
  var __defProp = Object.defineProperty;
11
11
  var __defProps = Object.defineProperties;
@@ -13,125 +13,113 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
13
13
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
14
14
  var __hasOwnProp = Object.prototype.hasOwnProperty;
15
15
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
16
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
17
- enumerable: true,
18
- configurable: true,
19
- writable: true,
20
- value
21
- }) : obj[key] = value;
16
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
22
17
  var __spreadValues = (a, b) => {
23
- for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
24
- if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
25
- if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
26
- }
18
+ for (var prop in b || (b = {}))
19
+ if (__hasOwnProp.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ if (__getOwnPropSymbols)
22
+ for (var prop of __getOwnPropSymbols(b)) {
23
+ if (__propIsEnum.call(b, prop))
24
+ __defNormalProp(a, prop, b[prop]);
25
+ }
27
26
  return a;
28
27
  };
29
28
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
30
- var __objRest = (source, exclude) => {
31
- var target = {};
32
- for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
33
- if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
34
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
35
- }
36
- return target;
37
- };
38
- const SelectStyle = "E_s177mls5";
39
- const Select = _a => {
40
- var _b = _a,
41
- {
42
- input,
43
- multiple,
44
- className,
45
- scrollBottomBuffer = 0,
46
- onScrollBottom,
47
- onPopupScroll,
48
- onSearch,
49
- showSearch,
50
- filterOption,
51
- loading,
52
- notFoundContent,
53
- children,
54
- error,
55
- selectLimit,
56
- dropdownClassName,
57
- danger,
58
- size = "middle",
59
- meta,
60
- placeholder
61
- } = _b,
62
- restProps = __objRest(_b, ["input", "multiple", "className", "scrollBottomBuffer", "onScrollBottom", "onPopupScroll", "onSearch", "showSearch", "filterOption", "loading", "notFoundContent", "children", "error", "selectLimit", "dropdownClassName", "danger", "size", "meta", "placeholder"]);
63
- var _a2;
64
- const limitExceeded = multiple && selectLimit && selectLimit <= (((_a2 = input.value) == null ? void 0 : _a2.length) || 0);
29
+ const Select = (props) => {
30
+ const { size = "middle", isLoadingValue } = props;
31
+ const { t } = useParrotTranslation();
65
32
  const typo = {
66
33
  large: Typo.Label.l2_regular,
67
34
  middle: Typo.Label.l3_regular,
68
35
  small: Typo.Label.l4_regular
69
36
  }[size];
70
- const _danger = useMemo(() => {
71
- if (danger !== void 0) {
72
- return danger;
73
- }
74
- return (meta == null ? void 0 : meta.touched) && meta.invalid;
75
- }, [danger, meta]);
76
- const selectRef = useRef(null);
77
- useEffect(() => {
78
- if (!selectRef.current) {
79
- return;
80
- }
81
- const realDom = findDOMNode(selectRef.current);
82
- if (realDom) {
83
- const inputDom = realDom.getElementsByClassName("ant-select-selection-search-input")[0];
84
- const item = realDom.getElementsByClassName("ant-select-selection-item")[0];
85
- inputDom && (placeholder || item) && inputDom.setAttribute("data-test", String(placeholder || item.textContent));
86
- }
87
- }, [selectRef, placeholder]);
88
- return /* @__PURE__ */React__default.createElement(Select$2, __spreadValues(__spreadProps(__spreadValues({}, input), {
89
- ref: selectRef,
90
- size,
91
- value: multiple ? input.value || [] : input.value || void 0,
92
- onChange: (e, option) => {
93
- var _a3, _b2;
94
- if (Array.isArray(e) && e.some(v => v === "")) {
95
- (_a3 = input.onChange) == null ? void 0 : _a3.call(input, [], option);
96
- } else {
97
- (_b2 = input.onChange) == null ? void 0 : _b2.call(input, e, option);
98
- }
99
- },
100
- onBlur: () => {
101
- var _a3;
102
- return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
103
- },
104
- mode: multiple ? "multiple" : void 0,
105
- className: cs(SelectStyle, "select", className, limitExceeded && "select-event-none", _danger ? "select-error" : "", typo),
106
- "data-size": size,
107
- dropdownClassName: cs(dropdownClassName, limitExceeded && "display-none"),
108
- showSearch: multiple ? void 0 : typeof showSearch === "undefined" ? Boolean(onSearch) : showSearch,
109
- filterOption: onSearch === void 0 ? filterOption === void 0 ? (input2, option) => {
110
- const label = option == null ? void 0 : option.label;
111
- if (!label || typeof label !== "string") {
112
- return false;
113
- }
114
- return label.toLowerCase().includes(input2.toLowerCase());
115
- } : filterOption : false,
116
- onSearch: onSearch && _.debounce(onSearch, 100),
117
- onPopupScroll: e => {
118
- onPopupScroll == null ? void 0 : onPopupScroll(e);
119
- const el = e.currentTarget;
120
- if (el.scrollHeight - el.offsetHeight - el.scrollTop <= scrollBottomBuffer) {
121
- onScrollBottom == null ? void 0 : onScrollBottom();
122
- }
123
- },
124
- notFoundContent: loading ? /* @__PURE__ */React__default.createElement(Loading, null) : notFoundContent,
125
- dropdownRender: menu => /* @__PURE__ */React__default.createElement(React__default.Fragment, null, error || menu),
126
- loading,
127
- placeholder
128
- }), restProps), React__default.Children.map(children, child => {
129
- return isElement(child) ? __spreadProps(__spreadValues({}, child), {
130
- props: __spreadProps(__spreadValues({}, child.props), {
131
- "data-test": child.props.value
132
- })
133
- }) : child;
134
- }));
37
+ return /* @__PURE__ */ React__default.createElement(
38
+ LegacySelect,
39
+ __spreadProps(__spreadValues({}, props), {
40
+ className: cs(
41
+ SelectStyle,
42
+ SelectIconStyle,
43
+ SelectSizeStyle,
44
+ isLoadingValue ? "select-loading-value" : "",
45
+ props.className
46
+ ),
47
+ placeholder: /* @__PURE__ */ React__default.createElement("span", { className: cs(typo, PlaceholderTextStyle) }, isLoadingValue ? t("components.loading") : props.placeholder),
48
+ suffixIcon: props.suffixIcon || (props.loading ? void 0 : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
49
+ Icon,
50
+ {
51
+ className: "select-suffix",
52
+ src: ArrowChevronDown16BoldTertiaryIcon
53
+ }
54
+ ), /* @__PURE__ */ React__default.createElement(
55
+ Icon,
56
+ {
57
+ className: "select-hover-suffix",
58
+ src: ArrowChevronDown16BoldBlueIcon
59
+ }
60
+ ), /* @__PURE__ */ React__default.createElement(
61
+ Icon,
62
+ {
63
+ className: "select-active-suffix",
64
+ src: ArrowChevronDown16BoldBlueIcon
65
+ }
66
+ ), /* @__PURE__ */ React__default.createElement(
67
+ Icon,
68
+ {
69
+ className: "select-expanded-suffix",
70
+ src: ArrowChevronUp16BoldBlueIcon
71
+ }
72
+ ), /* @__PURE__ */ React__default.createElement(
73
+ Icon,
74
+ {
75
+ className: "select-expanded-search-suffix",
76
+ src: Search16BlueIcon
77
+ }
78
+ ), /* @__PURE__ */ React__default.createElement(
79
+ Icon,
80
+ {
81
+ className: "select-focus-suffix",
82
+ src: ArrowChevronDown16BoldTertiaryIcon
83
+ }
84
+ ), /* @__PURE__ */ React__default.createElement(
85
+ Icon,
86
+ {
87
+ className: "select-error-suffix",
88
+ src: ArrowChevronDown16BoldTertiaryIcon
89
+ }
90
+ ), /* @__PURE__ */ React__default.createElement(
91
+ Icon,
92
+ {
93
+ className: "select-error-hover-suffix",
94
+ src: ArrowChevronDown16BoldSecondaryIcon
95
+ }
96
+ ), /* @__PURE__ */ React__default.createElement(
97
+ Icon,
98
+ {
99
+ className: "select-error-active-suffix",
100
+ src: ArrowChevronDown16BoldSecondaryIcon
101
+ }
102
+ ), /* @__PURE__ */ React__default.createElement(
103
+ Icon,
104
+ {
105
+ className: "select-error-expanded-suffix",
106
+ src: ArrowChevronUp16BoldSecondaryIcon
107
+ }
108
+ ), /* @__PURE__ */ React__default.createElement(
109
+ Icon,
110
+ {
111
+ className: "select-error-expanded-search-suffix",
112
+ src: Search16SecondaryIcon
113
+ }
114
+ ), /* @__PURE__ */ React__default.createElement(
115
+ Icon,
116
+ {
117
+ className: "select-error-focus-suffix",
118
+ src: ArrowChevronDown16BoldTertiaryIcon
119
+ }
120
+ )))
121
+ })
122
+ );
135
123
  };
136
124
  var Select$1 = Select;
137
125
 
@@ -0,0 +1,6 @@
1
+ const SelectStyle = "E_s4ivdfu";
2
+ const SelectIconStyle = "E_sks9xr8";
3
+ const SelectSizeStyle = "E_swwhohx";
4
+ const PlaceholderTextStyle = "E_p2sxmsl";
5
+
6
+ export { PlaceholderTextStyle, SelectIconStyle, SelectSizeStyle, SelectStyle };
@@ -0,0 +1,57 @@
1
+ import OverflowTooltip from '../../coreX/OverflowTooltip/index.js';
2
+ import { Select } from 'antd';
3
+ import React__default from 'react';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value
14
+ }) : obj[key] = value;
15
+ var __spreadValues = (a, b) => {
16
+ for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
26
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
27
+ }
28
+ return target;
29
+ };
30
+ const OptionStyle = "E_oa99sl3";
31
+ const LeftStyle = "E_lvp5pj7";
32
+ const SlotStyle = "E_s1io1lws";
33
+ const AntdOption = Select.Option;
34
+ function getOptions(options) {
35
+ return options.map(option => {
36
+ const _a = option,
37
+ {
38
+ prefix,
39
+ suffix,
40
+ children
41
+ } = _a,
42
+ restProps = __objRest(_a, ["prefix", "suffix", "children"]);
43
+ return /* @__PURE__ */React__default.createElement(AntdOption, __spreadValues({}, restProps), /* @__PURE__ */React__default.createElement("div", {
44
+ className: OptionStyle
45
+ }, /* @__PURE__ */React__default.createElement("span", {
46
+ className: LeftStyle
47
+ }, prefix ? /* @__PURE__ */React__default.createElement("span", {
48
+ className: SlotStyle
49
+ }, prefix) : null, /* @__PURE__ */React__default.createElement(OverflowTooltip, {
50
+ content: children
51
+ })), suffix ? /* @__PURE__ */React__default.createElement("span", {
52
+ className: SlotStyle
53
+ }, suffix) : null));
54
+ });
55
+ }
56
+
57
+ export { getOptions };
@@ -1,7 +1,7 @@
1
1
  import { CheckmarkDoneSuccessCorrect16BlueIcon } from '@cloudtower/icons-react';
2
2
  import { cx } from '@linaria/core';
3
3
  import Icon from '../Icon/index.js';
4
- import Select$1 from '../Select/index.js';
4
+ import LegacySelect from '../LegacySelect/index.js';
5
5
  import { Typo } from '../Typo/index.js';
6
6
  import useParrotTranslation from '../../hooks/useParrotTranslation.js';
7
7
  import { Select, Tag } from 'antd';
@@ -86,7 +86,7 @@ const TimeZoneSelect = props => {
86
86
  }));
87
87
  }));
88
88
  });
89
- return /* @__PURE__ */React__default.createElement(Select$1, {
89
+ return /* @__PURE__ */React__default.createElement(LegacySelect, {
90
90
  className: cx(SelectStyle, className),
91
91
  dropdownClassName: DropdownStyle,
92
92
  placeholder: /* @__PURE__ */React__default.createElement("span", null, placeholder || t("components.time_zone_select_placeholder")),
package/dist/esm/index.js CHANGED
@@ -44,6 +44,7 @@ export { AntdInputNumberStyled, default as InputNumber } from './core/InputNumbe
44
44
  export { AntdPasswordInputStyled, default as InputPassword } from './core/InputPassword/index.js';
45
45
  export { default as InputTagItem } from './core/InputTagItem/index.js';
46
46
  export { default as KitStoreProvider, useCloseModal, useKitDispatch, useKitSelector, usePopModal, usePushModal } from './core/KitStoreProvider/index.js';
47
+ export { default as LegacySelect } from './core/LegacySelect/index.js';
47
48
  export { default as Link } from './core/Link/index.js';
48
49
  export { default as Loading } from './core/Loading/index.js';
49
50
  export { attachTypeApi, getKeyThenIncreaseKey, default as message } from './core/message/index.js';
@@ -80,6 +81,7 @@ export { Architecture } from './core/Arch/arch.type.js';
80
81
  export { CascaderDefaultHeader, CascaderDefaultHeaderContainer, CascaderDefaultHeaderSearch, CascaderDefaultOptionLabel, CascaderDropdown, CascaderInputStyle, CascaderLargeDropdown, CascaderNotData, CascaderSmallDropdown, DoubleRowOptionStyleWrapper, Hide } from './core/Cascader/cascader.style.js';
81
82
  export { CascaderDoubleRowOption, CascaderOptionWithCount, NotDataContent, PresetCascaderHeader, PresetCascaderRender, defaultTagRender } from './core/Cascader/cascader.widget.js';
82
83
  export { Cascader } from './core/Cascader/index.js';
84
+ export { ConfigProvider } from './core/ConfigProvider/index.js';
83
85
  export { default as ExpandableContainer } from './core/ExpandableList/ExpandableContainer.js';
84
86
  export { default as ExpandableItem } from './core/ExpandableList/ExpandableItem.js';
85
87
  export { default as ExpandIcon } from './core/ExpandableList/ExpandIcon.js';
@@ -95,7 +97,10 @@ export { GraphType, TimeUnit } from './core/Metric/type.js';
95
97
  export { ParrotTrans } from './core/ParrotTrans/index.js';
96
98
  export { Area, TitleArea } from './core/Progress/progress.widgets.js';
97
99
  export { Progress } from './core/Progress/index.js';
100
+ export { getOptions } from './core/Select/select.widgets.js';
98
101
  export { SidebarMenu } from './core/SidebarMenu/SidebarMenu.js';
102
+ export { default as Skeleton } from './core/Skeleton/index.js';
103
+ export { default as SkeletonContent } from './core/Skeleton/Content.js';
99
104
  export { CircleProgress } from './core/StepProgress/index.js';
100
105
  export { CannotOperationInfo, CommonContent, ContentWrapper, Desc, Description, Divider, Dot, ErrorSpan, ExpandArrow, FieldTitle, FormField, FormItemDiv, FormSectionTitle, FormWrapper, FullView, HorizontalWizardModalCompactStyle, HorizontalWizardModalLooseStyle, InfoAlert, InputStyle, KitInputStyle, LeftEndInputStyle, LeftEndSelectStyle, LightDesc, LoadingWrapper, ModalBody, ModalWrapper, NameTag, NormalAlert, NoticeAlert, OperationWraper, RadioDesc, RightEndInputStyle, RightEndSelectStyle, SelectOptionDisabledText, TagSpan, TertiaryText, UnitStyle, WarningAlert, WizardBody, radioStyle } from './core/Styled/index.js';
101
106
  export { useTableBodyHasScrollBar } from './core/Table/common.js';
@@ -103,9 +108,6 @@ export { TableSkeleton } from './core/Table/TableSkeleton.js';
103
108
  export { ColumnTitle, EmptyRowMenu, KitTableContext, TableLoading } from './core/Table/TableWidget.js';
104
109
  export { ValidateTriggerType } from './core/TableForm/types.js';
105
110
  export { Typo } from './core/Typo/index.js';
106
- export { ConfigProvider } from './core/ConfigProvider/index.js';
107
- export { default as Skeleton } from './core/Skeleton/index.js';
108
- export { default as SkeletonContent } from './core/Skeleton/Content.js';
109
111
  export { default as BarChart, getWidth } from './coreX/BarChart/index.js';
110
112
  export { default as BatchOperation, renderBatchOperationMenuItem } from './coreX/BatchOperation/index.js';
111
113
  export { default as ChartWithTooltip, ChartWithUnit } from './coreX/ChartWithTooltip/index.js';
@@ -28,6 +28,7 @@ import Form from './core/Form/index.js';
28
28
  import Frequency from './core/Frequency/index.js';
29
29
  import Input from './core/Input/index.js';
30
30
  import InputGroup from './core/InputGroup/index.js';
31
+ import LegacySelect from './core/LegacySelect/index.js';
31
32
  import Link from './core/Link/index.js';
32
33
  import Loading from './core/Loading/index.js';
33
34
  import _message from './core/message/index.js';
@@ -77,6 +78,7 @@ function getAntdKit() {
77
78
  loading: Loading,
78
79
  error: Error,
79
80
  pagination: Pagination,
81
+ legacySelect: LegacySelect,
80
82
  select: Select,
81
83
  option: Select$1.Option,
82
84
  selectOptGroup: Select$1.OptGroup,