@formkit/pro 0.117.7 → 0.118.0
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/genesis.css +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +79 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/togglebuttons/index.mjs +1 -0
- package/togglebuttons/togglebuttons.ts +98 -0
package/index.d.ts
CHANGED
|
@@ -877,6 +877,38 @@ export declare interface FormKitTaglistSlots<Props extends FormKitInputs<Props>>
|
|
|
877
877
|
}>;
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Togglebuttons slots.
|
|
882
|
+
*
|
|
883
|
+
* @public
|
|
884
|
+
*/
|
|
885
|
+
export declare interface FormKitTogglebuttonsSlots<Props extends FormKitInputs<Props>> {
|
|
886
|
+
wrapper: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
887
|
+
options: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
888
|
+
option: FormKitSlotData<Props, TogglebuttonsSlotData<Props> & {
|
|
889
|
+
option: FormKitOptionsItem;
|
|
890
|
+
index: number;
|
|
891
|
+
}>;
|
|
892
|
+
singleToggle: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
893
|
+
multiToggle: FormKitSlotData<Props, TogglebuttonsSlotData<Props> & {
|
|
894
|
+
option: FormKitOptionsItem;
|
|
895
|
+
index: number;
|
|
896
|
+
}>;
|
|
897
|
+
inputInner: FormKitSlotData<Props, TogglebuttonsSlotData<Props> & {
|
|
898
|
+
option: FormKitOptionsItem;
|
|
899
|
+
index: number;
|
|
900
|
+
}>;
|
|
901
|
+
on: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
902
|
+
off: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
903
|
+
prefix: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
904
|
+
suffix: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
905
|
+
help: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
906
|
+
messages: FormKitSlotData<Props, TogglebuttonsSlotData<Props>>;
|
|
907
|
+
message: FormKitSlotData<Props, TogglebuttonsSlotData<Props> & {
|
|
908
|
+
message: FormKitMessage;
|
|
909
|
+
}>;
|
|
910
|
+
}
|
|
911
|
+
|
|
880
912
|
/**
|
|
881
913
|
* Toggle slots.
|
|
882
914
|
*
|
|
@@ -929,7 +961,8 @@ declare namespace inputs {
|
|
|
929
961
|
mask,
|
|
930
962
|
transferlist,
|
|
931
963
|
slider,
|
|
932
|
-
colorpicker
|
|
964
|
+
colorpicker,
|
|
965
|
+
togglebuttons
|
|
933
966
|
}
|
|
934
967
|
}
|
|
935
968
|
export { inputs }
|
|
@@ -1166,6 +1199,33 @@ declare type TimeFormatStyle = 'long' | 'medium' | 'short';
|
|
|
1166
1199
|
*/
|
|
1167
1200
|
export declare const toggle: FormKitProInput;
|
|
1168
1201
|
|
|
1202
|
+
/**
|
|
1203
|
+
* Input definition for a toggle group input.
|
|
1204
|
+
* @public
|
|
1205
|
+
*/
|
|
1206
|
+
export declare const togglebuttons: FormKitProInput;
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Slot data for togglebuttons
|
|
1210
|
+
*/
|
|
1211
|
+
export declare interface TogglebuttonsSlotData<Props extends FormKitInputs<Props>> {
|
|
1212
|
+
onValue?: any;
|
|
1213
|
+
offValue?: any;
|
|
1214
|
+
offLabel?: string;
|
|
1215
|
+
onLabel?: string;
|
|
1216
|
+
options: FormKitOptionsItem[];
|
|
1217
|
+
option?: FormKitOptionsItem;
|
|
1218
|
+
multiple?: Bool;
|
|
1219
|
+
enforced?: Bool;
|
|
1220
|
+
vertical?: Bool;
|
|
1221
|
+
fns: FormKitFrameworkContext['fns'] & {
|
|
1222
|
+
isChecked: (option: FormKitOptionsItem) => boolean;
|
|
1223
|
+
};
|
|
1224
|
+
handlers: FormKitFrameworkContext['handlers'] & {
|
|
1225
|
+
toggleValue: (option: FormKitOptionsItem) => (e: MouseEvent) => void;
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1169
1229
|
/**
|
|
1170
1230
|
* Slot data for toggles
|
|
1171
1231
|
*/
|
|
@@ -1520,6 +1580,23 @@ declare module '@formkit/inputs' {
|
|
|
1520
1580
|
trackColorOn?: string
|
|
1521
1581
|
}
|
|
1522
1582
|
|
|
1583
|
+
togglebuttons: {
|
|
1584
|
+
type: 'togglebuttons'
|
|
1585
|
+
onValue?: any
|
|
1586
|
+
offValue?: any
|
|
1587
|
+
value?:
|
|
1588
|
+
| (Props['onValue'] extends AllReals ? Props['onValue'] : true)
|
|
1589
|
+
| (Props['offValue'] extends AllReals ? Props['offValue'] : false)
|
|
1590
|
+
options?: FormKitProOptionsProp
|
|
1591
|
+
label?: string
|
|
1592
|
+
enforced?: Bool
|
|
1593
|
+
multiple?: Bool
|
|
1594
|
+
vertical?: Bool
|
|
1595
|
+
disabled?: Bool
|
|
1596
|
+
prefixIcon?: string
|
|
1597
|
+
suffixIcon?: string
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1523
1600
|
transferlist: {
|
|
1524
1601
|
type: 'transferlist'
|
|
1525
1602
|
value?: OptionsProValue<Props['options']>[]
|
|
@@ -1552,6 +1629,7 @@ declare module '@formkit/inputs' {
|
|
|
1552
1629
|
: {})
|
|
1553
1630
|
taglist: FormKitTaglistSlots<Props>
|
|
1554
1631
|
toggle: FormKitToggleSlots<Props>
|
|
1632
|
+
togglebuttons: FormKitTogglebuttonsSlots<Props>
|
|
1555
1633
|
transferlist: TransferlistSlots<Props>
|
|
1556
1634
|
}
|
|
1557
1635
|
}
|