@cloudtower/eagle 0.32.24 → 0.32.26

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.
@@ -69,7 +69,8 @@ const Modal = (props) => {
69
69
  showCancel = true,
70
70
  showOk = true,
71
71
  afterClose,
72
- closeIcon
72
+ closeIcon,
73
+ hideFooterButtonBorder = true
73
74
  } = _a, restProps = __objRest(_a, [
74
75
  "error",
75
76
  "okText",
@@ -89,7 +90,8 @@ const Modal = (props) => {
89
90
  "showCancel",
90
91
  "showOk",
91
92
  "afterClose",
92
- "closeIcon"
93
+ "closeIcon",
94
+ "hideFooterButtonBorder"
93
95
  ]);
94
96
  const stack = index.useKitSelector(
95
97
  (state) => state.modal.stack
@@ -149,50 +151,59 @@ const Modal = (props) => {
149
151
  dispatch({ type: modal.ModalActions.REMOVE_MODAL, id: idRef.current });
150
152
  },
151
153
  visible: idRef.current !== id,
152
- footer: /* @__PURE__ */ React__default.default.createElement("div", { className: "footer-content" }, footer === void 0 ? /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("div", { className: "modal-footer-left" }, wizard && typeof wizard === "object" && !wizard.disablePrevStep && wizard.step !== 0 && /* @__PURE__ */ React__default.default.createElement(
153
- "span",
154
+ footer: /* @__PURE__ */ React__default.default.createElement(
155
+ "div",
154
156
  {
155
- className: "prev-step",
156
- onClick: () => {
157
- var _a2, _b2, _c, _d;
158
- if (typeof wizard === "object" && ((_a2 = wizard.steps[wizard.step]) == null ? void 0 : _a2.onPrev)) {
159
- (_c = (_b2 = wizard.steps[wizard.step]).onPrev) == null ? void 0 : _c.call(_b2);
160
- return;
161
- }
162
- (_d = wizard.onStepChange) == null ? void 0 : _d.call(wizard, wizard.step - 1);
163
- }
157
+ className: cs__default.default(
158
+ "footer-content",
159
+ hideFooterButtonBorder && "no-button-border"
160
+ )
164
161
  },
165
- prevText
166
- ), error && /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React__default.default.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React__default.default.createElement(
167
- index$1,
168
- __spreadValues({
169
- type: "quiet",
170
- onMouseDown: (e) => {
171
- e.preventDefault();
172
- },
173
- onClick: (e) => {
174
- onCancel == null ? void 0 : onCancel(e);
175
- transitionClass.current = fullscreen ? "" : "modal-zoom";
176
- },
177
- className: cs__default.default(cancelButtonProps == null ? void 0 : cancelButtonProps.className)
178
- }, cancelButtonProps),
179
- cancelText
180
- ), showOk && /* @__PURE__ */ React__default.default.createElement(
181
- index$1,
182
- __spreadValues({
183
- onClick: (e) => {
184
- var _a2, _b2;
185
- onOk == null ? void 0 : onOk(e);
186
- if (typeof wizard === "object" && wizard.steps[wizard.step]) {
187
- (_b2 = (_a2 = wizard.steps[wizard.step]).onOk) == null ? void 0 : _b2.call(_a2, e);
162
+ footer === void 0 ? /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("div", { className: "modal-footer-left" }, wizard && typeof wizard === "object" && !wizard.disablePrevStep && wizard.step !== 0 && /* @__PURE__ */ React__default.default.createElement(
163
+ "span",
164
+ {
165
+ className: "prev-step",
166
+ onClick: () => {
167
+ var _a2, _b2, _c, _d;
168
+ if (typeof wizard === "object" && ((_a2 = wizard.steps[wizard.step]) == null ? void 0 : _a2.onPrev)) {
169
+ (_c = (_b2 = wizard.steps[wizard.step]).onPrev) == null ? void 0 : _c.call(_b2);
170
+ return;
171
+ }
172
+ (_d = wizard.onStepChange) == null ? void 0 : _d.call(wizard, wizard.step - 1);
188
173
  }
189
- transitionClass.current = fullscreen ? "" : "modal-send";
190
174
  },
191
- type: "primary",
192
- loading: confirmLoading
193
- }, okButtonProps),
194
- confirmText
195
- ))) : footer)
175
+ prevText
176
+ ), error && /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React__default.default.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React__default.default.createElement(
177
+ index$1,
178
+ __spreadValues({
179
+ type: "quiet",
180
+ onMouseDown: (e) => {
181
+ e.preventDefault();
182
+ },
183
+ onClick: (e) => {
184
+ onCancel == null ? void 0 : onCancel(e);
185
+ transitionClass.current = fullscreen ? "" : "modal-zoom";
186
+ },
187
+ className: cs__default.default(cancelButtonProps == null ? void 0 : cancelButtonProps.className)
188
+ }, cancelButtonProps),
189
+ cancelText
190
+ ), showOk && /* @__PURE__ */ React__default.default.createElement(
191
+ index$1,
192
+ __spreadValues({
193
+ onClick: (e) => {
194
+ var _a2, _b2;
195
+ onOk == null ? void 0 : onOk(e);
196
+ if (typeof wizard === "object" && wizard.steps[wizard.step]) {
197
+ (_b2 = (_a2 = wizard.steps[wizard.step]).onOk) == null ? void 0 : _b2.call(_a2, e);
198
+ }
199
+ transitionClass.current = fullscreen ? "" : "modal-send";
200
+ },
201
+ type: "primary",
202
+ loading: confirmLoading
203
+ }, okButtonProps),
204
+ confirmText
205
+ ))) : footer
206
+ )
196
207
  }),
197
208
  wizard && typeof wizard === "object" ? /* @__PURE__ */ React__default.default.createElement(index$2.WizardBody, null, /* @__PURE__ */ React__default.default.createElement("div", { className: "left" }, wizard.hideLeft ? null : /* @__PURE__ */ React__default.default.createElement(
198
209
  index$3,
@@ -55,9 +55,17 @@ const SearchInput = props => {
55
55
  debounceWait = 300,
56
56
  total = 0,
57
57
  onSearchNext,
58
- onSearchPrev
58
+ onSearchPrev,
59
+ prefixHoverIcon,
60
+ nextHoverIcon,
61
+ clearHoverIcon,
62
+ prefixIcon,
63
+ nextIcon,
64
+ clearIcon,
65
+ width,
66
+ searchIcon
59
67
  } = _a,
60
- restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev"]);
68
+ restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev", "prefixHoverIcon", "nextHoverIcon", "clearHoverIcon", "prefixIcon", "nextIcon", "clearIcon", "width", "searchIcon"]);
61
69
  const [current, setCurrent] = React.useState(0);
62
70
  const [value, setValue] = React.useState(props.value || "");
63
71
  const {
@@ -78,7 +86,7 @@ const SearchInput = props => {
78
86
  }
79
87
  }, [onSearchPrev, current, total, value]);
80
88
  const suffix = onSearchNext && onSearchPrev && value ? /* @__PURE__ */React__default.default.createElement(React__default.default.Fragment, null, typeof total === "number" ? /* @__PURE__ */React__default.default.createElement("span", {
81
- className: core.cx(index.Typo.Label.l4_regular, CountTextStyle)
89
+ className: core.cx(index.Typo.Label.l4_regular, "counter-text", CountTextStyle)
82
90
  }, current, "/", total) : null, /* @__PURE__ */React__default.default.createElement("span", {
83
91
  className: IconContainerStyle
84
92
  }, isNoMatch ? /* @__PURE__ */React__default.default.createElement(index$1, {
@@ -90,8 +98,8 @@ const SearchInput = props => {
90
98
  }) : /* @__PURE__ */React__default.default.createElement(index$2, {
91
99
  title: t("components.prev")
92
100
  }, /* @__PURE__ */React__default.default.createElement(index$1, {
93
- src: iconsReact.ArrowChevronUp16SecondaryIcon,
94
- hoverSrc: iconsReact.ArrowChevronUp16BlueIcon,
101
+ src: prefixIcon != null ? prefixIcon : iconsReact.ArrowChevronUp16SecondaryIcon,
102
+ hoverSrc: prefixHoverIcon != null ? prefixHoverIcon : iconsReact.ArrowChevronUp16BlueIcon,
95
103
  onClick: prev
96
104
  })), isNoMatch ? /* @__PURE__ */React__default.default.createElement(index$1, {
97
105
  className: DisabledIconStyle,
@@ -102,14 +110,14 @@ const SearchInput = props => {
102
110
  }) : /* @__PURE__ */React__default.default.createElement(index$2, {
103
111
  title: t("components.next")
104
112
  }, /* @__PURE__ */React__default.default.createElement(index$1, {
105
- src: iconsReact.ArrowChevronDown16SecondaryIcon,
106
- hoverSrc: iconsReact.ArrowChevronDown16BlueIcon,
113
+ src: nextIcon != null ? nextIcon : iconsReact.ArrowChevronDown16SecondaryIcon,
114
+ hoverSrc: nextHoverIcon != null ? nextHoverIcon : iconsReact.ArrowChevronDown16BlueIcon,
107
115
  onClick: next
108
116
  })), /* @__PURE__ */React__default.default.createElement(index$2, {
109
117
  title: t("components.clear")
110
118
  }, /* @__PURE__ */React__default.default.createElement(index$1, {
111
- src: iconsReact.XmarkCloseCircleFill16TertiaryIcon,
112
- hoverSrc: iconsReact.XmarkCloseCircleFill16SecondaryIcon,
119
+ src: clearIcon != null ? clearIcon : iconsReact.XmarkCloseCircleFill16TertiaryIcon,
120
+ hoverSrc: clearHoverIcon != null ? clearHoverIcon : iconsReact.XmarkCloseCircleFill16SecondaryIcon,
113
121
  onClick: () => {
114
122
  onSearch("");
115
123
  setValue("");
@@ -123,9 +131,11 @@ const SearchInput = props => {
123
131
  }, [value, total]);
124
132
  return /* @__PURE__ */React__default.default.createElement(index$3, __spreadProps(__spreadValues({
125
133
  style: {
126
- width: 276
134
+ width: width != null ? width : 276
127
135
  },
128
- prefix: /* @__PURE__ */React__default.default.createElement(icons.SearchOutlined, null),
136
+ prefix: searchIcon ? /* @__PURE__ */React__default.default.createElement(index$1, {
137
+ src: searchIcon
138
+ }) : /* @__PURE__ */React__default.default.createElement(icons.SearchOutlined, null),
129
139
  suffix,
130
140
  onChange: e => {
131
141
  const newValue = e.target.value;