@chekinapp/ui 0.0.118 → 0.0.119

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.cjs CHANGED
@@ -14203,7 +14203,8 @@ function SelectInternal(props, ref) {
14203
14203
  menuHeader,
14204
14204
  onMenuScrollToBottom,
14205
14205
  leftIcon,
14206
- formatGroupLabel
14206
+ formatGroupLabel,
14207
+ onReset
14207
14208
  } = props;
14208
14209
  const isSearchInDropdown = searchPosition === "dropdown";
14209
14210
  const isMulti = props.isMulti === true;
@@ -14270,7 +14271,10 @@ function SelectInternal(props, ref) {
14270
14271
  const resolvedLabel = label ?? placeholder;
14271
14272
  const hasInvalidState = state.hasInvalidState || Boolean(invalid);
14272
14273
  const hiddenValue = isMulti ? selectedOptions.map((item) => String(item.value)).join(",") : selectedOptions[0] ? String(selectedOptions[0].value) : "";
14273
- const handleClear = (event) => state.clearSelection(event);
14274
+ const handleClear = (event) => {
14275
+ state.clearSelection(event);
14276
+ onReset?.();
14277
+ };
14274
14278
  const { Control, MenuList, CreateOption } = components;
14275
14279
  return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
14276
14280
  SelectFieldShell,
@@ -14502,7 +14506,14 @@ function VirtualMenuList(props) {
14502
14506
  if (lastLoadMoreOptionsLengthRef.current === options.length) return;
14503
14507
  lastLoadMoreOptionsLengthRef.current = options.length;
14504
14508
  loadMoreItems();
14505
- }, [virtualItems, options.length]);
14509
+ }, [
14510
+ virtualItems,
14511
+ options.length,
14512
+ canLoadMore,
14513
+ isLoadingMore,
14514
+ loadMoreItems,
14515
+ loadMoreThreshold
14516
+ ]);
14506
14517
  React51.useEffect(() => {
14507
14518
  const changed = previousHighlightedIndexRef.current !== highlightedIndex;
14508
14519
  previousHighlightedIndexRef.current = highlightedIndex;
@@ -14678,14 +14689,7 @@ function InfiniteScrollSelectInternal(props, ref) {
14678
14689
  if (synthetic) list = [synthetic, ...list];
14679
14690
  }
14680
14691
  return list;
14681
- }, [
14682
- rawOptions,
14683
- inputValue,
14684
- filterOption,
14685
- getFullSearchOption,
14686
- rest.getValueLabel,
14687
- props
14688
- ]);
14692
+ }, [rawOptions, inputValue, filterOption, getFullSearchOption, props, rest]);
14689
14693
  const contextValue = React52.useMemo(
14690
14694
  () => ({
14691
14695
  canLoadMore,
@@ -14749,13 +14753,7 @@ function hasPaginationProps(props) {
14749
14753
  return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0 || props.getFullSearchOption !== void 0;
14750
14754
  }
14751
14755
  function SearchingSelectInternal(props, ref) {
14752
- const {
14753
- trigger,
14754
- components: userComponents,
14755
- searchPlaceholder,
14756
- searchable = true,
14757
- ...rest
14758
- } = props;
14756
+ const { trigger, components: userComponents, searchable = true, ...rest } = props;
14759
14757
  const Control = React53.useMemo(() => {
14760
14758
  if (trigger) return makeTriggerSlot(trigger);
14761
14759
  return StaticControl;
@@ -15222,7 +15220,7 @@ function SelectCheckboxesInternal(props, ref) {
15222
15220
  paginationAndRest
15223
15221
  );
15224
15222
  const [inputValue, setInputValue] = React59.useState("");
15225
- const selected = value ?? [];
15223
+ const selected = React59.useMemo(() => value ?? [], [value]);
15226
15224
  const flatRawOptions = React59.useMemo(
15227
15225
  () => flattenGroupedOptions(rawOptions),
15228
15226
  [rawOptions]
@@ -16292,7 +16290,7 @@ var Datepicker = React63.forwardRef(
16292
16290
  React63.useImperativeHandle(
16293
16291
  ref,
16294
16292
  () => dayInputRef.current ?? mobileTriggerRef.current,
16295
- [isMobile3]
16293
+ []
16296
16294
  );
16297
16295
  React63.useEffect(() => {
16298
16296
  if (!isControlled) return;