@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.mjs CHANGED
@@ -7167,8 +7167,10 @@ var ModalSearchHarbor = ({
7167
7167
  const styles = useStyles12();
7168
7168
  const mergedLabels = { ...DEFAULT_LABELS10[language], ...labels };
7169
7169
  const isError = isErrorTravelPlan && isErrorPort;
7170
- const handleSelect = (harbor) => {
7171
- onAddLastSearched(harbor);
7170
+ const handleSelect = (harbor, addRecent = true) => {
7171
+ if (addRecent) {
7172
+ onAddLastSearched(harbor);
7173
+ }
7172
7174
  onSelectHarbor(harbor);
7173
7175
  onSearchChange("");
7174
7176
  };
@@ -7249,7 +7251,7 @@ var ModalSearchHarbor = ({
7249
7251
  /* @__PURE__ */ jsx("div", { className: styles.buttonContainer, children: favoriteHarbors.map((harbor) => /* @__PURE__ */ jsxs(
7250
7252
  Button,
7251
7253
  {
7252
- onClick: () => handleSelect(harbor),
7254
+ onClick: () => handleSelect(harbor, false),
7253
7255
  size: "medium",
7254
7256
  appearance: "subtle",
7255
7257
  iconPosition: "before",
@@ -7300,7 +7302,7 @@ var ModalSearchHarbor = ({
7300
7302
  HarborListItem,
7301
7303
  {
7302
7304
  harbor,
7303
- onSelect: handleSelect,
7305
+ onSelect: (harbor2) => handleSelect(harbor2, false),
7304
7306
  containerClassName: styles.historyItem,
7305
7307
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsx(
7306
7308
  Icon,
@@ -7322,7 +7324,7 @@ var ModalSearchHarbor = ({
7322
7324
  HarborListItem,
7323
7325
  {
7324
7326
  harbor,
7325
- onSelect: handleSelect,
7327
+ onSelect: (harbor2) => handleSelect(harbor2, false),
7326
7328
  containerClassName: styles.historyItem,
7327
7329
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsx(
7328
7330
  Icon,
@@ -7362,7 +7364,7 @@ var ModalSearchHarbor = ({
7362
7364
  HarborListItem,
7363
7365
  {
7364
7366
  harbor,
7365
- onSelect: handleSelect,
7367
+ onSelect: (harbor2) => handleSelect(harbor2, !!searchQuery),
7366
7368
  containerClassName: styles.harborItem,
7367
7369
  trailingIcon: showButtonFavorite && /* @__PURE__ */ jsx(
7368
7370
  Icon,