@geckoui/geckoui 1.6.0 → 1.6.1

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
  }
@@ -4617,7 +4617,7 @@ var SelectOption = (_a) => {
4617
4617
  const focused = !isNil_default(focusedOption) && isEqual_default(focusedOption == null ? void 0 : focusedOption.value, value);
4618
4618
  (0, import_react33.useEffect)(() => {
4619
4619
  if (!ref.current || !menuScrollContainerRef.current) return;
4620
- if ((focusedOption == null ? void 0 : focusedOption.focusType) !== "mouse" && focused) {
4620
+ if ((focusedOption == null ? void 0 : focusedOption.focusType) === "keyboard" && focused) {
4621
4621
  const scrollContainer = menuScrollContainerRef.current;
4622
4622
  const optionRect = ref.current.getBoundingClientRect();
4623
4623
  const containerRect = scrollContainer.getBoundingClientRect();
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
  }
@@ -4529,7 +4529,7 @@ var SelectOption = (_a) => {
4529
4529
  const focused = !isNil_default(focusedOption) && isEqual_default(focusedOption == null ? void 0 : focusedOption.value, value);
4530
4530
  useEffect8(() => {
4531
4531
  if (!ref.current || !menuScrollContainerRef.current) return;
4532
- if ((focusedOption == null ? void 0 : focusedOption.focusType) !== "mouse" && focused) {
4532
+ if ((focusedOption == null ? void 0 : focusedOption.focusType) === "keyboard" && focused) {
4533
4533
  const scrollContainer = menuScrollContainerRef.current;
4534
4534
  const optionRect = ref.current.getBoundingClientRect();
4535
4535
  const containerRect = scrollContainer.getBoundingClientRect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geckoui/geckoui",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "license": "MIT",
5
5
  "description": "The only thing our Gecko eats is bugs!",
6
6
  "keywords": [