@chekinapp/ui 0.0.110 → 0.0.111

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.cts CHANGED
@@ -7,6 +7,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
8
8
  import * as TabsPrimitive from '@radix-ui/react-tabs';
9
9
  import { DayPicker, PropsRange, PropsBase, DateRange, Matcher } from 'react-day-picker';
10
+ export { DateRange } from 'react-day-picker';
10
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
12
  import { ColumnDef } from '@tanstack/react-table';
12
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -2917,13 +2918,18 @@ declare function formatPhoneCodeOptionLabel(option: PhoneInputOption): string;
2917
2918
 
2918
2919
  type SelectValue$1 = string | number;
2919
2920
  type SelectFilterOption<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = (option: SelectOption<T, V, L>, input: string) => boolean;
2921
+ type SelectIsOptionDisabled<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = (option: SelectOption<T, V, L>) => boolean;
2922
+ type SelectChangeAction = 'select' | 'deselect' | 'clear' | 'create';
2923
+ type SelectChangeMeta = {
2924
+ action: SelectChangeAction;
2925
+ };
2920
2926
 
2921
2927
  type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = {
2922
2928
  options?: SelectOption<T, V, L>[];
2923
2929
  value?: SelectOption<T, V, L> | null;
2924
- onChange: (option: SelectOption<T, V, L> | null) => void;
2930
+ onChange: (option: SelectOption<T, V, L> | null, meta?: SelectChangeMeta) => void;
2925
2931
  onBlur?: React$1.FocusEventHandler<HTMLDivElement>;
2926
- label: string;
2932
+ label?: string;
2927
2933
  topLabel?: string;
2928
2934
  placeholder?: string;
2929
2935
  getValueLabel?: (option: SelectOption<T, V, L>) => string;
@@ -2943,6 +2949,7 @@ type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends Reac
2943
2949
  width?: number | string;
2944
2950
  noOptionsMessage?: () => string | undefined;
2945
2951
  filterOption?: SelectFilterOption<T, V, L>;
2952
+ isOptionDisabled?: SelectIsOptionDisabled<T, V, L>;
2946
2953
  helperText?: string;
2947
2954
  clearable?: boolean;
2948
2955
  isCreatable?: boolean;
@@ -2997,7 +3004,7 @@ type MultiSelectChipRenderer<T, V extends SelectValue$1, L extends ReactNode> =
2997
3004
  type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = {
2998
3005
  options?: SelectOption<T, V, L>[];
2999
3006
  value?: SelectOption<T, V, L>[] | null;
3000
- onChange: (value: SelectOption<T, V, L>[]) => void;
3007
+ onChange: (value: SelectOption<T, V, L>[], meta?: SelectChangeMeta) => void;
3001
3008
  onBlur?: React$1.FocusEventHandler<HTMLDivElement>;
3002
3009
  label: string;
3003
3010
  topLabel?: string;
@@ -3018,6 +3025,7 @@ type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends
3018
3025
  width?: number | string;
3019
3026
  noOptionsMessage?: () => string | undefined;
3020
3027
  filterOption?: SelectFilterOption<T, V, L>;
3028
+ isOptionDisabled?: SelectIsOptionDisabled<T, V, L>;
3021
3029
  closeMenuOnSelect?: boolean;
3022
3030
  renderChip?: MultiSelectChipRenderer<T, V, L>;
3023
3031
  helperText?: string;
@@ -3026,7 +3034,7 @@ type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends
3026
3034
  formatCreateLabel?: (input: string) => React$1.ReactNode;
3027
3035
  isValidNewOption?: (input: string, selected: SelectOption<T, V, L>[], options: SelectOption<T, V, L>[]) => boolean;
3028
3036
  };
3029
- type MultiSelectComponent = <T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string>(props: MultiSelectProps<T, V, L> & {
3037
+ type MultiSelectComponent = <T = unknown, V extends SelectValue$1 = string, L extends ReactNode = string>(props: MultiSelectProps<T, V, L> & {
3030
3038
  ref?: React$1.Ref<HTMLDivElement>;
3031
3039
  }) => React$1.ReactElement;
3032
3040
  declare const MultiSelect: MultiSelectComponent;
@@ -3516,7 +3524,8 @@ type Props$1 = {
3516
3524
  enabled?: boolean;
3517
3525
  onFinish?: () => void;
3518
3526
  };
3519
- declare const useCountdown: ({ initialTime, enabled, onFinish, }?: Props$1) => {
3527
+ declare const useCountdown: ({ initialTime, enabled, onFinish }?: Props$1) => {
3528
+ count: number;
3520
3529
  timeLeft: number;
3521
3530
  isTimerRunning: boolean;
3522
3531
  resetTimer: () => void;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
8
8
  import * as TabsPrimitive from '@radix-ui/react-tabs';
9
9
  import { DayPicker, PropsRange, PropsBase, DateRange, Matcher } from 'react-day-picker';
10
+ export { DateRange } from 'react-day-picker';
10
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
12
  import { ColumnDef } from '@tanstack/react-table';
12
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -2917,13 +2918,18 @@ declare function formatPhoneCodeOptionLabel(option: PhoneInputOption): string;
2917
2918
 
2918
2919
  type SelectValue$1 = string | number;
2919
2920
  type SelectFilterOption<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = (option: SelectOption<T, V, L>, input: string) => boolean;
2921
+ type SelectIsOptionDisabled<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = (option: SelectOption<T, V, L>) => boolean;
2922
+ type SelectChangeAction = 'select' | 'deselect' | 'clear' | 'create';
2923
+ type SelectChangeMeta = {
2924
+ action: SelectChangeAction;
2925
+ };
2920
2926
 
2921
2927
  type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = {
2922
2928
  options?: SelectOption<T, V, L>[];
2923
2929
  value?: SelectOption<T, V, L> | null;
2924
- onChange: (option: SelectOption<T, V, L> | null) => void;
2930
+ onChange: (option: SelectOption<T, V, L> | null, meta?: SelectChangeMeta) => void;
2925
2931
  onBlur?: React$1.FocusEventHandler<HTMLDivElement>;
2926
- label: string;
2932
+ label?: string;
2927
2933
  topLabel?: string;
2928
2934
  placeholder?: string;
2929
2935
  getValueLabel?: (option: SelectOption<T, V, L>) => string;
@@ -2943,6 +2949,7 @@ type SelectProps<T = undefined, V extends SelectValue$1 = string, L extends Reac
2943
2949
  width?: number | string;
2944
2950
  noOptionsMessage?: () => string | undefined;
2945
2951
  filterOption?: SelectFilterOption<T, V, L>;
2952
+ isOptionDisabled?: SelectIsOptionDisabled<T, V, L>;
2946
2953
  helperText?: string;
2947
2954
  clearable?: boolean;
2948
2955
  isCreatable?: boolean;
@@ -2997,7 +3004,7 @@ type MultiSelectChipRenderer<T, V extends SelectValue$1, L extends ReactNode> =
2997
3004
  type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string> = {
2998
3005
  options?: SelectOption<T, V, L>[];
2999
3006
  value?: SelectOption<T, V, L>[] | null;
3000
- onChange: (value: SelectOption<T, V, L>[]) => void;
3007
+ onChange: (value: SelectOption<T, V, L>[], meta?: SelectChangeMeta) => void;
3001
3008
  onBlur?: React$1.FocusEventHandler<HTMLDivElement>;
3002
3009
  label: string;
3003
3010
  topLabel?: string;
@@ -3018,6 +3025,7 @@ type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends
3018
3025
  width?: number | string;
3019
3026
  noOptionsMessage?: () => string | undefined;
3020
3027
  filterOption?: SelectFilterOption<T, V, L>;
3028
+ isOptionDisabled?: SelectIsOptionDisabled<T, V, L>;
3021
3029
  closeMenuOnSelect?: boolean;
3022
3030
  renderChip?: MultiSelectChipRenderer<T, V, L>;
3023
3031
  helperText?: string;
@@ -3026,7 +3034,7 @@ type MultiSelectProps<T = undefined, V extends SelectValue$1 = string, L extends
3026
3034
  formatCreateLabel?: (input: string) => React$1.ReactNode;
3027
3035
  isValidNewOption?: (input: string, selected: SelectOption<T, V, L>[], options: SelectOption<T, V, L>[]) => boolean;
3028
3036
  };
3029
- type MultiSelectComponent = <T = undefined, V extends SelectValue$1 = string, L extends ReactNode = string>(props: MultiSelectProps<T, V, L> & {
3037
+ type MultiSelectComponent = <T = unknown, V extends SelectValue$1 = string, L extends ReactNode = string>(props: MultiSelectProps<T, V, L> & {
3030
3038
  ref?: React$1.Ref<HTMLDivElement>;
3031
3039
  }) => React$1.ReactElement;
3032
3040
  declare const MultiSelect: MultiSelectComponent;
@@ -3516,7 +3524,8 @@ type Props$1 = {
3516
3524
  enabled?: boolean;
3517
3525
  onFinish?: () => void;
3518
3526
  };
3519
- declare const useCountdown: ({ initialTime, enabled, onFinish, }?: Props$1) => {
3527
+ declare const useCountdown: ({ initialTime, enabled, onFinish }?: Props$1) => {
3528
+ count: number;
3520
3529
  timeLeft: number;
3521
3530
  isTimerRunning: boolean;
3522
3531
  resetTimer: () => void;