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