@geckoui/geckoui 1.6.0 → 1.6.2

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.d.mts CHANGED
@@ -2343,7 +2343,7 @@ interface SelectOverload {
2343
2343
  displayName: string;
2344
2344
  }
2345
2345
  interface FocusedOption<T = unknown> extends SelectOptionConfig<T> {
2346
- focusType?: "keyboard" | "mouse";
2346
+ focusType?: "keyboard" | "mouse" | "initial";
2347
2347
  }
2348
2348
  interface SelectContextProps<T> extends Pick<BaseSelectProps, "disabled" | "prefix" | "suffix" | "placeholder" | "closeMenuOnSelect">, Omit<MultiSelectProps<T>, "value" | "onChange" | "multiple" | "renderDisplay"> {
2349
2349
  /**
package/dist/index.d.ts CHANGED
@@ -2343,7 +2343,7 @@ interface SelectOverload {
2343
2343
  displayName: string;
2344
2344
  }
2345
2345
  interface FocusedOption<T = unknown> extends SelectOptionConfig<T> {
2346
- focusType?: "keyboard" | "mouse";
2346
+ focusType?: "keyboard" | "mouse" | "initial";
2347
2347
  }
2348
2348
  interface SelectContextProps<T> extends Pick<BaseSelectProps, "disabled" | "prefix" | "suffix" | "placeholder" | "closeMenuOnSelect">, Omit<MultiSelectProps<T>, "value" | "onChange" | "multiple" | "renderDisplay"> {
2349
2349
  /**
package/dist/index.js CHANGED
@@ -4494,7 +4494,7 @@ var Select = (props) => {
4494
4494
  var _a2, _b;
4495
4495
  if (disabled || open) return;
4496
4496
  const option = (_b = (_a2 = options.filter((e) => isEqual_default(e.value, value))) == null ? void 0 : _a2[0]) != null ? _b : options[0];
4497
- setFocusedOption(__spreadProps(__spreadValues({}, option), { focusType: "keyboard" }));
4497
+ setFocusedOption(__spreadProps(__spreadValues({}, option), { focusType: "initial" }));
4498
4498
  setOpen(true);
4499
4499
  setKeyword("");
4500
4500
  }
@@ -4629,7 +4629,7 @@ var SelectOption = (_a) => {
4629
4629
  const optionHeight = ref.current.clientHeight;
4630
4630
  scrollContainer.scrollTo({
4631
4631
  top: optionTop - containerHeight / 2 + optionHeight / 2,
4632
- behavior: "smooth"
4632
+ behavior: (focusedOption == null ? void 0 : focusedOption.focusType) === "initial" ? "auto" : "smooth"
4633
4633
  });
4634
4634
  }
4635
4635
  }
package/dist/index.mjs CHANGED
@@ -4406,7 +4406,7 @@ var Select = (props) => {
4406
4406
  var _a2, _b;
4407
4407
  if (disabled || open) return;
4408
4408
  const option = (_b = (_a2 = options.filter((e) => isEqual_default(e.value, value))) == null ? void 0 : _a2[0]) != null ? _b : options[0];
4409
- setFocusedOption(__spreadProps(__spreadValues({}, option), { focusType: "keyboard" }));
4409
+ setFocusedOption(__spreadProps(__spreadValues({}, option), { focusType: "initial" }));
4410
4410
  setOpen(true);
4411
4411
  setKeyword("");
4412
4412
  }
@@ -4541,7 +4541,7 @@ var SelectOption = (_a) => {
4541
4541
  const optionHeight = ref.current.clientHeight;
4542
4542
  scrollContainer.scrollTo({
4543
4543
  top: optionTop - containerHeight / 2 + optionHeight / 2,
4544
- behavior: "smooth"
4544
+ behavior: (focusedOption == null ? void 0 : focusedOption.focusType) === "initial" ? "auto" : "smooth"
4545
4545
  });
4546
4546
  }
4547
4547
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geckoui/geckoui",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "license": "MIT",
5
5
  "description": "The only thing our Gecko eats is bugs!",
6
6
  "keywords": [