@asdp/ferryui 0.1.22-dev.10923 → 0.1.22-dev.10936

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/index.js CHANGED
@@ -7176,8 +7176,10 @@ var ModalSearchHarbor = ({
7176
7176
  const styles = useStyles12();
7177
7177
  const mergedLabels = { ...DEFAULT_LABELS10[language], ...labels };
7178
7178
  const isError = isErrorTravelPlan && isErrorPort;
7179
- const handleSelect = (harbor) => {
7180
- onAddLastSearched(harbor);
7179
+ const handleSelect = (harbor, addRecent = true) => {
7180
+ if (addRecent) {
7181
+ onAddLastSearched(harbor);
7182
+ }
7181
7183
  onSelectHarbor(harbor);
7182
7184
  onSearchChange("");
7183
7185
  };
@@ -7258,7 +7260,7 @@ var ModalSearchHarbor = ({
7258
7260
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.buttonContainer, children: favoriteHarbors.map((harbor) => /* @__PURE__ */ jsxRuntime.jsxs(
7259
7261
  reactComponents.Button,
7260
7262
  {
7261
- onClick: () => handleSelect(harbor),
7263
+ onClick: () => handleSelect(harbor, false),
7262
7264
  size: "medium",
7263
7265
  appearance: "subtle",
7264
7266
  iconPosition: "before",
@@ -7309,7 +7311,7 @@ var ModalSearchHarbor = ({
7309
7311
  HarborListItem,
7310
7312
  {
7311
7313
  harbor,
7312
- onSelect: handleSelect,
7314
+ onSelect: (harbor2) => handleSelect(harbor2, false),
7313
7315
  containerClassName: styles.historyItem,
7314
7316
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsxRuntime.jsx(
7315
7317
  react.Icon,
@@ -7331,7 +7333,7 @@ var ModalSearchHarbor = ({
7331
7333
  HarborListItem,
7332
7334
  {
7333
7335
  harbor,
7334
- onSelect: handleSelect,
7336
+ onSelect: (harbor2) => handleSelect(harbor2, false),
7335
7337
  containerClassName: styles.historyItem,
7336
7338
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsxRuntime.jsx(
7337
7339
  react.Icon,
@@ -7371,7 +7373,7 @@ var ModalSearchHarbor = ({
7371
7373
  HarborListItem,
7372
7374
  {
7373
7375
  harbor,
7374
- onSelect: handleSelect,
7376
+ onSelect: (harbor2) => handleSelect(harbor2, !!searchQuery),
7375
7377
  containerClassName: styles.harborItem,
7376
7378
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsxRuntime.jsx(
7377
7379
  react.Icon,