@formkit/pro 0.115.10 → 0.117.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/README.md +1 -0
- package/colorpicker/colorpicker.ts +164 -0
- package/colorpicker/index.mjs +1 -0
- package/datepicker/datepicker.ts +4 -1
- package/datepicker/index.mjs +1 -1
- package/dropdown/dropdown.ts +1 -1
- package/genesis.css +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +117 -1
- package/index.mjs +1 -1
- package/package.json +10 -4
package/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { FormKitMessage } from '@formkit/core';
|
|
|
6
6
|
import type { FormKitNode } from '@formkit/core';
|
|
7
7
|
import type { FormKitOptionsItem } from '@formkit/inputs';
|
|
8
8
|
import type { FormKitOptionsProp } from '@formkit/inputs';
|
|
9
|
+
import type { FormKitOptionsPropWithGroups } from '@formkit/inputs';
|
|
9
10
|
import type { FormKitOptionsValue } from '@formkit/inputs';
|
|
10
11
|
import { FormKitPlugin } from '@formkit/core';
|
|
11
12
|
import { FormKitSchemaExtendableSection } from '@formkit/inputs';
|
|
@@ -156,6 +157,12 @@ declare interface CharPart {
|
|
|
156
157
|
pattern: RegExp;
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Input definition for a colorpicker input.
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export declare const colorpicker: FormKitProInput;
|
|
165
|
+
|
|
159
166
|
/**
|
|
160
167
|
* Creates a set of commonly used sections.
|
|
161
168
|
* @param createSection - Creates commonly used sections.
|
|
@@ -369,6 +376,98 @@ export declare interface FormKitAutocompleteSlots<Props extends FormKitInputs<Pr
|
|
|
369
376
|
message: FormKitSlotData<Props, AutocompleteSlotData>;
|
|
370
377
|
}
|
|
371
378
|
|
|
379
|
+
declare interface FormKitColorpickerSlotData {
|
|
380
|
+
format: 'hex' | 'rgba' | 'hsla';
|
|
381
|
+
valueFormat: 'hex' | 'rgba' | 'hsla';
|
|
382
|
+
panelControls: Bool;
|
|
383
|
+
panelFormat: Bool;
|
|
384
|
+
eyeDropper: Bool;
|
|
385
|
+
inline?: undefined | true;
|
|
386
|
+
options?: undefined | FormKitOptionsPropWithGroups;
|
|
387
|
+
showValue: Bool;
|
|
388
|
+
closeOnSelect?: undefined | true;
|
|
389
|
+
allowPaste: Bool;
|
|
390
|
+
panelIsOpen: Bool;
|
|
391
|
+
h: number;
|
|
392
|
+
s: number;
|
|
393
|
+
v: number;
|
|
394
|
+
alpha: number;
|
|
395
|
+
hsla: Record<string, number>;
|
|
396
|
+
hslaPercent: Record<string, number>;
|
|
397
|
+
hslaString: string;
|
|
398
|
+
hslaStringPrecise: string;
|
|
399
|
+
rgba: Record<string, number>;
|
|
400
|
+
rgbaString: string;
|
|
401
|
+
hex: string;
|
|
402
|
+
panelActiveFormat: 'hex' | 'rgba' | 'hsla';
|
|
403
|
+
fns: FormKitFrameworkContext['fns'] & {
|
|
404
|
+
anyToHsvaString: (value: string) => string;
|
|
405
|
+
};
|
|
406
|
+
handlers: FormKitFrameworkContext['handlers'] & {
|
|
407
|
+
inputPreviewClick: (e: Event) => void;
|
|
408
|
+
inputPreviewFocusout: (e: FocusEvent) => void;
|
|
409
|
+
inputPreviewKeydown: (e: KeyboardEvent) => void;
|
|
410
|
+
closePanel: () => void;
|
|
411
|
+
panelCloseKeydown: (e: KeyboardEvent) => void;
|
|
412
|
+
toggleFormat: (delta: number) => void;
|
|
413
|
+
panelKeydown: (e: KeyboardEvent) => void;
|
|
414
|
+
lsKeydown: (e: KeyboardEvent) => void;
|
|
415
|
+
hueControlKeydown: (e: KeyboardEvent) => void;
|
|
416
|
+
alphaControlKeydown: (e: KeyboardEvent) => void;
|
|
417
|
+
eyeDropperKeydown: (e: KeyboardEvent) => void;
|
|
418
|
+
formatSwitcherKeydown: (e: KeyboardEvent) => void;
|
|
419
|
+
hexInput: (e: InputEvent) => void;
|
|
420
|
+
hexKeydown: (e: KeyboardEvent) => void;
|
|
421
|
+
hexFocus: () => void;
|
|
422
|
+
hexBlur: (e: Event) => void;
|
|
423
|
+
rangeLimitInput: (format: string, min: number, max: number, event?: Event) => (e: Event) => void;
|
|
424
|
+
rangeLimitKeydown: (format: string, min: number, max: number, step: number) => (e: KeyboardEvent) => void;
|
|
425
|
+
swatchClick: (e: Event) => void;
|
|
426
|
+
swatchKeydown: (e: KeyboardEvent) => void;
|
|
427
|
+
};
|
|
428
|
+
ui: FormKitFrameworkContext['ui'] & {
|
|
429
|
+
close: FormKitMessage;
|
|
430
|
+
toggle: FormKitMessage;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export declare interface FormKitColorpickerSlots<Props extends FormKitInputs<Props>> {
|
|
435
|
+
swatchPreview: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
436
|
+
valueString: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
437
|
+
panel: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
438
|
+
panelClose: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
439
|
+
controlGroup: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
440
|
+
LS: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
441
|
+
canvasLS: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
442
|
+
controlLS: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
443
|
+
hue: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
444
|
+
canvasHue: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
445
|
+
controlHue: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
446
|
+
alpha: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
447
|
+
canvasAlpha: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
448
|
+
controlAlpha: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
449
|
+
preview: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
450
|
+
canvasPreview: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
451
|
+
canvasSwatchPreview: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
452
|
+
eyeDropper: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
453
|
+
formatField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
454
|
+
colorInputGroup: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
455
|
+
hexField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
456
|
+
rField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
457
|
+
gField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
458
|
+
bField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
459
|
+
hField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
460
|
+
sField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
461
|
+
lField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
462
|
+
aField: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
463
|
+
formatSwitcher: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
464
|
+
swatches: FormKitSlotData<Props, FormKitColorpickerSlotData>;
|
|
465
|
+
swatch: FormKitSlotData<Props, FormKitColorpickerSlotData & {
|
|
466
|
+
option: FormKitOptionsItem;
|
|
467
|
+
index: number;
|
|
468
|
+
}>;
|
|
469
|
+
}
|
|
470
|
+
|
|
372
471
|
/**
|
|
373
472
|
* Slot information that pertains specifically to the datepicker input.
|
|
374
473
|
*
|
|
@@ -827,7 +926,8 @@ declare namespace inputs {
|
|
|
827
926
|
taglist,
|
|
828
927
|
mask,
|
|
829
928
|
transferlist,
|
|
830
|
-
slider
|
|
929
|
+
slider,
|
|
930
|
+
colorpicker
|
|
831
931
|
}
|
|
832
932
|
}
|
|
833
933
|
export { inputs }
|
|
@@ -1245,6 +1345,21 @@ declare module '@formkit/inputs' {
|
|
|
1245
1345
|
// TODO: audit these props.
|
|
1246
1346
|
}
|
|
1247
1347
|
|
|
1348
|
+
colorpicker: {
|
|
1349
|
+
type: 'colorpicker'
|
|
1350
|
+
value?: string
|
|
1351
|
+
options?: FormKitOptionsPropWithGroups
|
|
1352
|
+
inline?: Bool
|
|
1353
|
+
format?: 'hex' | 'rgba' | 'hsla'
|
|
1354
|
+
valueFormat?: 'hex' | 'rgba' | 'hsla'
|
|
1355
|
+
panelControls?: Bool
|
|
1356
|
+
panelFormat?: Bool
|
|
1357
|
+
eyeDropper?: Bool
|
|
1358
|
+
showValue?: Bool
|
|
1359
|
+
closeOnSelect?: Bool
|
|
1360
|
+
allowPaste?: Bool
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1248
1363
|
datepicker: {
|
|
1249
1364
|
type: 'datepicker'
|
|
1250
1365
|
value?: string | Date
|
|
@@ -1405,6 +1520,7 @@ declare module '@formkit/inputs' {
|
|
|
1405
1520
|
|
|
1406
1521
|
interface FormKitInputSlots<Props extends FormKitInputs<Props>> {
|
|
1407
1522
|
autocomplete: FormKitAutocompleteSlots<Props>
|
|
1523
|
+
colorpicker: FormKitColorpickerSlots<Props>
|
|
1408
1524
|
datepicker: FormKitDatePickerSlots<Props> & FormKitOverlaySlots<Props>
|
|
1409
1525
|
dropdown: FormKitDropdownSlots<Props>
|
|
1410
1526
|
mask: FormKitBaseSlots<Props> & FormKitOverlaySlots<Props>
|