beca-ui 2.0.5-beta.1 → 2.0.5-beta.3

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/beca-ui.js CHANGED
@@ -97972,35 +97972,36 @@ const Sx = IC, W$t = (e) => {
97972
97972
  }, xtt = (e, t) => ((t == null ? void 0 : t.label) ?? "").toLowerCase().includes(e.toLowerCase()), wtt = (e, t) => {
97973
97973
  var n, r, o;
97974
97974
  return ((o = (r = (n = t == null ? void 0 : t.children) == null ? void 0 : n.toString()) == null ? void 0 : r.toLowerCase()) == null ? void 0 : o.indexOf(e.toLowerCase())) >= 0;
97975
- }, Bfe = (e) => {
97975
+ }, Bfe = (e, t) => {
97976
97976
  const {
97977
- allowClear: t,
97978
- suffixIcon: n,
97979
- getPopupContainer: r,
97980
- searchByLabelAndValue: o,
97981
- searchByChildrenAndValue: i,
97982
- ...a
97983
- } = e, l = er(() => {
97977
+ allowClear: n,
97978
+ suffixIcon: r,
97979
+ getPopupContainer: o,
97980
+ searchByLabelAndValue: i,
97981
+ searchByChildrenAndValue: a,
97982
+ ...l
97983
+ } = e, s = er(() => {
97984
97984
  if (e.filterOption !== void 0)
97985
97985
  return e.filterOption;
97986
- if (o)
97987
- return xtt;
97988
97986
  if (i)
97987
+ return xtt;
97988
+ if (a)
97989
97989
  return wtt;
97990
97990
  }, [e]);
97991
97991
  return /* @__PURE__ */ F(
97992
97992
  Yc,
97993
97993
  {
97994
- ...a,
97994
+ ...l,
97995
97995
  className: btt(e),
97996
97996
  popupClassName: Stt(e),
97997
- suffixIcon: n ?? /* @__PURE__ */ F(kv, {}),
97997
+ suffixIcon: r ?? /* @__PURE__ */ F(kv, {}),
97998
97998
  menuItemSelectedIcon: /* @__PURE__ */ F(dZe, {}),
97999
97999
  removeIcon: /* @__PURE__ */ F(Xz, {}),
98000
- getPopupContainer: r ?? e.position === "relative" ? (s) => s.parentNode : void 0,
98001
- showSearch: e.showSearch || o || i,
98002
- filterOption: l,
98003
- allowClear: t === !0 ? { clearIcon: /* @__PURE__ */ F(Th, {}) } : !1
98000
+ getPopupContainer: o ?? e.position === "relative" ? (c) => c.parentNode : void 0,
98001
+ showSearch: e.showSearch || i || a,
98002
+ filterOption: s,
98003
+ allowClear: n === !0 ? { clearIcon: /* @__PURE__ */ F(Th, {}) } : !1,
98004
+ ref: t
98004
98005
  }
98005
98006
  );
98006
98007
  };
@@ -1,5 +1,6 @@
1
1
  import { SelectProps as AntSelectProps } from "antd";
2
2
  import { OptionProps as AntOptionProps } from "rc-select/lib/Option";
3
+ import type { ScrollTo } from "rc-virtual-list/lib/List";
3
4
  export interface OptionProps extends AntOptionProps {
4
5
  }
5
6
  export type PopupPosition = "relative" | "fixed";
@@ -9,3 +10,8 @@ export interface SelectProps<T = any> extends Omit<AntSelectProps<T>, "children"
9
10
  searchByLabelAndValue?: boolean;
10
11
  searchByChildrenAndValue?: boolean;
11
12
  }
13
+ export interface SelectRefs {
14
+ focus: () => void;
15
+ blur: () => void;
16
+ scrollTo: ScrollTo;
17
+ }
@@ -1,3 +1,3 @@
1
- import { SelectProps, OptionProps, PopupPosition } from "./Select.types";
1
+ import { SelectProps, OptionProps, PopupPosition, SelectRefs } from "./Select.types";
2
2
  export { default as Select } from "./Select";
3
- export type { SelectProps, OptionProps, PopupPosition };
3
+ export type { SelectProps, OptionProps, PopupPosition, SelectRefs };