@formkit/pro 0.113.0 → 0.114.0-070b9fc

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/index.d.ts CHANGED
@@ -1,7 +1,16 @@
1
+ import type { AllReals } from '@formkit/inputs';
1
2
  import { FormKitExtendableSchemaRoot } from '@formkit/core';
3
+ import type { FormKitFrameworkContext } from '@formkit/core';
4
+ import type { FormKitInputs } from '@formkit/inputs';
5
+ import type { FormKitMessage } from '@formkit/core';
6
+ import type { FormKitNode } from '@formkit/core';
7
+ import type { FormKitOptionsItem } from '@formkit/inputs';
8
+ import type { FormKitOptionsProp } from '@formkit/inputs';
9
+ import type { FormKitOptionsValue } from '@formkit/inputs';
2
10
  import { FormKitPlugin } from '@formkit/core';
3
11
  import { FormKitSchemaExtendableSection } from '@formkit/inputs';
4
12
  import { FormKitSchemaNode } from '@formkit/core';
13
+ import type { FormKitSlotData } from '@formkit/inputs';
5
14
  import { FormKitTypeDefinition } from '@formkit/core';
6
15
 
7
16
  /**
@@ -20,6 +29,132 @@ export declare function $if(condition: string, then: FormKitProExtendableSection
20
29
  */
21
30
  export declare const autocomplete: FormKitProInput;
22
31
 
32
+ /**
33
+ * Data available to autocomplete slots.
34
+ *
35
+ * @public
36
+ */
37
+ export declare interface AutocompleteSlotData {
38
+ options: FormKitOptionsItem[];
39
+ debounce?: number | string;
40
+ multiple?: Bool;
41
+ selectionAppearance?: 'option' | 'text-input' | 'text';
42
+ openOnClick?: Bool;
43
+ filter?: (option: FormKitOptionsItem, search?: string) => boolean;
44
+ optionLoader?: OptionLoader;
45
+ emptyMessage?: string;
46
+ closeOnSelect?: Bool;
47
+ activeDescendant?: string;
48
+ activeValue?: unknown;
49
+ dropdownWrapperStyles: Record<string, boolean>;
50
+ expanded: boolean;
51
+ forceExpanded: undefined | true;
52
+ hasNextPage: (data?: any) => void;
53
+ isLoadingOption?: boolean;
54
+ listboxStyles: Record<string, boolean>;
55
+ loadMoreOption: FormKitOptionsItem;
56
+ loadOnCreated: undefined | true;
57
+ loadOnScroll: undefined | true;
58
+ max?: number | string;
59
+ option: FormKitOptionsItem;
60
+ optionsLoader?: FormKitOptionsLoader;
61
+ page: number;
62
+ placeholder?: string;
63
+ reloadOnCommit: Bool;
64
+ selections: FormKitOptionsItem[];
65
+ showEmptyMessage?: boolean;
66
+ handlers: FormKitFrameworkContext['handlers'] & {
67
+ selectOption: (option: FormKitOptionsItem) => void;
68
+ loadMoreSelected: () => void;
69
+ toggleListbox: () => void;
70
+ removeSelection: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
71
+ touchmove: (e: TouchEvent) => void;
72
+ touchend: (e: TouchEvent) => void;
73
+ click: (e: MouseEvent) => void;
74
+ keydown: (e: KeyboardEvent) => void;
75
+ focus: (e: FocusEvent) => void;
76
+ loadMore: () => void;
77
+ selectionClick: (e: MouseEvent) => void;
78
+ selectionKeydown: (option: FormKitOptionsItem) => (e: KeyboardEvent) => void;
79
+ searchInputTagKeydown: (option: FormKitOptionsItem) => (e: KeyboardEvent) => void;
80
+ };
81
+ fns: FormKitFrameworkContext['fns'] & {
82
+ isSelected: (option: FormKitOptionsItem) => boolean;
83
+ isActive: (option: FormKitOptionsItem) => boolean;
84
+ };
85
+ ui: FormKitFrameworkContext['ui'] & {
86
+ isLoading: FormKitMessage;
87
+ loadMore: FormKitMessage;
88
+ };
89
+ }
90
+
91
+ declare interface BasePart<T extends string = string> {
92
+ /**
93
+ * A textual representation to use as a placeholder.
94
+ */
95
+ placeholder: string;
96
+ /**
97
+ * A token that represents this pattern
98
+ */
99
+ token: T;
100
+ /**
101
+ * In select mode, which direction should types values flow?
102
+ */
103
+ selectDirection?: 'left' | 'right';
104
+ /**
105
+ * An optional character to fill the selection with when in select mode.
106
+ * This is different than the placeholder character in that this character is
107
+ * only used when the section has a value but that value is not "complete".
108
+ * This character should be a single character, and valid for the given part.
109
+ * For example, numbers may use a "0" as the selectFill since it leads to a
110
+ * valid number with leading zeros. ### would be 001 when a user types "1".
111
+ */
112
+ selectFill?: string;
113
+ }
114
+
115
+ declare type Bool = 'true' | 'false' | true | false | '';
116
+
117
+ /**
118
+ * A calendar is an array of months, where each month is an array of weeks,
119
+ * where each week is an array of days.
120
+ *
121
+ * @public
122
+ */
123
+ export declare type Calendar = Array<CalendarMonth>;
124
+
125
+ /**
126
+ * A calendar month is an array of weeks, where each week is an array of days.
127
+ *
128
+ * @public
129
+ */
130
+ export declare type CalendarMonth = Array<CalendarWeek>;
131
+
132
+ /**
133
+ * A calendar week is an array of 7 days (tuple of 7) where each day is a date.
134
+ *
135
+ * @public
136
+ */
137
+ export declare type CalendarWeek = [
138
+ monday: Date,
139
+ tuesday: Date,
140
+ wednesday: Date,
141
+ thursday: Date,
142
+ friday: Date,
143
+ saturday: Date,
144
+ sunday: Date
145
+ ];
146
+
147
+ declare interface CharPart {
148
+ /**
149
+ * Defined the part as a fixed length value
150
+ */
151
+ type: 'char';
152
+ /**
153
+ * Regular expression that defines what characters can be applied.
154
+ */
155
+ pattern: RegExp;
156
+ }
157
+
23
158
  /**
24
159
  * Creates a set of commonly used sections.
25
160
  * @param createSection - Creates commonly used sections.
@@ -56,23 +191,342 @@ export declare function createProPlugin(apiKey: string, inputs?: Record<string,
56
191
  */
57
192
  export declare function createSectionFactory(inputCode: string): SectionFactory;
58
193
 
194
+ /**
195
+ * Possible options for a format style.
196
+ */
197
+ declare type DateFormatStyle = 'full' | 'long' | 'medium' | 'short';
198
+
59
199
  /**
60
200
  * Input definition for a datepicker input.
61
201
  * @public
62
202
  */
63
203
  export declare const datepicker: FormKitProInput;
64
204
 
205
+ /**
206
+ * Slot information that pertains specifically to the datepicker input.
207
+ *
208
+ * @public
209
+ */
210
+ export declare type DatePickerSlotData = {
211
+ panel: Panels;
212
+ calendar: Calendar;
213
+ inputText: string;
214
+ renderedDate: Date;
215
+ expanded: boolean;
216
+ showPagination: boolean;
217
+ localTime: string;
218
+ visibilityStyles: Record<string, boolean>;
219
+ fns: FormKitFrameworkContext['fns'] & {
220
+ format: (date: Date | string, format: string) => string;
221
+ sameDay: (date: Date) => boolean;
222
+ sameMonth: (month: Date) => boolean;
223
+ notInMonth: (month: Date, day: Date) => boolean;
224
+ isDisabled: (node: FormKitNode, date?: Date) => boolean;
225
+ isDisabledMonth: (month: Date) => boolean;
226
+ isSelected: (date: Date) => boolean;
227
+ };
228
+ handlers: FormKitFrameworkContext['handlers'] & {
229
+ next: () => void;
230
+ prev: () => void;
231
+ open: () => void;
232
+ _blurOut: () => void;
233
+ jumpTo: (date: Date) => void;
234
+ localTime: (e: InputEvent) => void;
235
+ setDate: (date: Date) => () => void;
236
+ keydown: (e: KeyboardEvent) => void;
237
+ mouseEnter: (date: Date) => void;
238
+ mouseLeave: () => void;
239
+ };
240
+ ui: FormKitFrameworkContext['ui'] & {
241
+ changeDate: FormKitMessage;
242
+ chooseDate: FormKitMessage;
243
+ };
244
+ dayButtonFormat: string;
245
+ monthButtonFormat: string;
246
+ yearFormat: string;
247
+ };
248
+
65
249
  /**
66
250
  * Input definition for a dropdown input.
67
251
  * @public
68
252
  */
69
253
  export declare const dropdown: FormKitProInput;
70
254
 
255
+ /**
256
+ * Slot data for dropdown types.
257
+ *
258
+ * @public
259
+ */
260
+ export declare interface DropdownSlotData {
261
+ options: FormKitOptionsItem[];
262
+ option?: FormKitOptionsItem;
263
+ debounce?: number | string;
264
+ multiple?: Bool;
265
+ selectionAppearance?: 'truncate' | 'tags';
266
+ openOnClick?: Bool;
267
+ filter?: (option: FormKitOptionsItem, search: string) => boolean;
268
+ optionLoader?: OptionLoader;
269
+ emptyMessage?: string;
270
+ max?: number | string;
271
+ closeOnSelect?: Bool;
272
+ activeDescendant?: string;
273
+ activeValue?: unknown;
274
+ dropdownWrapperStyles: Record<string, boolean>;
275
+ expanded: boolean;
276
+ fns: FormKitFrameworkContext['fns'] & {
277
+ isSelected: (option: FormKitOptionsItem) => boolean;
278
+ isActive: (option: FormKitOptionsItem) => boolean;
279
+ };
280
+ handlers: FormKitFrameworkContext['handlers'] & {
281
+ selectOption: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
282
+ loadMoreSelected: () => void;
283
+ tagClick: (option: FormKitOptionsItem) => void;
284
+ tagFocus: (option: FormKitOptionsItem) => void;
285
+ tagBlur: () => void;
286
+ blur: () => void;
287
+ toggleListbox: () => void;
288
+ removeSelection: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
289
+ touchmove: (e: TouchEvent) => void;
290
+ touchend: (e: TouchEvent) => void;
291
+ click: (e: MouseEvent) => void;
292
+ keydown: (e: KeyboardEvent) => void;
293
+ focus: (e: FocusEvent) => void;
294
+ loadMore: () => void;
295
+ };
296
+ ui: FormKitFrameworkContext['ui'] & {
297
+ isLoading: FormKitMessage;
298
+ loadMore: FormKitMessage;
299
+ };
300
+ }
301
+
302
+ declare interface EnumPart {
303
+ /**
304
+ * Defines the part as an enumerated list of options.
305
+ */
306
+ type: 'enum';
307
+ /**
308
+ * The values allowed by an enum part.
309
+ */
310
+ values: string[];
311
+ }
312
+
71
313
  /**
72
314
  * A schema section that is compatible with FormKitPro’s schema composition.
73
315
  */
74
316
  declare type ExtendableSchema<IsRoot> = IsRoot extends true ? FormKitExtendableSchemaRoot : FormKitSchemaExtendableSection;
75
317
 
318
+ /**
319
+ * Possible objects for the dateStyle and timeStyle.
320
+ */
321
+ export declare type FormatStyleObj = {
322
+ date: DateFormatStyle;
323
+ time: TimeFormatStyle;
324
+ } | {
325
+ date: DateFormatStyle;
326
+ } | {
327
+ time: TimeFormatStyle;
328
+ };
329
+
330
+ export declare interface FormKitAutocompleteSlots<Props extends FormKitInputs<Props>> {
331
+ outer: FormKitSlotData<Props, AutocompleteSlotData>;
332
+ wrapper: FormKitSlotData<Props, AutocompleteSlotData>;
333
+ label: FormKitSlotData<Props, AutocompleteSlotData>;
334
+ inner: FormKitSlotData<Props, AutocompleteSlotData>;
335
+ prefixIcon: FormKitSlotData<Props, AutocompleteSlotData>;
336
+ prefix: FormKitSlotData<Props, AutocompleteSlotData>;
337
+ input: FormKitSlotData<Props, AutocompleteSlotData>;
338
+ selections: FormKitSlotData<Props, AutocompleteSlotData>;
339
+ selection: FormKitSlotData<Props, AutocompleteSlotData>;
340
+ listboxButton: FormKitSlotData<Props, AutocompleteSlotData>;
341
+ dropdownWrapper: FormKitSlotData<Props, AutocompleteSlotData>;
342
+ listbox: FormKitSlotData<Props, AutocompleteSlotData>;
343
+ listitem: FormKitSlotData<Props, AutocompleteSlotData>;
344
+ loadMore: FormKitSlotData<Props, AutocompleteSlotData>;
345
+ emptyMessageInner: FormKitSlotData<Props, AutocompleteSlotData>;
346
+ selectedIcon: FormKitSlotData<Props, AutocompleteSlotData & {
347
+ option: FormKitOptionsItem<OptionsProValue<Props['options']>>;
348
+ index: number;
349
+ }>;
350
+ option: FormKitSlotData<Props, AutocompleteSlotData & {
351
+ option: FormKitOptionsItem<OptionsProValue<Props['options']>>;
352
+ index: number;
353
+ }>;
354
+ optionLoading: FormKitSlotData<Props, AutocompleteSlotData & {
355
+ option: FormKitOptionsItem<OptionsProValue<Props['options']>>;
356
+ index: number;
357
+ }>;
358
+ removeSelection: FormKitSlotData<Props, AutocompleteSlotData & {
359
+ option: FormKitOptionsItem<OptionsProValue<Props['options']>>;
360
+ index: number;
361
+ }>;
362
+ suffix: FormKitSlotData<Props, AutocompleteSlotData>;
363
+ suffixIcon: FormKitSlotData<Props, AutocompleteSlotData>;
364
+ help: FormKitSlotData<Props, AutocompleteSlotData>;
365
+ messages: FormKitSlotData<Props, AutocompleteSlotData>;
366
+ message: FormKitSlotData<Props, AutocompleteSlotData>;
367
+ }
368
+
369
+ /**
370
+ * Slot information that pertains specifically to the datepicker input.
371
+ *
372
+ * @public
373
+ */
374
+ export declare interface FormKitDatePickerSlots<Props extends FormKitInputs<Props>> {
375
+ calendar: FormKitSlotData<Props, DatePickerSlotData & {
376
+ month: CalendarMonth;
377
+ }>;
378
+ calendarHeader: FormKitSlotData<Props, DatePickerSlotData & {
379
+ month: CalendarMonth;
380
+ }>;
381
+ calendarWeeks: FormKitSlotData<Props, DatePickerSlotData & {
382
+ month: CalendarMonth;
383
+ }>;
384
+ day: FormKitSlotData<Props, DatePickerSlotData & {
385
+ month: CalendarMonth;
386
+ week: CalendarWeek;
387
+ day: Date;
388
+ }>;
389
+ dayButton: FormKitSlotData<Props, DatePickerSlotData & {
390
+ day: Date;
391
+ }>;
392
+ dayCell: FormKitSlotData<Props, DatePickerSlotData & {
393
+ day: Date;
394
+ week: CalendarWeek;
395
+ month: CalendarMonth;
396
+ }>;
397
+ daysHeader: FormKitSlotData<Props, DatePickerSlotData>;
398
+ help: FormKitSlotData<Props, DatePickerSlotData>;
399
+ prefixIcon: FormKitSlotData<Props, DatePickerSlotData>;
400
+ suffixIcon: FormKitSlotData<Props, DatePickerSlotData>;
401
+ inner: FormKitSlotData<Props, DatePickerSlotData>;
402
+ input: FormKitSlotData<Props, DatePickerSlotData>;
403
+ label: FormKitSlotData<Props, DatePickerSlotData>;
404
+ message: FormKitSlotData<Props, DatePickerSlotData & {
405
+ message: FormKitMessage;
406
+ }>;
407
+ messages: FormKitSlotData<Props, DatePickerSlotData>;
408
+ month: FormKitSlotData<Props, DatePickerSlotData & {
409
+ month: Date;
410
+ months: Array<Date>;
411
+ }>;
412
+ monthButton: FormKitSlotData<Props, DatePickerSlotData>;
413
+ months: FormKitSlotData<Props, DatePickerSlotData>;
414
+ monthsHeader: FormKitSlotData<Props, DatePickerSlotData>;
415
+ next: FormKitSlotData<Props, DatePickerSlotData>;
416
+ nextLabel: FormKitSlotData<Props, DatePickerSlotData>;
417
+ openButton: FormKitSlotData<Props, DatePickerSlotData>;
418
+ outer: FormKitSlotData<Props, DatePickerSlotData>;
419
+ panel: FormKitSlotData<Props, DatePickerSlotData>;
420
+ panelHeader: FormKitSlotData<Props, DatePickerSlotData>;
421
+ panelWrapper: FormKitSlotData<Props, DatePickerSlotData>;
422
+ prefix: FormKitSlotData<Props, DatePickerSlotData>;
423
+ prev: FormKitSlotData<Props, DatePickerSlotData>;
424
+ prevLabel: FormKitSlotData<Props, DatePickerSlotData>;
425
+ suffix: FormKitSlotData<Props, DatePickerSlotData>;
426
+ time: FormKitSlotData<Props, DatePickerSlotData>;
427
+ timeHeader: FormKitSlotData<Props, DatePickerSlotData>;
428
+ timeInput: FormKitSlotData<Props, DatePickerSlotData>;
429
+ week: FormKitSlotData<Props, DatePickerSlotData & {
430
+ month: CalendarMonth;
431
+ }>;
432
+ weekDay: FormKitSlotData<Props, DatePickerSlotData & {
433
+ month: CalendarMonth;
434
+ }>;
435
+ weekDays: FormKitSlotData<Props, DatePickerSlotData & {
436
+ month: CalendarMonth;
437
+ }>;
438
+ wrapper: FormKitSlotData<Props, DatePickerSlotData>;
439
+ year: FormKitSlotData<Props, DatePickerSlotData & {
440
+ years: Array<Date>;
441
+ }>;
442
+ yearButton: FormKitSlotData<Props, DatePickerSlotData & {
443
+ years: Array<Date>;
444
+ year: Date;
445
+ }>;
446
+ years: FormKitSlotData<Props, DatePickerSlotData & {
447
+ years: Array<Date>;
448
+ }>;
449
+ yearsHeader: FormKitSlotData<Props, DatePickerSlotData>;
450
+ }
451
+
452
+ export declare interface FormKitDropdownSlots<Props extends FormKitInputs<Props>> {
453
+ outer: FormKitSlotData<Props, DropdownSlotData>;
454
+ wrapper: FormKitSlotData<Props, DropdownSlotData>;
455
+ inner: FormKitSlotData<Props, DropdownSlotData>;
456
+ label: FormKitSlotData<Props, DropdownSlotData>;
457
+ prefix: FormKitSlotData<Props, DropdownSlotData>;
458
+ prefixIcon: FormKitSlotData<Props, DropdownSlotData>;
459
+ selector: FormKitSlotData<Props, DropdownSlotData>;
460
+ selection: FormKitSlotData<Props, DropdownSlotData & {
461
+ option: FormKitOptionsItem;
462
+ index: number;
463
+ }>;
464
+ suffix: FormKitSlotData<Props, DropdownSlotData>;
465
+ suffixIcon: FormKitSlotData<Props, DropdownSlotData>;
466
+ help: FormKitSlotData<Props, DropdownSlotData>;
467
+ messages: FormKitSlotData<Props, DropdownSlotData>;
468
+ message: FormKitSlotData<Props, DropdownSlotData & {
469
+ message: FormKitMessage;
470
+ }>;
471
+ listboxButton: FormKitSlotData<Props, DropdownSlotData>;
472
+ dropdownWrapper: FormKitSlotData<Props, DropdownSlotData>;
473
+ listbox: FormKitSlotData<Props, DropdownSlotData>;
474
+ listitem: FormKitSlotData<Props, DropdownSlotData>;
475
+ loadMore: FormKitSlotData<Props, DropdownSlotData>;
476
+ emptyMessageInner: FormKitSlotData<Props, DropdownSlotData>;
477
+ selectedIcon: FormKitSlotData<Props, DropdownSlotData & {
478
+ option: FormKitOptionsItem;
479
+ index: number;
480
+ }>;
481
+ option: FormKitSlotData<Props, DropdownSlotData & {
482
+ option: FormKitOptionsItem;
483
+ index: number;
484
+ }>;
485
+ optionLoading: FormKitSlotData<Props, DropdownSlotData & {
486
+ option: FormKitOptionsItem;
487
+ index: number;
488
+ }>;
489
+ removeSelection: FormKitSlotData<Props, DropdownSlotData & {
490
+ option: FormKitOptionsItem;
491
+ index: number;
492
+ }>;
493
+ placeholder: FormKitSlotData<Props, DropdownSlotData>;
494
+ tag: FormKitSlotData<Props, DropdownSlotData & {
495
+ option: FormKitOptionsItem;
496
+ index: number;
497
+ }>;
498
+ }
499
+
500
+ /**
501
+ * The option loader function type.
502
+ *
503
+ * @public
504
+ */
505
+ export declare interface FormKitOptionsLoader {
506
+ (context: FormKitFrameworkContext<any>): Promise<FormKitOptionsProp> | FormKitOptionsProp;
507
+ (...args: any[]): Promise<FormKitOptionsProp> | FormKitOptionsProp;
508
+ }
509
+
510
+ export declare type FormKitOverlaySlots<Props extends FormKitInputs<Props>> = Props['overlay'] extends Yes ? {
511
+ overlay: FormKitSlotData<Props, DatePickerSlotData>;
512
+ overlayChar: FormKitSlotData<Props, DatePickerSlotData & {
513
+ part: Meta;
514
+ }>;
515
+ overlayEnum: FormKitSlotData<Props, DatePickerSlotData & {
516
+ part: Meta;
517
+ }>;
518
+ overlayInner: FormKitSlotData<Props, DatePickerSlotData>;
519
+ overlayLiteral: FormKitSlotData<Props, DatePickerSlotData & {
520
+ part: Meta;
521
+ }>;
522
+ overlayParts: FormKitSlotData<Props, DatePickerSlotData & {
523
+ part: Meta;
524
+ }>;
525
+ overlayPlaceholder: FormKitSlotData<Props, DatePickerSlotData & {
526
+ part: Meta;
527
+ }>;
528
+ } : {};
529
+
76
530
  /**
77
531
  * An extendable schema section that is compatible with FormKitPro’s schema
78
532
  * composition.
@@ -89,6 +543,14 @@ export declare type FormKitProInput = Omit<FormKitTypeDefinition, 'schema'> & {
89
543
  schema: FormKitProSchema;
90
544
  };
91
545
 
546
+ /**
547
+ * The options prop for option-based inputs in pro like `autocomplete` and
548
+ * `dropdown`.
549
+ *
550
+ * @public
551
+ */
552
+ export declare type FormKitProOptionsProp = FormKitOptionsProp | FormKitOptionsLoader;
553
+
92
554
  /**
93
555
  * The type definition of a FormKit pro schema.
94
556
  * @public
@@ -104,6 +566,243 @@ declare interface FormKitProSection<IsRoot extends boolean = false> {
104
566
  (...children: Array<string | FormKitProExtendableSection>): FormKitProExtendableSection<IsRoot>;
105
567
  }
106
568
 
569
+ export declare interface FormKitRatingSlots<Props extends FormKitInputs<Props>> {
570
+ itemsWrapper: FormKitSlotData<Props, RatingSlotData>;
571
+ onItem: FormKitSlotData<Props, RatingSlotData & {
572
+ item: number;
573
+ }>;
574
+ offItem: FormKitSlotData<Props, RatingSlotData & {
575
+ item: number;
576
+ }>;
577
+ default: FormKitSlotData<Props, RatingSlotData & {
578
+ item: number;
579
+ }>;
580
+ ratingIcon: FormKitSlotData<Props, RatingSlotData & {
581
+ item: number;
582
+ }>;
583
+ }
584
+
585
+ /**
586
+ * Slot information that pertains specifically to the datepicker input.
587
+ *
588
+ * @public
589
+ */
590
+ export declare interface FormKitRepeaterSlots<Props extends FormKitInputs<Props>> {
591
+ outer: FormKitSlotData<Props, RepeaterSlotData>;
592
+ fieldset: FormKitSlotData<Props, RepeaterSlotData>;
593
+ legend: FormKitSlotData<Props, RepeaterSlotData>;
594
+ help: FormKitSlotData<Props, RepeaterSlotData>;
595
+ prefix: FormKitSlotData<Props, RepeaterSlotData>;
596
+ default: FormKitSlotData<Props, RepeaterSlotData>;
597
+ items: FormKitSlotData<Props, RepeaterSlotData>;
598
+ item: FormKitSlotData<Props, RepeaterSlotData>;
599
+ content: FormKitSlotData<Props, RepeaterSlotData & {
600
+ item: symbol;
601
+ index: number;
602
+ }>;
603
+ group: FormKitSlotData<Props, RepeaterSlotData & {
604
+ item: symbol;
605
+ index: number;
606
+ }>;
607
+ controls: FormKitSlotData<Props, RepeaterSlotData & {
608
+ item: symbol;
609
+ index: number;
610
+ }>;
611
+ up: FormKitSlotData<Props, RepeaterSlotData & {
612
+ item: symbol;
613
+ index: number;
614
+ }>;
615
+ upControl: FormKitSlotData<Props, RepeaterSlotData & {
616
+ item: symbol;
617
+ index: number;
618
+ }>;
619
+ controlLabel: FormKitSlotData<Props, RepeaterSlotData & {
620
+ item: symbol;
621
+ index: number;
622
+ }>;
623
+ moveUpIcon: FormKitSlotData<Props, RepeaterSlotData & {
624
+ item: symbol;
625
+ index: number;
626
+ }>;
627
+ remove: FormKitSlotData<Props, RepeaterSlotData & {
628
+ item: symbol;
629
+ index: number;
630
+ }>;
631
+ removeControl: FormKitSlotData<Props, RepeaterSlotData & {
632
+ item: symbol;
633
+ index: number;
634
+ }>;
635
+ removeIcon: FormKitSlotData<Props, RepeaterSlotData & {
636
+ item: symbol;
637
+ index: number;
638
+ }>;
639
+ insert: FormKitSlotData<Props, RepeaterSlotData & {
640
+ item: symbol;
641
+ index: number;
642
+ }>;
643
+ insertControl: FormKitSlotData<Props, RepeaterSlotData & {
644
+ item: symbol;
645
+ index: number;
646
+ }>;
647
+ addIcon: FormKitSlotData<Props, RepeaterSlotData & {
648
+ item: symbol;
649
+ index: number;
650
+ }>;
651
+ down: FormKitSlotData<Props, RepeaterSlotData & {
652
+ item: symbol;
653
+ index: number;
654
+ }>;
655
+ downControl: FormKitSlotData<Props, RepeaterSlotData & {
656
+ item: symbol;
657
+ index: number;
658
+ }>;
659
+ moveDownIcon: FormKitSlotData<Props, RepeaterSlotData & {
660
+ item: symbol;
661
+ index: number;
662
+ }>;
663
+ suffix: FormKitSlotData<Props, RepeaterSlotData>;
664
+ addButton: FormKitSlotData<Props, RepeaterSlotData>;
665
+ message: FormKitSlotData<Props, RepeaterSlotData & {
666
+ message: FormKitMessage;
667
+ }>;
668
+ messages: FormKitSlotData<Props, RepeaterSlotData>;
669
+ }
670
+
671
+ /**
672
+ * Slots available to the slider.
673
+ *
674
+ * @public
675
+ */
676
+ export declare interface FormKitSliderSlots<Props extends FormKitInputs<Props>> {
677
+ outer: FormKitSlotData<Props, SliderSlotData>;
678
+ wrapper: FormKitSlotData<Props, SliderSlotData>;
679
+ label: FormKitSlotData<Props, SliderSlotData>;
680
+ help: FormKitSlotData<Props, SliderSlotData>;
681
+ sliderInner: FormKitSlotData<Props, SliderSlotData>;
682
+ iconPrefix: FormKitSlotData<Props, SliderSlotData>;
683
+ prefix: FormKitSlotData<Props, SliderSlotData>;
684
+ track: FormKitSlotData<Props, SliderSlotData>;
685
+ trackWrapper: FormKitSlotData<Props, SliderSlotData>;
686
+ trackInner: FormKitSlotData<Props, SliderSlotData>;
687
+ fill: FormKitSlotData<Props, SliderSlotData>;
688
+ marks: FormKitSlotData<Props, SliderSlotData>;
689
+ mark: FormKitSlotData<Props, SliderSlotData>;
690
+ markLabel: FormKitSlotData<Props, SliderSlotData & {
691
+ index: number;
692
+ step: {
693
+ at: number;
694
+ label?: string;
695
+ };
696
+ }>;
697
+ handles: FormKitSlotData<Props, SliderSlotData>;
698
+ handleMin: FormKitSlotData<Props, SliderSlotData>;
699
+ handleMax: FormKitSlotData<Props, SliderSlotData>;
700
+ tooltipMin: FormKitSlotData<Props, SliderSlotData>;
701
+ tooltipMax: FormKitSlotData<Props, SliderSlotData>;
702
+ suffix: FormKitSlotData<Props, SliderSlotData>;
703
+ suffixIcon: FormKitSlotData<Props, SliderSlotData>;
704
+ minValue: FormKitSlotData<Props, SliderSlotData>;
705
+ maxValue: FormKitSlotData<Props, SliderSlotData>;
706
+ linkedValues: FormKitSlotData<Props, SliderSlotData>;
707
+ message: FormKitSlotData<Props, SliderSlotData & {
708
+ message: FormKitMessage;
709
+ }>;
710
+ messages: FormKitSlotData<Props, SliderSlotData>;
711
+ }
712
+
713
+ export declare interface FormKitTaglistSlots<Props extends FormKitInputs<Props>> {
714
+ outer: FormKitSlotData<Props, TaglistSlotData>;
715
+ wrapper: FormKitSlotData<Props, TaglistSlotData>;
716
+ inner: FormKitSlotData<Props, TaglistSlotData>;
717
+ label: FormKitSlotData<Props, TaglistSlotData>;
718
+ prefix: FormKitSlotData<Props, TaglistSlotData>;
719
+ prefixIcon: FormKitSlotData<Props, TaglistSlotData>;
720
+ tag: FormKitSlotData<Props, TaglistSlotData & {
721
+ option: FormKitOptionsItem;
722
+ index: number;
723
+ }>;
724
+ tagWrapper: FormKitSlotData<Props, TaglistSlotData>;
725
+ tagLoading: FormKitSlotData<Props, TaglistSlotData & {
726
+ option: FormKitOptionsItem;
727
+ index: number;
728
+ }>;
729
+ suffix: FormKitSlotData<Props, TaglistSlotData>;
730
+ suffixIcon: FormKitSlotData<Props, TaglistSlotData>;
731
+ help: FormKitSlotData<Props, TaglistSlotData>;
732
+ messages: FormKitSlotData<Props, TaglistSlotData>;
733
+ message: FormKitSlotData<Props, TaglistSlotData & {
734
+ message: FormKitMessage;
735
+ }>;
736
+ listboxButton: FormKitSlotData<Props, TaglistSlotData>;
737
+ dropdownWrapper: FormKitSlotData<Props, TaglistSlotData>;
738
+ listbox: FormKitSlotData<Props, TaglistSlotData>;
739
+ listitem: FormKitSlotData<Props, TaglistSlotData>;
740
+ loadMore: FormKitSlotData<Props, TaglistSlotData>;
741
+ emptyMessageInner: FormKitSlotData<Props, TaglistSlotData>;
742
+ selectedIcon: FormKitSlotData<Props, TaglistSlotData & {
743
+ option: FormKitOptionsItem;
744
+ index: number;
745
+ }>;
746
+ option: FormKitSlotData<Props, TaglistSlotData & {
747
+ option: FormKitOptionsItem;
748
+ index: number;
749
+ }>;
750
+ optionLoading: FormKitSlotData<Props, TaglistSlotData & {
751
+ option: FormKitOptionsItem;
752
+ index: number;
753
+ }>;
754
+ removeSelection: FormKitSlotData<Props, TaglistSlotData & {
755
+ option: FormKitOptionsItem;
756
+ index: number;
757
+ }>;
758
+ input: FormKitSlotData<Props, TaglistSlotData>;
759
+ tags: FormKitSlotData<Props, TaglistSlotData>;
760
+ tagLabel: FormKitSlotData<Props, TaglistSlotData & {
761
+ option: FormKitOptionsItem;
762
+ index: number;
763
+ }>;
764
+ }
765
+
766
+ /**
767
+ * Toggle slots.
768
+ *
769
+ * @public
770
+ */
771
+ export declare interface FormKitToggleSlots<Props extends FormKitInputs<Props>> {
772
+ outer: FormKitSlotData<Props, ToggleSlotData<Props>>;
773
+ wrapper: FormKitSlotData<Props, ToggleSlotData<Props>>;
774
+ altLabel: FormKitSlotData<Props, ToggleSlotData<Props>>;
775
+ inner: FormKitSlotData<Props, ToggleSlotData<Props>>;
776
+ prefix: FormKitSlotData<Props, ToggleSlotData<Props>>;
777
+ input: FormKitSlotData<Props, ToggleSlotData<Props>>;
778
+ track: FormKitSlotData<Props, ToggleSlotData<Props>>;
779
+ innerLabel: FormKitSlotData<Props, ToggleSlotData<Props>>;
780
+ thumbWrapper: FormKitSlotData<Props, ToggleSlotData<Props>>;
781
+ suffix: FormKitSlotData<Props, ToggleSlotData<Props>>;
782
+ valueLabel: FormKitSlotData<Props, ToggleSlotData<Props>>;
783
+ label: FormKitSlotData<Props, ToggleSlotData<Props>>;
784
+ help: FormKitSlotData<Props, ToggleSlotData<Props>>;
785
+ messages: FormKitSlotData<Props, ToggleSlotData<Props>>;
786
+ message: FormKitSlotData<Props, ToggleSlotData<Props> & {
787
+ message: FormKitMessage;
788
+ }>;
789
+ }
790
+
791
+ /**
792
+ * Behavioral group options.
793
+ */
794
+ declare interface GroupOptions {
795
+ repeat?: boolean;
796
+ optional?: boolean;
797
+ placeholder?: string;
798
+ nextPart?: MaskPart;
799
+ }
800
+
801
+ declare type GroupPart = {
802
+ type: 'group';
803
+ parts: MaskPart[];
804
+ } & GroupOptions;
805
+
107
806
  declare namespace inputs {
108
807
  export {
109
808
  dropdown,
@@ -120,24 +819,110 @@ declare namespace inputs {
120
819
  }
121
820
  export { inputs }
122
821
 
822
+ declare interface LiteralPart<T extends string = string> {
823
+ /**
824
+ * Defines a literal (immutable) string.
825
+ */
826
+ type: 'literal';
827
+ /**
828
+ * The value of the immutable string.
829
+ */
830
+ value: T;
831
+ }
832
+
123
833
  /**
124
834
  * Input definition for a mask input.
125
835
  * @public
126
836
  */
127
837
  export declare const mask: FormKitProInput;
128
838
 
839
+ /**
840
+ * Defines a specific part of a mask pattern.
841
+ */
842
+ declare type MaskPart<T extends string = string> = ((BasePart<T> & CharPart) | (BasePart<T> & EnumPart)) | LiteralPart<T> | GroupPart;
843
+
844
+ declare interface Meta {
845
+ value: string;
846
+ type: 'placeholder' | 'literal' | 'char' | 'enum';
847
+ }
848
+
849
+ export declare interface OptionLoader {
850
+ (value: any, cachedItem: FormKitOptionsItem<any>): FormKitOptionsItem<any> | string | void | Promise<FormKitOptionsItem<any> | string | void>;
851
+ }
852
+
853
+ /**
854
+ * Gets the allowed value type from the `options` prop.
855
+ *
856
+ * @public
857
+ */
858
+ export declare type OptionsProValue<Options> = Options extends FormKitProOptionsProp ? Options extends (...args: any[]) => any ? ReturnType<Options> extends FormKitOptionsProp ? FormKitOptionsValue<ReturnType<Options>> : ReturnType<Options> extends Promise<infer T> ? T extends FormKitOptionsProp ? FormKitOptionsValue<T> : unknown : unknown : Options extends FormKitOptionsProp ? FormKitOptionsValue<Options> : unknown : unknown;
859
+
860
+ /**
861
+ * The available popover panels for the datepicker.
862
+ *
863
+ * @public
864
+ */
865
+ export declare type Panels = 'year' | 'month' | 'day' | 'time';
866
+
867
+ /**
868
+ * A map of the parts used
869
+ */
870
+ export declare type PartMap<T = MaskPart> = {
871
+ [index: string]: T;
872
+ };
873
+
129
874
  /**
130
875
  * Input definition for a rating input.
131
876
  * @public
132
877
  */
133
878
  export declare const rating: FormKitProInput;
134
879
 
880
+ /**
881
+ * Slot data for ratings
882
+ *
883
+ * @public
884
+ */
885
+ declare interface RatingSlotData {
886
+ min: number;
887
+ max: number;
888
+ offWidth: number;
889
+ onWidth: number;
890
+ onColor: number;
891
+ offColor: number;
892
+ handlers: FormKitFrameworkContext['handlers'] & {
893
+ ratingHoverOver: () => void;
894
+ ratingHoverOut: () => void;
895
+ handleClick: () => void;
896
+ };
897
+ }
898
+
135
899
  /**
136
900
  * Input definition for a repeater input.
137
901
  * @public
138
902
  */
139
903
  export declare const repeater: FormKitProInput;
140
904
 
905
+ declare interface RepeaterSlotData {
906
+ items: Array<symbol>;
907
+ removeControl: boolean;
908
+ insertControl: boolean;
909
+ upControl: boolean;
910
+ downControl: boolean;
911
+ addLabel?: string;
912
+ fns: FormKitFrameworkContext['fns'] & {
913
+ createShift: (index: number, delta: 1 | -1) => () => void;
914
+ createInsert: (index: number) => () => void;
915
+ createAppend: () => () => void;
916
+ createRemove: (index: number) => () => void;
917
+ };
918
+ ui: FormKitFrameworkContext['ui'] & {
919
+ moveUp: FormKitMessage;
920
+ moveDown: FormKitMessage;
921
+ add: FormKitMessage;
922
+ remove: FormKitMessage;
923
+ };
924
+ }
925
+
141
926
  /**
142
927
  * A factory that creates createSection functions that are curried with the
143
928
  * input code.
@@ -150,37 +935,253 @@ declare type SectionFactory = <IsRoot extends boolean = false>(sectionName: stri
150
935
  */
151
936
  export declare const slider: FormKitProInput;
152
937
 
938
+ /**
939
+ * Conditional slots available to the slider when using a chart.
940
+ *
941
+ * @public
942
+ */
943
+ export declare interface SliderChartSlots<Props extends FormKitInputs<Props>> {
944
+ chart: FormKitSlotData<Props, SliderSlotData>;
945
+ chartBar: FormKitSlotData<Props, SliderSlotData>;
946
+ }
947
+
948
+ /**
949
+ * Slot data for sliders.
950
+ *
951
+ * @public
952
+ */
953
+ export declare interface SliderSlotData {
954
+ chart?: Array<{
955
+ value: number;
956
+ at: number;
957
+ }>;
958
+ inputAttrs?: Record<string, any>;
959
+ marks?: Bool | Array<{
960
+ at?: number;
961
+ label?: string;
962
+ }>;
963
+ markLabel?: Bool;
964
+ max: number | string;
965
+ maxInputAttrs?: Record<string, any>;
966
+ min: number;
967
+ minInputAttrs?: Record<string, any>;
968
+ prefix?: string;
969
+ showInput?: Bool;
970
+ snapToMarks?: Bool;
971
+ suffix?: string;
972
+ tooltip?: Bool;
973
+ isMulti: boolean;
974
+ fillStyles: Record<string, boolean>;
975
+ lastHandleInteraction?: 'min' | 'max';
976
+ handlers: FormKitFrameworkContext['handlers'] & {
977
+ clickTrack: (e: MouseEvent) => void;
978
+ focus: (e: FocusEvent) => void;
979
+ clickHandle: (e: MouseEvent) => void;
980
+ startDrag: (e: Event) => void;
981
+ keydown: (e: KeyboardEvent) => void;
982
+ maxNode: (node: FormKitNode) => void;
983
+ minNode: (node: FormKitNode) => void;
984
+ inputBlur: () => void;
985
+ };
986
+ }
987
+
153
988
  /**
154
989
  * Input definition for a taglist input.
155
990
  * @public
156
991
  */
157
992
  export declare const taglist: FormKitProInput;
158
993
 
994
+ export declare interface TaglistSlotData {
995
+ options: FormKitOptionsItem[];
996
+ debounce?: number | string;
997
+ openOnClick?: Bool;
998
+ filter?: (option: FormKitOptionsItem, search: string) => boolean;
999
+ optionLoader?: OptionLoader;
1000
+ emptyMessage?: string;
1001
+ max?: number | string;
1002
+ closeOnSelect?: Bool;
1003
+ activeDescendant?: string;
1004
+ activeValue?: unknown;
1005
+ dropdownWrapperStyles: Record<string, boolean>;
1006
+ expanded: boolean;
1007
+ page: number;
1008
+ search: string;
1009
+ hasNextPage: (data?: any) => void;
1010
+ fns: FormKitFrameworkContext['fns'] & {
1011
+ isSelected: (option: FormKitOptionsItem) => boolean;
1012
+ isActive: (option: FormKitOptionsItem) => boolean;
1013
+ };
1014
+ handlers: FormKitFrameworkContext['handlers'] & {
1015
+ selectOption: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
1016
+ loadMoreSelected: () => void;
1017
+ tagClick: (option: FormKitOptionsItem) => void;
1018
+ tagFocus: (option: FormKitOptionsItem) => void;
1019
+ tagBlur: () => void;
1020
+ blur: () => void;
1021
+ toggleListbox: () => void;
1022
+ removeSelection: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
1023
+ touchmove: (e: TouchEvent) => void;
1024
+ touchend: (e: TouchEvent) => void;
1025
+ click: (e: MouseEvent) => void;
1026
+ keydown: (e: KeyboardEvent) => void;
1027
+ focus: (e: FocusEvent) => void;
1028
+ loadMore: () => void;
1029
+ };
1030
+ ui: FormKitFrameworkContext['ui'] & {
1031
+ isLoading: FormKitMessage;
1032
+ loadMore: FormKitMessage;
1033
+ };
1034
+ }
1035
+
1036
+ declare type TimeFormatStyle = 'long' | 'medium' | 'short';
1037
+
159
1038
  /**
160
1039
  * Input definition for a toggle input.
161
1040
  * @public
162
1041
  */
163
1042
  export declare const toggle: FormKitProInput;
164
1043
 
1044
+ /**
1045
+ * Slot data for toggles
1046
+ */
1047
+ export declare interface ToggleSlotData<Props extends FormKitInputs<Props>> {
1048
+ onValue: Props['onValue'] extends AllReals ? Props['onValue'] : true;
1049
+ offValue: Props['offValue'] extends AllReals ? Props['offValue'] : true;
1050
+ altLabelPosition?: Bool;
1051
+ offValueLabel?: string;
1052
+ onValueLabel?: string;
1053
+ valueLabelDisplay?: 'on' | 'off' | 'inner' | 'hidden';
1054
+ valueLabelColorOff?: string;
1055
+ valueLabelColorOn?: string;
1056
+ thumbIcon?: string;
1057
+ thumbColorOn?: string;
1058
+ iconColorOff?: string;
1059
+ iconColorOn?: string;
1060
+ trackColorOff?: string;
1061
+ trackColorOn?: string;
1062
+ handlers: FormKitFrameworkContext['handlers'] & {
1063
+ toggles: (e: InputEvent) => void;
1064
+ };
1065
+ }
1066
+
165
1067
  /**
166
1068
  * Input definition for a transferlist input.
167
1069
  * @public
168
1070
  */
169
1071
  export declare const transferlist: FormKitProInput;
170
1072
 
171
-
172
- /**
173
- * @public
174
- */
175
- declare module '@formkit/inputs' {
176
- export interface FormKitOptionsPropExtensions {
177
- asLoaderFunction: FormKitOptionsLoader | Promise<FormKitOptionsLoader>
178
- }
179
- }
180
-
181
- /**
182
- * @public
183
- */
1073
+ /**
1074
+ * Data available to transfer lists.
1075
+ *
1076
+ * @public
1077
+ */
1078
+ export declare interface TransferlistSlotData {
1079
+ options: FormKitOptionsItem[];
1080
+ debounce?: string | number;
1081
+ filter?: (option: FormKitOptionsItem, search?: string) => boolean;
1082
+ optionLoader?: OptionLoader;
1083
+ sourceEmptyMessage?: string;
1084
+ targetEmptyMessage?: string;
1085
+ max?: string | number;
1086
+ clearOnSelect?: Bool;
1087
+ searchable?: Bool;
1088
+ sourceLabel?: string;
1089
+ targetLabel?: string;
1090
+ transferOnSelect?: boolean;
1091
+ placeholder?: string;
1092
+ selections: FormKitOptionsItem[];
1093
+ activeValue?: unknown;
1094
+ activeDescendant?: string;
1095
+ sourceSelected?: boolean;
1096
+ targetOptions?: FormKitOptionsItem[];
1097
+ sourceOptions?: FormKitOptionsItem[];
1098
+ inputText: string;
1099
+ hasNextPage?: (dataForNextPage?: unknown) => void;
1100
+ page: number;
1101
+ targetLoading?: boolean;
1102
+ disabled?: boolean;
1103
+ showSourceEmptyMessage: boolean;
1104
+ showTargetEmptyMessage: boolean;
1105
+ fns: FormKitFrameworkContext['fns'] & {
1106
+ isSelected: (option: FormKitOptionsItem) => boolean;
1107
+ isActive: (option: FormKitOptionsItem) => boolean;
1108
+ optionValue: (option: FormKitOptionsItem) => unknown;
1109
+ getOptionCount: (targetOptions: boolean) => number;
1110
+ };
1111
+ handlers: FormKitFrameworkContext['handlers'] & {
1112
+ clearSearch: () => void;
1113
+ selectOption: (option: FormKitOptionsItem, isSource: boolean) => void;
1114
+ transferForward: () => void;
1115
+ transferForwardAll: () => void;
1116
+ transferBackward: () => void;
1117
+ transferBackwardAll: () => void;
1118
+ onSearch: (e: InputEvent) => void;
1119
+ handleSourceSearchKeyDown: (e: KeyboardEvent) => void;
1120
+ sourceKeyDown: (e: KeyboardEvent) => void;
1121
+ targetKeyDown: (e: KeyboardEvent) => void;
1122
+ sourceFocused: () => void;
1123
+ targetFocused: () => void;
1124
+ onMouseEnter: () => void;
1125
+ onMouseLeave: () => void;
1126
+ };
1127
+ }
1128
+
1129
+ export declare interface TransferlistSlots<Props extends FormKitInputs<Props>> {
1130
+ outer: FormKitSlotData<Props, TransferlistSlotData>;
1131
+ fieldset: FormKitSlotData<Props, TransferlistSlotData>;
1132
+ legend: FormKitSlotData<Props, TransferlistSlotData>;
1133
+ help: FormKitSlotData<Props, TransferlistSlotData>;
1134
+ wrapper: FormKitSlotData<Props, TransferlistSlotData>;
1135
+ source: FormKitSlotData<Props, TransferlistSlotData>;
1136
+ sourceHeader: FormKitSlotData<Props, TransferlistSlotData>;
1137
+ sourceHeaderLabel: FormKitSlotData<Props, TransferlistSlotData>;
1138
+ sourceHeaderItemCount: FormKitSlotData<Props, TransferlistSlotData>;
1139
+ sourceControls: FormKitSlotData<Props, TransferlistSlotData>;
1140
+ sourceSearch: FormKitSlotData<Props, TransferlistSlotData>;
1141
+ sourceSearchInput: FormKitSlotData<Props, TransferlistSlotData>;
1142
+ sourceSearchClear: FormKitSlotData<Props, TransferlistSlotData>;
1143
+ closeIcon: FormKitSlotData<Props, TransferlistSlotData>;
1144
+ sourceListItems: FormKitSlotData<Props, TransferlistSlotData>;
1145
+ sourceEmptyMessage: FormKitSlotData<Props, TransferlistSlotData>;
1146
+ emptyMessageInner: FormKitSlotData<Props, TransferlistSlotData>;
1147
+ sourceListItem: FormKitSlotData<Props, TransferlistSlotData>;
1148
+ selectedIcon: FormKitSlotData<Props, TransferlistSlotData>;
1149
+ sourceOption: FormKitSlotData<Props, TransferlistSlotData & {
1150
+ option: FormKitOptionsItem;
1151
+ }>;
1152
+ sourceLoadMore: FormKitSlotData<Props, TransferlistSlotData>;
1153
+ loadMoreInner: FormKitSlotData<Props, TransferlistSlotData>;
1154
+ loaderIcon: FormKitSlotData<Props, TransferlistSlotData>;
1155
+ transferControls: FormKitSlotData<Props, TransferlistSlotData>;
1156
+ transferButtonForward: FormKitSlotData<Props, TransferlistSlotData>;
1157
+ transferButtonForwardAll: FormKitSlotData<Props, TransferlistSlotData>;
1158
+ transferButtonBackward: FormKitSlotData<Props, TransferlistSlotData>;
1159
+ transferButtonBackwardAll: FormKitSlotData<Props, TransferlistSlotData>;
1160
+ controlLabel: FormKitSlotData<Props, TransferlistSlotData>;
1161
+ fastForwardIcon: FormKitSlotData<Props, TransferlistSlotData>;
1162
+ moveRightIcon: FormKitSlotData<Props, TransferlistSlotData>;
1163
+ moveLeftIcon: FormKitSlotData<Props, TransferlistSlotData>;
1164
+ rewindIcon: FormKitSlotData<Props, TransferlistSlotData>;
1165
+ target: FormKitSlotData<Props, TransferlistSlotData>;
1166
+ targetHeader: FormKitSlotData<Props, TransferlistSlotData>;
1167
+ targetHeaderLabel: FormKitSlotData<Props, TransferlistSlotData>;
1168
+ targetHeaderItemCount: FormKitSlotData<Props, TransferlistSlotData>;
1169
+ targetListItems: FormKitSlotData<Props, TransferlistSlotData>;
1170
+ targetEmptyMessage: FormKitSlotData<Props, TransferlistSlotData>;
1171
+ targetListItem: FormKitSlotData<Props, TransferlistSlotData>;
1172
+ targetOption: FormKitSlotData<Props, TransferlistSlotData & {
1173
+ option: FormKitOptionsItem;
1174
+ }>;
1175
+ targetLoadMore: FormKitSlotData<Props, TransferlistSlotData>;
1176
+ messages: FormKitSlotData<Props, ToggleSlotData<Props>>;
1177
+ message: FormKitSlotData<Props, ToggleSlotData<Props> & {
1178
+ message: FormKitMessage;
1179
+ }>;
1180
+ }
1181
+
1182
+ declare type Yes = 'true' | true | '';
1183
+
1184
+ /* <declare> */
184
1185
  declare module '@formkit/core' {
185
1186
  export interface FormKitFrameworkContext {
186
1187
  hasNextPage: (dataForNextPage?: unknown) => void
@@ -188,6 +1189,242 @@ declare module '@formkit/core' {
188
1189
  search: string
189
1190
  }
190
1191
  }
1192
+ /* </declare> */
1193
+ /* <declare> */
1194
+
1195
+ export interface OptionLoader {
1196
+ (value: any, cachedItem: FormKitOptionsItem<any>):
1197
+ | FormKitOptionsItem<any>
1198
+ | string
1199
+ | void
1200
+ | Promise<FormKitOptionsItem<any> | string | void>
1201
+ }
1202
+
1203
+ declare module '@formkit/inputs' {
1204
+ interface FormKitConditionalProps {
1205
+ overlay?: undefined
1206
+ chart?: undefined
1207
+ }
1208
+
1209
+ /**
1210
+ * General input events available to all FormKit inputs.
1211
+ * @public
1212
+ */
1213
+ interface FormKitBaseEvents<Props extends FormKitInputs<Props>> {
1214
+ (event: 'input', value: PropType<Props, 'value'>, node: FormKitNode): any
1215
+ (event: 'inputRaw', value: PropType<Props, 'value'>, node: FormKitNode): any
1216
+ (
1217
+ event: 'input-raw',
1218
+ value: PropType<Props, 'value'>,
1219
+ node: FormKitNode
1220
+ ): any
1221
+ (event: 'update:modelValue', value: PropType<Props, 'value'>): any
1222
+ (event: 'update:model-value', value: PropType<Props, 'value'>): any
1223
+ (event: 'node', node: FormKitNode): any
1224
+ }
1225
+
1226
+ interface FormKitInputProps<Props extends FormKitInputs<Props>> {
1227
+ autocomplete: {
1228
+ type: 'autocomplete'
1229
+ value?: Props['multiple'] extends Yes
1230
+ ? OptionsProValue<Props['options']>[]
1231
+ : OptionsProValue<Props['options']>
1232
+ debounce?: number | string
1233
+ multiple?: Bool
1234
+ options: FormKitProOptionsProp
1235
+ selectionAppearance?: 'option' | 'text-input'
1236
+ filter?: (option: FormKitOptionsItem, search: string) => boolean
1237
+ optionLoader?: OptionLoader
1238
+ // Behavioral props
1239
+ max?: Props['multiple'] extends Yes ? number | string : undefined
1240
+ openOnClick?: Bool
1241
+ openOnFocus?: Bool
1242
+ closeOnSelect?: Bool
1243
+ openOnRemove?: Bool
1244
+ alwaysLoadOnOpen?: Bool
1245
+ selectionRemovable?: Props['multiple'] extends Yes ? undefined : Bool
1246
+ loadOnCreated?: Bool
1247
+ clearSearchOnOpen?: Bool
1248
+ emptyMessage?: string
1249
+ // TODO: audit these props.
1250
+ }
1251
+
1252
+ datepicker: {
1253
+ type: 'datepicker'
1254
+ value?: string | Date
1255
+ dateFormat?: string
1256
+ disabledDays?: (node: FormKitNode, date: Date) => boolean
1257
+ format?: string | FormatStyleObj
1258
+ maxDate?: Date | string
1259
+ maxScan?: number
1260
+ minDate?: Date | string
1261
+ monthButtonFormat?: 'M' | 'MM' | 'MMM' | 'MMMM'
1262
+ monthFormat?: 'M' | 'MM' | 'MMM' | 'MMMM'
1263
+ overlay?: Bool
1264
+ pickerOnly?: Bool
1265
+ showMonths?: number
1266
+ sequence?: Array<Panels>
1267
+ valueFormat?: string
1268
+ valueLocale?: string
1269
+ weekStart?: 0 | 1 | 2 | 3 | 4 | 5 | 6
1270
+ weekDayFormat?: 'dddd' | 'ddd' | 'dd'
1271
+ yearFormat?: 'YY' | 'YYYY'
1272
+ prefixIcon?: string
1273
+ suffixIcon?: string
1274
+ }
1275
+
1276
+ dropdown: {
1277
+ type: 'dropdown'
1278
+ value?: Props['multiple'] extends Yes ? any[] : any
1279
+ multiple?: Bool
1280
+ options?: FormKitProOptionsProp
1281
+ selectionAppearance?: 'truncate' | 'tags'
1282
+ filter?: (option: FormKitOptionsItem, search: string) => boolean
1283
+ optionLoader?: OptionLoader
1284
+ emptyMessage?: string
1285
+ max?: Props['multiple'] extends Yes ? number | string : undefined
1286
+ openOnFocus?: Bool
1287
+ openOnRemove?: Bool
1288
+ closeOnSelect?: Bool
1289
+ clearSearchOnOpen?: Bool
1290
+ selectionRemovable?: Props['multiple'] extends Yes ? undefined : Bool
1291
+ loadOnCreated?: Bool
1292
+ alwaysLoadOnOpen?: Bool
1293
+ optionsAppearance?: 'checkbox'
1294
+ }
1295
+
1296
+ rating: {
1297
+ value?: number | string
1298
+ type: 'rating'
1299
+ min?: string | number
1300
+ max?: string | number
1301
+ step?: string | number
1302
+ hoverHighlight?: Bool
1303
+ offColor?: string
1304
+ onColor?: string
1305
+ }
1306
+
1307
+ repeater: {
1308
+ type: 'repeater'
1309
+ value?: Array<Record<string, any>>
1310
+ addLabel?: string
1311
+ addAttrs?: Record<string, any>
1312
+ addButton?: Bool
1313
+ upControl?: Bool
1314
+ downControl?: Bool
1315
+ insertControl?: Bool
1316
+ removeControl?: Bool
1317
+ min?: number | string
1318
+ max?: number | string | null
1319
+ }
1320
+
1321
+ mask: {
1322
+ type: 'mask'
1323
+ mask: string
1324
+ value?: string
1325
+ allowIncomplete?: Bool
1326
+ mode?: 'shift' | 'replace' | 'select'
1327
+ overlay?: Bool
1328
+ prefix?: string
1329
+ showMask?: Bool
1330
+ suffix?: string
1331
+ tokens?: PartMap
1332
+ unmaskValue?: Bool
1333
+ }
1334
+
1335
+ slider: {
1336
+ type: 'slider'
1337
+ value?: string | string[] | number | number[]
1338
+ chart?: Array<{ value: number; at: number }>
1339
+ inputAttrs?: Record<string, any>
1340
+ marks?: Bool | Array<{ at?: number; label?: string }>
1341
+ markLabel?: Bool
1342
+ max?: number | string
1343
+ maxInputAttrs?: Record<string, any>
1344
+ min?: string | number
1345
+ minInputAttrs?: Record<string, any>
1346
+ prefix?: string
1347
+ showInput?: Bool
1348
+ snapToMarks?: Bool
1349
+ step?: number | string
1350
+ suffix?: string
1351
+ tooltip?: Bool
1352
+ tooltipFormat?: (value: number, handle: string) => string | undefined
1353
+ }
1354
+
1355
+ taglist: {
1356
+ type: 'taglist'
1357
+ value?: any[]
1358
+ debounce?: number | string
1359
+ options?: FormKitProOptionsProp
1360
+ selectionAppearance?: 'truncate' | 'tags'
1361
+ openOnClick?: Bool
1362
+ filter?: (option: FormKitOptionsItem, search: string) => boolean
1363
+ optionLoader?: OptionLoader
1364
+ emptyMessage?: string
1365
+ max?: number | string
1366
+ closeOnSelect?: Bool
1367
+ alwaysLoadOnOpen?: Bool
1368
+ loadOnCreated?: Bool
1369
+ clearSearchOnOpen?: Bool
1370
+ }
1371
+
1372
+ toggle: {
1373
+ type: 'toggle'
1374
+ onValue?: any
1375
+ offValue?: any
1376
+ value?:
1377
+ | (Props['onValue'] extends AllReals ? Props['onValue'] : true)
1378
+ | (Props['offValue'] extends AllReals ? Props['offValue'] : false)
1379
+ altLabelPosition?: Bool
1380
+ offValueLabel?: string
1381
+ onValueLabel?: string
1382
+ valueLabelDisplay?: 'on' | 'off' | 'inner' | 'hidden'
1383
+ valueLabelColorOff?: string
1384
+ valueLabelColorOn?: string
1385
+ thumbIcon?: string
1386
+ thumbColorOn?: string
1387
+ iconColorOff?: string
1388
+ iconColorOn?: string
1389
+ trackColorOff?: string
1390
+ trackColorOn?: string
1391
+ }
1392
+
1393
+ transferlist: {
1394
+ type: 'transferlist'
1395
+ value?: OptionsProValue<Props['options']>[]
1396
+ options: FormKitProOptionsProp
1397
+ debounce?: number | string
1398
+ filter?: (option: FormKitOptionsItem, search: string) => boolean
1399
+ optionLoader?: OptionLoader
1400
+ sourceEmptyMessage?: string
1401
+ targetEmptyMessage?: string
1402
+ max?: string | number
1403
+ clearOnSelect?: Bool
1404
+ searchable?: Bool
1405
+ sourceLabel?: string
1406
+ targetLabel?: string
1407
+ transferOnSelect?: Bool
1408
+ }
1409
+ }
1410
+
1411
+ interface FormKitInputSlots<Props extends FormKitInputs<Props>> {
1412
+ autocomplete: FormKitAutocompleteSlots<Props>
1413
+ datepicker: FormKitDatePickerSlots<Props> & FormKitOverlaySlots<Props>
1414
+ dropdown: FormKitDropdownSlots<Props>
1415
+ mask: FormKitBaseSlots<Props> & FormKitOverlaySlots<Props>
1416
+ rating: FormKitBaseSlots<Props> & FormKitRatingSlots<Props>
1417
+ repeater: FormKitRepeaterSlots<Props>
1418
+ slider: FormKitSliderSlots<Props> &
1419
+ (Props['chart'] extends Array<{ at: number; value: number }>
1420
+ ? SliderChartSlots<Props>
1421
+ : {})
1422
+ taglist: FormKitTaglistSlots<Props>
1423
+ toggle: FormKitToggleSlots<Props>
1424
+ transferlist: TransferlistSlots<Props>
1425
+ }
1426
+ }
1427
+ /* </declare> */
191
1428
 
192
1429
  export { }
193
1430