@chekinapp/ui 0.0.106 → 0.0.108
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 +62 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -50
- package/dist/index.d.ts +50 -50
- package/dist/index.js +51 -42
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -94,22 +94,14 @@ __export(index_exports, {
|
|
|
94
94
|
CopyString: () => CopyString,
|
|
95
95
|
Counter: () => Counter,
|
|
96
96
|
CounterSize: () => CounterSize,
|
|
97
|
+
CreatableMultiSelect: () => CreatableMultiSelect,
|
|
97
98
|
CustomCheckboxDropdownGroup: () => CustomCheckboxDropdownGroup,
|
|
98
99
|
DEFAULT_DISPLAY_FORMAT: () => DEFAULT_DISPLAY_FORMAT,
|
|
99
100
|
DEVICE_BREAKPOINTS: () => DEVICE_BREAKPOINTS,
|
|
100
|
-
DashboardCreatableMultiSelect: () => DashboardCreatableMultiSelect,
|
|
101
|
-
DashboardDateRangePicker: () => DashboardDateRangePicker,
|
|
102
|
-
DashboardDatepicker: () => DashboardDatepicker,
|
|
103
|
-
DashboardFileInput: () => DashboardFileInput,
|
|
104
|
-
DashboardInfiniteScrollSelect: () => DashboardInfiniteScrollSelect,
|
|
105
|
-
DashboardInput: () => DashboardInput,
|
|
106
|
-
DashboardMultiSelect: () => DashboardMultiSelect,
|
|
107
|
-
DashboardSelect: () => DashboardSelect,
|
|
108
|
-
DashboardSelectIconsBox: () => DashboardSelectIconsBox,
|
|
109
|
-
DashboardTextarea: () => DashboardTextarea,
|
|
110
|
-
DashboardTimePicker: () => DashboardTimePicker,
|
|
111
101
|
DataTable: () => DataTable,
|
|
102
|
+
DateRangePicker: () => DateRangePicker,
|
|
112
103
|
DateTableFilter: () => DateTableFilter,
|
|
104
|
+
Datepicker: () => Datepicker,
|
|
113
105
|
DebouncedSearchInput: () => DebouncedSearchInput,
|
|
114
106
|
DefaultSelectTrigger: () => DefaultSelectTrigger,
|
|
115
107
|
Dialog: () => Dialog,
|
|
@@ -162,6 +154,7 @@ __export(index_exports, {
|
|
|
162
154
|
ExpandableContent: () => ExpandableContent,
|
|
163
155
|
ExternalLink: () => ExternalLink,
|
|
164
156
|
FieldErrorMessage: () => FieldErrorMessage,
|
|
157
|
+
FileInput: () => FileInput,
|
|
165
158
|
FileInputButton: () => FileInputButton,
|
|
166
159
|
FormBox: () => FormBox,
|
|
167
160
|
FormBoxContent: () => Content5,
|
|
@@ -177,7 +170,9 @@ __export(index_exports, {
|
|
|
177
170
|
IconsDropdown: () => IconsDropdown,
|
|
178
171
|
Image: () => Image2,
|
|
179
172
|
ImageFullScreenView: () => ImageFullScreenView,
|
|
173
|
+
InfiniteScrollSelect: () => InfiniteScrollSelect,
|
|
180
174
|
InfoBox: () => InfoBox,
|
|
175
|
+
Input: () => Input,
|
|
181
176
|
InputOTP: () => InputOTP,
|
|
182
177
|
InputOTPGroup: () => InputOTPGroup,
|
|
183
178
|
InputOTPSeparator: () => InputOTPSeparator,
|
|
@@ -207,6 +202,7 @@ __export(index_exports, {
|
|
|
207
202
|
Modal: () => Modal,
|
|
208
203
|
ModalButton: () => ModalButton,
|
|
209
204
|
ModalLoader: () => ModalLoader,
|
|
205
|
+
MultiSelect: () => MultiSelect,
|
|
210
206
|
NumberedList: () => NumberedList,
|
|
211
207
|
OverlayLoader: () => OverlayLoader,
|
|
212
208
|
Pagination: () => Pagination,
|
|
@@ -236,6 +232,8 @@ __export(index_exports, {
|
|
|
236
232
|
SectionGroup: () => SectionGroup,
|
|
237
233
|
SectionTag: () => SectionTag,
|
|
238
234
|
SectionTagColors: () => SectionTagColors,
|
|
235
|
+
Select: () => Select,
|
|
236
|
+
SelectIconsBox: () => SelectIconsBox,
|
|
239
237
|
Separator: () => Separator3,
|
|
240
238
|
Sheet: () => Sheet,
|
|
241
239
|
SheetClose: () => SheetClose,
|
|
@@ -300,7 +298,9 @@ __export(index_exports, {
|
|
|
300
298
|
TabsContent: () => TabsContent,
|
|
301
299
|
TabsList: () => TabsList,
|
|
302
300
|
TabsTrigger: () => TabsTrigger,
|
|
301
|
+
Textarea: () => Textarea,
|
|
303
302
|
ThreeDotsLoader: () => ThreeDotsLoader,
|
|
303
|
+
TimePicker: () => TimePicker,
|
|
304
304
|
Timeline: () => Timeline,
|
|
305
305
|
TimelineConnector: () => TimelineConnector,
|
|
306
306
|
TimelineContent: () => TimelineContent,
|
|
@@ -12429,7 +12429,8 @@ var checkIfEmpty = ({
|
|
|
12429
12429
|
if (value === 0 || defaultValue === 0) return false;
|
|
12430
12430
|
return !value && !defaultValue;
|
|
12431
12431
|
};
|
|
12432
|
-
var
|
|
12432
|
+
var checkInputValueIfEmpty = (value) => value.length === 0;
|
|
12433
|
+
var Input = React43.forwardRef(
|
|
12433
12434
|
({
|
|
12434
12435
|
value,
|
|
12435
12436
|
defaultValue,
|
|
@@ -12471,10 +12472,15 @@ var DashboardInput = React43.forwardRef(
|
|
|
12471
12472
|
const inputId = id ?? name ?? generatedId;
|
|
12472
12473
|
const errorId = `${inputId}-error`;
|
|
12473
12474
|
const { t } = (0, import_react_i18next26.useTranslation)();
|
|
12474
|
-
const
|
|
12475
|
+
const isEmptyControlled = typeof empty !== "undefined" || typeof value !== "undefined";
|
|
12476
|
+
const propsAreEmpty = checkIfEmpty({ empty, value, defaultValue });
|
|
12477
|
+
const [uncontrolledIsEmpty, setUncontrolledIsEmpty] = React43.useState(propsAreEmpty);
|
|
12478
|
+
const isEmpty = isEmptyControlled ? propsAreEmpty : uncontrolledIsEmpty;
|
|
12475
12479
|
const [inputType, setInputType] = React43.useState(type);
|
|
12476
12480
|
const [isPasswordRevealed, setIsPasswordRevealed] = React43.useState(false);
|
|
12477
12481
|
const [isFocused, setIsFocused] = React43.useState(false);
|
|
12482
|
+
const inputRef = React43.useRef(null);
|
|
12483
|
+
const combinedInputRef = useCombinedRef(inputRef, ref);
|
|
12478
12484
|
const prevInputType = usePrevious(inputType);
|
|
12479
12485
|
const isPasswordReveal = (prevInputType === "password" || type === "password") && !isEmpty;
|
|
12480
12486
|
const hasInvalidState = Boolean(invalid) || Boolean(error) && error !== "NONE";
|
|
@@ -12492,12 +12498,15 @@ var DashboardInput = React43.forwardRef(
|
|
|
12492
12498
|
setInputType(type);
|
|
12493
12499
|
}, [type]);
|
|
12494
12500
|
const handleChange = (event) => {
|
|
12495
|
-
if (readOnly || disabled
|
|
12496
|
-
|
|
12501
|
+
if (readOnly || disabled) return;
|
|
12502
|
+
if (!isEmptyControlled) {
|
|
12503
|
+
setUncontrolledIsEmpty(checkInputValueIfEmpty(event.currentTarget.value));
|
|
12504
|
+
}
|
|
12505
|
+
onChange?.(event);
|
|
12497
12506
|
};
|
|
12498
12507
|
const handleLabelClick = () => {
|
|
12499
|
-
if (readOnly || disabled) return;
|
|
12500
|
-
|
|
12508
|
+
if (readOnly || disabled || loading) return;
|
|
12509
|
+
inputRef.current?.focus();
|
|
12501
12510
|
};
|
|
12502
12511
|
const handleFocus = (event) => {
|
|
12503
12512
|
if (readOnly || disabled) return;
|
|
@@ -12565,7 +12574,7 @@ var DashboardInput = React43.forwardRef(
|
|
|
12565
12574
|
"input",
|
|
12566
12575
|
{
|
|
12567
12576
|
...props,
|
|
12568
|
-
ref,
|
|
12577
|
+
ref: combinedInputRef,
|
|
12569
12578
|
id: inputId,
|
|
12570
12579
|
name,
|
|
12571
12580
|
type: inputType,
|
|
@@ -12679,7 +12688,7 @@ var DashboardInput = React43.forwardRef(
|
|
|
12679
12688
|
);
|
|
12680
12689
|
}
|
|
12681
12690
|
);
|
|
12682
|
-
|
|
12691
|
+
Input.displayName = "Input";
|
|
12683
12692
|
|
|
12684
12693
|
// src/dashboard/select/Select.tsx
|
|
12685
12694
|
var React47 = __toESM(require("react"), 1);
|
|
@@ -13118,7 +13127,7 @@ function useSelectSearch({
|
|
|
13118
13127
|
|
|
13119
13128
|
// src/dashboard/select/Select.tsx
|
|
13120
13129
|
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
13121
|
-
function
|
|
13130
|
+
function SelectInternal({
|
|
13122
13131
|
options = [],
|
|
13123
13132
|
value,
|
|
13124
13133
|
onChange,
|
|
@@ -13348,8 +13357,8 @@ function DashboardSelectInternal({
|
|
|
13348
13357
|
}
|
|
13349
13358
|
);
|
|
13350
13359
|
}
|
|
13351
|
-
var
|
|
13352
|
-
|
|
13360
|
+
var Select = React47.forwardRef(
|
|
13361
|
+
SelectInternal
|
|
13353
13362
|
);
|
|
13354
13363
|
|
|
13355
13364
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
@@ -13389,7 +13398,7 @@ function MultiSelectChip({
|
|
|
13389
13398
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
13390
13399
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
13391
13400
|
var isValueSelected = (selected, option) => selected.some((item) => item.value === option.value);
|
|
13392
|
-
function
|
|
13401
|
+
function MultiSelectInternal({
|
|
13393
13402
|
options = [],
|
|
13394
13403
|
value,
|
|
13395
13404
|
onChange,
|
|
@@ -13791,16 +13800,16 @@ function DashboardMultiSelectInternal({
|
|
|
13791
13800
|
}
|
|
13792
13801
|
);
|
|
13793
13802
|
}
|
|
13794
|
-
var
|
|
13795
|
-
|
|
13803
|
+
var MultiSelect = React48.forwardRef(
|
|
13804
|
+
MultiSelectInternal
|
|
13796
13805
|
);
|
|
13797
13806
|
|
|
13798
13807
|
// src/dashboard/creatable-multi-select/CreatableMultiSelect.tsx
|
|
13799
13808
|
var React49 = __toESM(require("react"), 1);
|
|
13800
13809
|
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
13801
|
-
var
|
|
13802
|
-
function
|
|
13803
|
-
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
13810
|
+
var CreatableMultiSelect = React49.forwardRef(
|
|
13811
|
+
function CreatableMultiSelect2(props, ref) {
|
|
13812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(MultiSelect, { ref, ...props, isCreatable: true });
|
|
13804
13813
|
}
|
|
13805
13814
|
);
|
|
13806
13815
|
|
|
@@ -13906,7 +13915,7 @@ var DEFAULT_ITEM_HEIGHT = 60;
|
|
|
13906
13915
|
var DEFAULT_LIST_HEIGHT = 322;
|
|
13907
13916
|
var DEFAULT_OVERSCAN = 5;
|
|
13908
13917
|
var DEFAULT_LOAD_MORE_THRESHOLD = 5;
|
|
13909
|
-
function
|
|
13918
|
+
function InfiniteScrollSelectInternal({
|
|
13910
13919
|
options = [],
|
|
13911
13920
|
value,
|
|
13912
13921
|
onChange,
|
|
@@ -14185,8 +14194,8 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
14185
14194
|
}
|
|
14186
14195
|
);
|
|
14187
14196
|
}
|
|
14188
|
-
var
|
|
14189
|
-
|
|
14197
|
+
var InfiniteScrollSelect = React50.forwardRef(
|
|
14198
|
+
InfiniteScrollSelectInternal
|
|
14190
14199
|
);
|
|
14191
14200
|
|
|
14192
14201
|
// src/dashboard/textarea/Textarea.tsx
|
|
@@ -14200,8 +14209,8 @@ function getEmptyState(empty, value, defaultValue) {
|
|
|
14200
14209
|
if (value !== void 0) return !String(value);
|
|
14201
14210
|
return !defaultValue;
|
|
14202
14211
|
}
|
|
14203
|
-
var
|
|
14204
|
-
function
|
|
14212
|
+
var Textarea = React51.forwardRef(
|
|
14213
|
+
function Textarea2({
|
|
14205
14214
|
className,
|
|
14206
14215
|
textareaClassName,
|
|
14207
14216
|
label,
|
|
@@ -14998,8 +15007,8 @@ function dateFromParts(day, monthIndex, year) {
|
|
|
14998
15007
|
if (!isValidCalendarDate(yearNum, monthIndex, dayNum)) return null;
|
|
14999
15008
|
return new Date(yearNum, monthIndex, dayNum);
|
|
15000
15009
|
}
|
|
15001
|
-
var
|
|
15002
|
-
function
|
|
15010
|
+
var Datepicker = React53.forwardRef(
|
|
15011
|
+
function Datepicker2({
|
|
15003
15012
|
label,
|
|
15004
15013
|
value,
|
|
15005
15014
|
defaultValue,
|
|
@@ -15977,7 +15986,7 @@ function DateRangePopover({
|
|
|
15977
15986
|
|
|
15978
15987
|
// src/dashboard/date-range-picker/DateRangePicker.tsx
|
|
15979
15988
|
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
15980
|
-
var
|
|
15989
|
+
var DateRangePicker = React57.forwardRef(function DateRangePicker2({
|
|
15981
15990
|
label,
|
|
15982
15991
|
value: externalValue,
|
|
15983
15992
|
defaultValue,
|
|
@@ -16414,14 +16423,14 @@ var FORMAT_SETTINGS = {
|
|
|
16414
16423
|
},
|
|
16415
16424
|
hours: { intervalUnit: "H", interval: 1, minTime: "00:00", maxTime: "23:00" }
|
|
16416
16425
|
};
|
|
16417
|
-
var
|
|
16418
|
-
function
|
|
16426
|
+
var TimePicker = React59.forwardRef(
|
|
16427
|
+
function TimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
|
|
16419
16428
|
const resolvedOptions = React59.useMemo(() => {
|
|
16420
16429
|
if (options) return options;
|
|
16421
16430
|
const settings = timeSettings ?? FORMAT_SETTINGS[formatName];
|
|
16422
16431
|
return buildOptions(settings);
|
|
16423
16432
|
}, [formatName, options, timeSettings]);
|
|
16424
|
-
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
|
|
16433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(Select, { ref, ...selectProps, options: resolvedOptions });
|
|
16425
16434
|
}
|
|
16426
16435
|
);
|
|
16427
16436
|
|
|
@@ -16433,8 +16442,8 @@ var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
|
16433
16442
|
function defaultDownload(url) {
|
|
16434
16443
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
16435
16444
|
}
|
|
16436
|
-
var
|
|
16437
|
-
function
|
|
16445
|
+
var FileInput = React60.forwardRef(
|
|
16446
|
+
function FileInput2({
|
|
16438
16447
|
label,
|
|
16439
16448
|
value,
|
|
16440
16449
|
onChange,
|
|
@@ -16603,7 +16612,7 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16603
16612
|
// src/dashboard/select-icons-box/SelectIconsBox.tsx
|
|
16604
16613
|
var React61 = __toESM(require("react"), 1);
|
|
16605
16614
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
16606
|
-
function
|
|
16615
|
+
function SelectIconsBox({
|
|
16607
16616
|
children,
|
|
16608
16617
|
icons,
|
|
16609
16618
|
renderIcon,
|
|
@@ -19116,22 +19125,14 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19116
19125
|
CopyString,
|
|
19117
19126
|
Counter,
|
|
19118
19127
|
CounterSize,
|
|
19128
|
+
CreatableMultiSelect,
|
|
19119
19129
|
CustomCheckboxDropdownGroup,
|
|
19120
19130
|
DEFAULT_DISPLAY_FORMAT,
|
|
19121
19131
|
DEVICE_BREAKPOINTS,
|
|
19122
|
-
DashboardCreatableMultiSelect,
|
|
19123
|
-
DashboardDateRangePicker,
|
|
19124
|
-
DashboardDatepicker,
|
|
19125
|
-
DashboardFileInput,
|
|
19126
|
-
DashboardInfiniteScrollSelect,
|
|
19127
|
-
DashboardInput,
|
|
19128
|
-
DashboardMultiSelect,
|
|
19129
|
-
DashboardSelect,
|
|
19130
|
-
DashboardSelectIconsBox,
|
|
19131
|
-
DashboardTextarea,
|
|
19132
|
-
DashboardTimePicker,
|
|
19133
19132
|
DataTable,
|
|
19133
|
+
DateRangePicker,
|
|
19134
19134
|
DateTableFilter,
|
|
19135
|
+
Datepicker,
|
|
19135
19136
|
DebouncedSearchInput,
|
|
19136
19137
|
DefaultSelectTrigger,
|
|
19137
19138
|
Dialog,
|
|
@@ -19184,6 +19185,7 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19184
19185
|
ExpandableContent,
|
|
19185
19186
|
ExternalLink,
|
|
19186
19187
|
FieldErrorMessage,
|
|
19188
|
+
FileInput,
|
|
19187
19189
|
FileInputButton,
|
|
19188
19190
|
FormBox,
|
|
19189
19191
|
FormBoxContent,
|
|
@@ -19199,7 +19201,9 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19199
19201
|
IconsDropdown,
|
|
19200
19202
|
Image,
|
|
19201
19203
|
ImageFullScreenView,
|
|
19204
|
+
InfiniteScrollSelect,
|
|
19202
19205
|
InfoBox,
|
|
19206
|
+
Input,
|
|
19203
19207
|
InputOTP,
|
|
19204
19208
|
InputOTPGroup,
|
|
19205
19209
|
InputOTPSeparator,
|
|
@@ -19229,6 +19233,7 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19229
19233
|
Modal,
|
|
19230
19234
|
ModalButton,
|
|
19231
19235
|
ModalLoader,
|
|
19236
|
+
MultiSelect,
|
|
19232
19237
|
NumberedList,
|
|
19233
19238
|
OverlayLoader,
|
|
19234
19239
|
Pagination,
|
|
@@ -19258,6 +19263,8 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19258
19263
|
SectionGroup,
|
|
19259
19264
|
SectionTag,
|
|
19260
19265
|
SectionTagColors,
|
|
19266
|
+
Select,
|
|
19267
|
+
SelectIconsBox,
|
|
19261
19268
|
Separator,
|
|
19262
19269
|
Sheet,
|
|
19263
19270
|
SheetClose,
|
|
@@ -19322,7 +19329,9 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
19322
19329
|
TabsContent,
|
|
19323
19330
|
TabsList,
|
|
19324
19331
|
TabsTrigger,
|
|
19332
|
+
Textarea,
|
|
19325
19333
|
ThreeDotsLoader,
|
|
19334
|
+
TimePicker,
|
|
19326
19335
|
Timeline,
|
|
19327
19336
|
TimelineConnector,
|
|
19328
19337
|
TimelineContent,
|