@chekinapp/ui 0.0.7 → 0.0.8
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 +17 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes, FocusEventHandler } from 'react';
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
@@ -2224,6 +2224,7 @@ type DatePickerProps = {
|
|
|
2224
2224
|
value?: DatePickerValue;
|
|
2225
2225
|
defaultValue?: DatePickerValue;
|
|
2226
2226
|
onChange: (value: Date | null) => void;
|
|
2227
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2227
2228
|
placeholder?: string;
|
|
2228
2229
|
disabled?: boolean;
|
|
2229
2230
|
error?: string;
|
|
@@ -2400,6 +2401,7 @@ type PhoneFieldProps = {
|
|
|
2400
2401
|
topLabel?: string;
|
|
2401
2402
|
value?: PhoneFieldValue | null;
|
|
2402
2403
|
onChange: (value: PhoneFieldValue) => void;
|
|
2404
|
+
onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
|
|
2403
2405
|
options: PhoneFieldOption[];
|
|
2404
2406
|
placeholder?: string;
|
|
2405
2407
|
disabled?: boolean;
|
|
@@ -2439,11 +2441,13 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
|
|
|
2439
2441
|
triggerRef: React$1.Ref<HTMLButtonElement>;
|
|
2440
2442
|
onClick: () => void;
|
|
2441
2443
|
onKeyDown: React$1.KeyboardEventHandler<HTMLButtonElement>;
|
|
2444
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2442
2445
|
};
|
|
2443
2446
|
type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
|
|
2444
|
-
options
|
|
2447
|
+
options?: SelectOption<T, V, L>[];
|
|
2445
2448
|
value?: SelectOption<T, V, L> | null;
|
|
2446
2449
|
onChange: (option: SelectOption<T, V, L>) => void;
|
|
2450
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2447
2451
|
variant?: 'default' | 'airbnb';
|
|
2448
2452
|
label: string;
|
|
2449
2453
|
topLabel?: string;
|
|
@@ -2481,6 +2485,7 @@ type SearchableSelectProps<T = undefined, V extends SearchableSelectValue = stri
|
|
|
2481
2485
|
options: SelectOption<T, V, L>[];
|
|
2482
2486
|
value?: SelectOption<T, V, L> | null;
|
|
2483
2487
|
onChange: (option: SelectOption<T, V, L>) => void;
|
|
2488
|
+
onBlur?: FocusEventHandler<HTMLButtonElement>;
|
|
2484
2489
|
onOpenChange?: (open: boolean) => void;
|
|
2485
2490
|
searchValue?: string;
|
|
2486
2491
|
onSearchChange?: (value: string) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes, FocusEventHandler } from 'react';
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
@@ -2224,6 +2224,7 @@ type DatePickerProps = {
|
|
|
2224
2224
|
value?: DatePickerValue;
|
|
2225
2225
|
defaultValue?: DatePickerValue;
|
|
2226
2226
|
onChange: (value: Date | null) => void;
|
|
2227
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2227
2228
|
placeholder?: string;
|
|
2228
2229
|
disabled?: boolean;
|
|
2229
2230
|
error?: string;
|
|
@@ -2400,6 +2401,7 @@ type PhoneFieldProps = {
|
|
|
2400
2401
|
topLabel?: string;
|
|
2401
2402
|
value?: PhoneFieldValue | null;
|
|
2402
2403
|
onChange: (value: PhoneFieldValue) => void;
|
|
2404
|
+
onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
|
|
2403
2405
|
options: PhoneFieldOption[];
|
|
2404
2406
|
placeholder?: string;
|
|
2405
2407
|
disabled?: boolean;
|
|
@@ -2439,11 +2441,13 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
|
|
|
2439
2441
|
triggerRef: React$1.Ref<HTMLButtonElement>;
|
|
2440
2442
|
onClick: () => void;
|
|
2441
2443
|
onKeyDown: React$1.KeyboardEventHandler<HTMLButtonElement>;
|
|
2444
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2442
2445
|
};
|
|
2443
2446
|
type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
|
|
2444
|
-
options
|
|
2447
|
+
options?: SelectOption<T, V, L>[];
|
|
2445
2448
|
value?: SelectOption<T, V, L> | null;
|
|
2446
2449
|
onChange: (option: SelectOption<T, V, L>) => void;
|
|
2450
|
+
onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
|
|
2447
2451
|
variant?: 'default' | 'airbnb';
|
|
2448
2452
|
label: string;
|
|
2449
2453
|
topLabel?: string;
|
|
@@ -2481,6 +2485,7 @@ type SearchableSelectProps<T = undefined, V extends SearchableSelectValue = stri
|
|
|
2481
2485
|
options: SelectOption<T, V, L>[];
|
|
2482
2486
|
value?: SelectOption<T, V, L> | null;
|
|
2483
2487
|
onChange: (option: SelectOption<T, V, L>) => void;
|
|
2488
|
+
onBlur?: FocusEventHandler<HTMLButtonElement>;
|
|
2484
2489
|
onOpenChange?: (open: boolean) => void;
|
|
2485
2490
|
searchValue?: string;
|
|
2486
2491
|
onSearchChange?: (value: string) => void;
|
package/dist/index.js
CHANGED
|
@@ -8937,6 +8937,7 @@ var DatePicker = React30.forwardRef(
|
|
|
8937
8937
|
value,
|
|
8938
8938
|
defaultValue,
|
|
8939
8939
|
onChange,
|
|
8940
|
+
onBlur,
|
|
8940
8941
|
placeholder = "Select a date",
|
|
8941
8942
|
disabled,
|
|
8942
8943
|
error,
|
|
@@ -9078,6 +9079,7 @@ var DatePicker = React30.forwardRef(
|
|
|
9078
9079
|
"aria-expanded": isOpen,
|
|
9079
9080
|
onClick: handleTriggerClick,
|
|
9080
9081
|
onKeyDown: handleTriggerKeyDown,
|
|
9082
|
+
onBlur,
|
|
9081
9083
|
trailingAdornment: /* @__PURE__ */ jsx121(Calendar2, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
9082
9084
|
}
|
|
9083
9085
|
),
|
|
@@ -9749,7 +9751,8 @@ var SelectTrigger2 = React32.forwardRef(
|
|
|
9749
9751
|
listboxId,
|
|
9750
9752
|
describedBy,
|
|
9751
9753
|
onClick,
|
|
9752
|
-
onKeyDown
|
|
9754
|
+
onKeyDown,
|
|
9755
|
+
onBlur
|
|
9753
9756
|
}, ref) => {
|
|
9754
9757
|
return /* @__PURE__ */ jsx128(
|
|
9755
9758
|
FieldTrigger,
|
|
@@ -9779,6 +9782,7 @@ var SelectTrigger2 = React32.forwardRef(
|
|
|
9779
9782
|
disabled,
|
|
9780
9783
|
onClick,
|
|
9781
9784
|
onKeyDown,
|
|
9785
|
+
onBlur,
|
|
9782
9786
|
trailingAdornment: /* @__PURE__ */ jsx128(
|
|
9783
9787
|
ChevronDown,
|
|
9784
9788
|
{
|
|
@@ -10195,9 +10199,10 @@ function useOutsideClick(elementRef, onOutsideClick, nested) {
|
|
|
10195
10199
|
// src/airbnb/select/Select.tsx
|
|
10196
10200
|
import { jsx as jsx129, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
10197
10201
|
var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
|
|
10198
|
-
options,
|
|
10202
|
+
options = [],
|
|
10199
10203
|
value,
|
|
10200
10204
|
onChange,
|
|
10205
|
+
onBlur,
|
|
10201
10206
|
variant = "default",
|
|
10202
10207
|
label,
|
|
10203
10208
|
topLabel,
|
|
@@ -10391,7 +10396,8 @@ var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
|
|
|
10391
10396
|
describedBy,
|
|
10392
10397
|
triggerRef: combinedRef,
|
|
10393
10398
|
onClick: handleTriggerClick,
|
|
10394
|
-
onKeyDown: handleRootTriggerKeyDown
|
|
10399
|
+
onKeyDown: handleRootTriggerKeyDown,
|
|
10400
|
+
onBlur
|
|
10395
10401
|
}) : /* @__PURE__ */ jsx129(
|
|
10396
10402
|
SelectTrigger2,
|
|
10397
10403
|
{
|
|
@@ -10416,7 +10422,8 @@ var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
|
|
|
10416
10422
|
listboxId,
|
|
10417
10423
|
describedBy,
|
|
10418
10424
|
onClick: handleTriggerClick,
|
|
10419
|
-
onKeyDown: handleRootTriggerKeyDown
|
|
10425
|
+
onKeyDown: handleRootTriggerKeyDown,
|
|
10426
|
+
onBlur
|
|
10420
10427
|
}
|
|
10421
10428
|
),
|
|
10422
10429
|
isMobile ? /* @__PURE__ */ jsx129(
|
|
@@ -10486,6 +10493,7 @@ var PhoneField = React37.forwardRef(
|
|
|
10486
10493
|
topLabel,
|
|
10487
10494
|
value,
|
|
10488
10495
|
onChange,
|
|
10496
|
+
onBlur,
|
|
10489
10497
|
options,
|
|
10490
10498
|
placeholder = "Phone number",
|
|
10491
10499
|
disabled,
|
|
@@ -10506,7 +10514,7 @@ var PhoneField = React37.forwardRef(
|
|
|
10506
10514
|
const codeOptions = React37.useMemo(
|
|
10507
10515
|
() => options.map((option) => ({
|
|
10508
10516
|
value: option.value,
|
|
10509
|
-
label: option.label
|
|
10517
|
+
label: `${option.label} (${option.value})`,
|
|
10510
10518
|
disabled: option.disabled
|
|
10511
10519
|
})),
|
|
10512
10520
|
[options]
|
|
@@ -10641,7 +10649,8 @@ var PhoneField = React37.forwardRef(
|
|
|
10641
10649
|
onChange: (event) => onChange({
|
|
10642
10650
|
code: value?.code ?? "",
|
|
10643
10651
|
number: event.target.value
|
|
10644
|
-
})
|
|
10652
|
+
}),
|
|
10653
|
+
onBlur
|
|
10645
10654
|
}
|
|
10646
10655
|
)
|
|
10647
10656
|
] }),
|
|
@@ -10709,6 +10718,7 @@ var SearchableSelectInternal = ({
|
|
|
10709
10718
|
options,
|
|
10710
10719
|
value,
|
|
10711
10720
|
onChange,
|
|
10721
|
+
onBlur,
|
|
10712
10722
|
onOpenChange,
|
|
10713
10723
|
searchValue,
|
|
10714
10724
|
onSearchChange,
|
|
@@ -10926,6 +10936,7 @@ var SearchableSelectInternal = ({
|
|
|
10926
10936
|
openSelect();
|
|
10927
10937
|
},
|
|
10928
10938
|
onKeyDown: handleTriggerKeyDown,
|
|
10939
|
+
onBlur,
|
|
10929
10940
|
trailingAdornment: /* @__PURE__ */ jsx132(
|
|
10930
10941
|
ChevronDown3,
|
|
10931
10942
|
{
|