@formkit/pro 0.122.4 → 0.122.6-9cf4a5d

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
@@ -201,6 +201,39 @@ export declare function createProPlugin(apiKey: string, inputs?: Record<string,
201
201
  */
202
202
  export declare function createSectionFactory(inputCode: string): SectionFactory;
203
203
 
204
+ /**
205
+ * Input definition for a toggle group input.
206
+ * @public
207
+ */
208
+ export declare const currency: FormKitProInput;
209
+
210
+ /**
211
+ * Slot data for currency
212
+ */
213
+ export declare interface CurrencySlotData<Props extends FormKitInputs<Props>> {
214
+ type: 'currency';
215
+ value?: string | number;
216
+ label?: string;
217
+ disabled?: Bool;
218
+ currency?: string;
219
+ decimals?: Bool | number;
220
+ minDecimals?: Bool | number;
221
+ min?: number;
222
+ max?: number;
223
+ step?: number;
224
+ displayLocale?: string;
225
+ valueFormat?: string;
226
+ handlers: FormKitFrameworkContext['handlers'] & {
227
+ init(): void;
228
+ handleInput: (e: InputEvent) => void;
229
+ handleFocus: (e: InputEvent) => void;
230
+ handleBlur(): void;
231
+ handleBeforeInput: (e: InputEvent) => void;
232
+ handleClick(e: MouseEvent): void;
233
+ handleKeyDown: (e: InputEvent) => void;
234
+ };
235
+ }
236
+
204
237
  /**
205
238
  * Input definition for a datepicker input.
206
239
  * @public
@@ -459,6 +492,23 @@ export declare interface FormKitColorpickerSlots<Props extends FormKitInputs<Pro
459
492
  }>;
460
493
  }
461
494
 
495
+ /**
496
+ * Currency slots.
497
+ *
498
+ * @public
499
+ */
500
+ export declare interface FormKitCurrencySlots<Props extends FormKitInputs<Props>> {
501
+ wrapper: FormKitSlotData<Props, CurrencySlotData<Props>>;
502
+ input: FormKitSlotData<Props, CurrencySlotData<Props>>;
503
+ prefix: FormKitSlotData<Props, CurrencySlotData<Props>>;
504
+ suffix: FormKitSlotData<Props, CurrencySlotData<Props>>;
505
+ help: FormKitSlotData<Props, CurrencySlotData<Props>>;
506
+ messages: FormKitSlotData<Props, CurrencySlotData<Props>>;
507
+ message: FormKitSlotData<Props, CurrencySlotData<Props> & {
508
+ message: FormKitMessage;
509
+ }>;
510
+ }
511
+
462
512
  /**
463
513
  * Slot information that pertains specifically to the datepicker input.
464
514
  *
@@ -945,6 +995,23 @@ export declare interface FormKitToggleSlots<Props extends FormKitInputs<Props>>
945
995
  }>;
946
996
  }
947
997
 
998
+ /**
999
+ * Unit slots.
1000
+ *
1001
+ * @public
1002
+ */
1003
+ export declare interface FormKitUnitSlots<Props extends FormKitInputs<Props>> {
1004
+ wrapper: FormKitSlotData<Props, UnitSlotData<Props>>;
1005
+ input: FormKitSlotData<Props, UnitSlotData<Props>>;
1006
+ prefix: FormKitSlotData<Props, UnitSlotData<Props>>;
1007
+ suffix: FormKitSlotData<Props, UnitSlotData<Props>>;
1008
+ help: FormKitSlotData<Props, UnitSlotData<Props>>;
1009
+ messages: FormKitSlotData<Props, UnitSlotData<Props>>;
1010
+ message: FormKitSlotData<Props, UnitSlotData<Props> & {
1011
+ message: FormKitMessage;
1012
+ }>;
1013
+ }
1014
+
948
1015
  /**
949
1016
  * Behavioral group options.
950
1017
  */
@@ -973,7 +1040,9 @@ declare namespace inputs {
973
1040
  transferlist,
974
1041
  slider,
975
1042
  colorpicker,
976
- togglebuttons
1043
+ togglebuttons,
1044
+ currency,
1045
+ unit
977
1046
  }
978
1047
  }
979
1048
  export { inputs }
@@ -1374,6 +1443,39 @@ export declare interface TransferlistSlots<Props extends FormKitInputs<Props>> {
1374
1443
  }>;
1375
1444
  }
1376
1445
 
1446
+ /**
1447
+ * Input definition for a toggle group input.
1448
+ * @public
1449
+ */
1450
+ export declare const unit: FormKitProInput;
1451
+
1452
+ /**
1453
+ * Slot data for unit
1454
+ */
1455
+ export declare interface UnitSlotData<Props extends FormKitInputs<Props>> {
1456
+ type: 'unit';
1457
+ value?: string | number;
1458
+ label?: string;
1459
+ disabled?: Bool;
1460
+ unit?: string;
1461
+ decimals?: Bool | number;
1462
+ minDecimals?: Bool | number;
1463
+ min?: number;
1464
+ max?: number;
1465
+ step?: number;
1466
+ displayLocale?: string;
1467
+ valueFormat?: string;
1468
+ handlers: FormKitFrameworkContext['handlers'] & {
1469
+ init(): void;
1470
+ handleInput: (e: InputEvent) => void;
1471
+ handleFocus: (e: InputEvent) => void;
1472
+ handleBlur(): void;
1473
+ handleBeforeInput: (e: InputEvent) => void;
1474
+ handleClick(e: MouseEvent): void;
1475
+ handleKeyDown: (e: InputEvent) => void;
1476
+ };
1477
+ }
1478
+
1377
1479
  declare type Yes = 'true' | true | '';
1378
1480
 
1379
1481
  /* <declare> */
@@ -1444,6 +1546,38 @@ declare module '@formkit/inputs' {
1444
1546
  allowPaste?: Bool
1445
1547
  }
1446
1548
 
1549
+ currency: {
1550
+ type: 'currency'
1551
+ value?: string | number
1552
+ label?: string
1553
+ disabled?: Bool
1554
+ currency?: string
1555
+ displayLocale?: string
1556
+ decimals?: Bool | number
1557
+ minDecimals?: number
1558
+ min?: number
1559
+ max?: number
1560
+ step?: number
1561
+ // valueLocale?: string
1562
+ // valueFormat?: string
1563
+ }
1564
+
1565
+ unit: {
1566
+ type: 'unit'
1567
+ value?: string | number
1568
+ label?: string
1569
+ disabled?: Bool
1570
+ unit?: string
1571
+ displayLocale?: string
1572
+ decimals?: Bool | number
1573
+ minDecimals?: number
1574
+ min?: number
1575
+ max?: number
1576
+ step?: number
1577
+ // valueLocale?: string
1578
+ // valueFormat?: string
1579
+ }
1580
+
1447
1581
  datepicker: {
1448
1582
  type: 'datepicker'
1449
1583
  value?: string | Date
@@ -1637,6 +1771,7 @@ declare module '@formkit/inputs' {
1637
1771
  interface FormKitInputSlots<Props extends FormKitInputs<Props>> {
1638
1772
  autocomplete: FormKitAutocompleteSlots<Props>
1639
1773
  colorpicker: FormKitColorpickerSlots<Props>
1774
+ currency: FormKitCurrencySlots<Props>
1640
1775
  datepicker: FormKitDatePickerSlots<Props> & FormKitOverlaySlots<Props>
1641
1776
  dropdown: FormKitDropdownSlots<Props>
1642
1777
  mask: FormKitBaseSlots<Props> & FormKitOverlaySlots<Props>
@@ -1650,6 +1785,7 @@ declare module '@formkit/inputs' {
1650
1785
  toggle: FormKitToggleSlots<Props>
1651
1786
  togglebuttons: FormKitTogglebuttonsSlots<Props>
1652
1787
  transferlist: TransferlistSlots<Props>
1788
+ unit: FormKitUnitSlots<Props>
1653
1789
  }
1654
1790
  }
1655
1791
  /* </declare> */