@chekinapp/ui 0.0.120 → 0.0.121
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 +21 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -11
- package/dist/index.d.ts +7 -11
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3155,17 +3155,13 @@ type InfiniteScrollExtras<T, V extends SelectValue$1, L extends ReactNode> = {
|
|
|
3155
3155
|
loadMoreThreshold?: number;
|
|
3156
3156
|
getFullSearchOption?: (query: string) => SelectOption<T, V, L> | null | undefined;
|
|
3157
3157
|
};
|
|
3158
|
-
type InfiniteScrollSingleProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, '
|
|
3158
|
+
type InfiniteScrollSingleProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, 'options'> & InfiniteScrollExtras<T, V, L> & {
|
|
3159
3159
|
options?: SelectOption<T, V, L>[];
|
|
3160
3160
|
};
|
|
3161
|
-
type InfiniteScrollMultiSelectProps$1<T, V extends SelectValue$1, L extends ReactNode> = Omit<MultiSelectModeProps<T, V, L>, '
|
|
3161
|
+
type InfiniteScrollMultiSelectProps$1<T, V extends SelectValue$1, L extends ReactNode> = Omit<MultiSelectModeProps<T, V, L>, 'options'> & InfiniteScrollExtras<T, V, L> & {
|
|
3162
3162
|
options?: SelectOption<T, V, L>[];
|
|
3163
3163
|
};
|
|
3164
|
-
type InfiniteScrollSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> =
|
|
3165
|
-
isMulti?: false;
|
|
3166
|
-
}) | (InfiniteScrollMultiSelectProps$1<T, V, L> & {
|
|
3167
|
-
isMulti: true;
|
|
3168
|
-
});
|
|
3164
|
+
type InfiniteScrollSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = InfiniteScrollSingleProps<T, V, L> | InfiniteScrollMultiSelectProps$1<T, V, L>;
|
|
3169
3165
|
type InfiniteScrollSelectComponent = <T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string>(props: InfiniteScrollSelectProps<T, V, L> & {
|
|
3170
3166
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
3171
3167
|
}) => React$1.ReactElement;
|
|
@@ -3400,15 +3396,15 @@ type TimeSettings = {
|
|
|
3400
3396
|
max_time?: string;
|
|
3401
3397
|
addNextDay?: boolean;
|
|
3402
3398
|
};
|
|
3403
|
-
type TimePickerProps = Omit<SingleSelectProps<
|
|
3399
|
+
type TimePickerProps = Omit<SingleSelectProps<unknown, string, string>, 'options'> & {
|
|
3404
3400
|
format?: TimePickerFormat;
|
|
3405
3401
|
timeSettings?: TimeSettings;
|
|
3406
|
-
options?: SingleSelectProps<
|
|
3402
|
+
options?: SingleSelectProps<unknown, string, string>['options'];
|
|
3407
3403
|
};
|
|
3408
|
-
declare const TimePicker: React$1.ForwardRefExoticComponent<Omit<SingleSelectProps<
|
|
3404
|
+
declare const TimePicker: React$1.ForwardRefExoticComponent<Omit<SingleSelectProps<unknown, string, string>, "options"> & {
|
|
3409
3405
|
format?: TimePickerFormat;
|
|
3410
3406
|
timeSettings?: TimeSettings;
|
|
3411
|
-
options?: SingleSelectProps<
|
|
3407
|
+
options?: SingleSelectProps<unknown, string, string>["options"];
|
|
3412
3408
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
3413
3409
|
|
|
3414
3410
|
type FileInputValue = File | string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -3155,17 +3155,13 @@ type InfiniteScrollExtras<T, V extends SelectValue$1, L extends ReactNode> = {
|
|
|
3155
3155
|
loadMoreThreshold?: number;
|
|
3156
3156
|
getFullSearchOption?: (query: string) => SelectOption<T, V, L> | null | undefined;
|
|
3157
3157
|
};
|
|
3158
|
-
type InfiniteScrollSingleProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, '
|
|
3158
|
+
type InfiniteScrollSingleProps<T, V extends SelectValue$1, L extends ReactNode> = Omit<SingleSelectProps<T, V, L>, 'options'> & InfiniteScrollExtras<T, V, L> & {
|
|
3159
3159
|
options?: SelectOption<T, V, L>[];
|
|
3160
3160
|
};
|
|
3161
|
-
type InfiniteScrollMultiSelectProps$1<T, V extends SelectValue$1, L extends ReactNode> = Omit<MultiSelectModeProps<T, V, L>, '
|
|
3161
|
+
type InfiniteScrollMultiSelectProps$1<T, V extends SelectValue$1, L extends ReactNode> = Omit<MultiSelectModeProps<T, V, L>, 'options'> & InfiniteScrollExtras<T, V, L> & {
|
|
3162
3162
|
options?: SelectOption<T, V, L>[];
|
|
3163
3163
|
};
|
|
3164
|
-
type InfiniteScrollSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> =
|
|
3165
|
-
isMulti?: false;
|
|
3166
|
-
}) | (InfiniteScrollMultiSelectProps$1<T, V, L> & {
|
|
3167
|
-
isMulti: true;
|
|
3168
|
-
});
|
|
3164
|
+
type InfiniteScrollSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = InfiniteScrollSingleProps<T, V, L> | InfiniteScrollMultiSelectProps$1<T, V, L>;
|
|
3169
3165
|
type InfiniteScrollSelectComponent = <T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string>(props: InfiniteScrollSelectProps<T, V, L> & {
|
|
3170
3166
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
3171
3167
|
}) => React$1.ReactElement;
|
|
@@ -3400,15 +3396,15 @@ type TimeSettings = {
|
|
|
3400
3396
|
max_time?: string;
|
|
3401
3397
|
addNextDay?: boolean;
|
|
3402
3398
|
};
|
|
3403
|
-
type TimePickerProps = Omit<SingleSelectProps<
|
|
3399
|
+
type TimePickerProps = Omit<SingleSelectProps<unknown, string, string>, 'options'> & {
|
|
3404
3400
|
format?: TimePickerFormat;
|
|
3405
3401
|
timeSettings?: TimeSettings;
|
|
3406
|
-
options?: SingleSelectProps<
|
|
3402
|
+
options?: SingleSelectProps<unknown, string, string>['options'];
|
|
3407
3403
|
};
|
|
3408
|
-
declare const TimePicker: React$1.ForwardRefExoticComponent<Omit<SingleSelectProps<
|
|
3404
|
+
declare const TimePicker: React$1.ForwardRefExoticComponent<Omit<SingleSelectProps<unknown, string, string>, "options"> & {
|
|
3409
3405
|
format?: TimePickerFormat;
|
|
3410
3406
|
timeSettings?: TimeSettings;
|
|
3411
|
-
options?: SingleSelectProps<
|
|
3407
|
+
options?: SingleSelectProps<unknown, string, string>["options"];
|
|
3412
3408
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
3413
3409
|
|
|
3414
3410
|
type FileInputValue = File | string | null;
|
package/dist/index.js
CHANGED
|
@@ -14314,6 +14314,7 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14314
14314
|
filterOption: userFilterOption,
|
|
14315
14315
|
components: userComponents,
|
|
14316
14316
|
onInputChange: userOnInputChange,
|
|
14317
|
+
isMulti = false,
|
|
14317
14318
|
...rest
|
|
14318
14319
|
} = props;
|
|
14319
14320
|
const isPaginated = canLoadMore !== void 0 || isLoadingMore !== void 0 || loadMoreItems !== void 0 || onSearchChange !== void 0 || getFullSearchOption !== void 0;
|
|
@@ -14322,8 +14323,8 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14322
14323
|
const filteredOptions = React52.useMemo(() => {
|
|
14323
14324
|
const trimmed = inputValue.trim();
|
|
14324
14325
|
const valueLabel = (() => {
|
|
14325
|
-
if (
|
|
14326
|
-
const single =
|
|
14326
|
+
if (isMulti) return "";
|
|
14327
|
+
const single = rest.value;
|
|
14327
14328
|
if (!single) return "";
|
|
14328
14329
|
return rest.getValueLabel?.(single) ?? String(single.label);
|
|
14329
14330
|
})();
|
|
@@ -14337,7 +14338,7 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14337
14338
|
if (synthetic) list = [synthetic, ...list];
|
|
14338
14339
|
}
|
|
14339
14340
|
return list;
|
|
14340
|
-
}, [rawOptions, inputValue, filterOption, getFullSearchOption,
|
|
14341
|
+
}, [rawOptions, inputValue, filterOption, getFullSearchOption, isMulti, rest]);
|
|
14341
14342
|
const contextValue = React52.useMemo(
|
|
14342
14343
|
() => ({
|
|
14343
14344
|
canLoadMore,
|
|
@@ -14372,16 +14373,27 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14372
14373
|
},
|
|
14373
14374
|
[onSearchChange, userOnInputChange]
|
|
14374
14375
|
);
|
|
14375
|
-
|
|
14376
|
+
const selectExtras = {
|
|
14377
|
+
options: filteredOptions,
|
|
14378
|
+
filterOption: passthroughFilter,
|
|
14379
|
+
components,
|
|
14380
|
+
onInputChange: handleInputChange
|
|
14381
|
+
};
|
|
14382
|
+
return /* @__PURE__ */ jsx158(InfiniteScrollContext.Provider, { value: contextValue, children: isMulti ? /* @__PURE__ */ jsx158(
|
|
14376
14383
|
Select,
|
|
14377
14384
|
{
|
|
14378
14385
|
ref,
|
|
14379
14386
|
...rest,
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14387
|
+
...selectExtras,
|
|
14388
|
+
isMulti: true
|
|
14389
|
+
}
|
|
14390
|
+
) : /* @__PURE__ */ jsx158(
|
|
14391
|
+
Select,
|
|
14392
|
+
{
|
|
14393
|
+
ref,
|
|
14394
|
+
...rest,
|
|
14395
|
+
...selectExtras,
|
|
14396
|
+
isMulti: false
|
|
14385
14397
|
}
|
|
14386
14398
|
) });
|
|
14387
14399
|
}
|