@formkit/pro 0.122.6 → 0.122.7-f73947e

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/mask/mask.ts CHANGED
@@ -19,8 +19,7 @@ import {
19
19
  overlayPlaceholder,
20
20
  overlayInner,
21
21
  } from '../sections/maskSections'
22
- import useMask from '../features/mask'
23
- import maskOverlay from '../features/maskOverlay'
22
+ import { useMask, maskOverlay } from '../features/index'
24
23
 
25
24
  /**
26
25
  * Input definition for a mask input.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formkit/pro",
3
- "version": "0.122.6",
3
+ "version": "0.122.7-f73947e",
4
4
  "description": "FormKit Pro — Form inputs and tools for high quality forms.",
5
5
  "main": "index.cjs",
6
6
  "module": "index.mjs",
@@ -9,6 +9,54 @@
9
9
  "author": "FormKit <info@formkit.com>",
10
10
  "license": "SEE LICENSE IN LICENSE.md",
11
11
  "exports": {
12
+ "./autocomplete": {
13
+ "import": "./autocomplete/index.mjs",
14
+ "types": "./index.d.ts"
15
+ },
16
+ "./colorpicker": {
17
+ "import": "./colorpicker/index.mjs",
18
+ "types": "./index.d.ts"
19
+ },
20
+ "./datepicker": {
21
+ "import": "./datepicker/index.mjs",
22
+ "types": "./index.d.ts"
23
+ },
24
+ "./dropdown": {
25
+ "import": "./dropdown/index.mjs",
26
+ "types": "./index.d.ts"
27
+ },
28
+ "./mask": {
29
+ "import": "./mask/index.mjs",
30
+ "types": "./index.d.ts"
31
+ },
32
+ "./rating": {
33
+ "import": "./rating/index.mjs",
34
+ "types": "./index.d.ts"
35
+ },
36
+ "./repeater": {
37
+ "import": "./repeater/index.mjs",
38
+ "types": "./index.d.ts"
39
+ },
40
+ "./slider": {
41
+ "import": "./slider/index.mjs",
42
+ "types": "./index.d.ts"
43
+ },
44
+ "./taglist": {
45
+ "import": "./taglist/index.mjs",
46
+ "types": "./index.d.ts"
47
+ },
48
+ "./toggle": {
49
+ "import": "./toggle/index.mjs",
50
+ "types": "./index.d.ts"
51
+ },
52
+ "./togglebuttons": {
53
+ "import": "./togglebuttons/index.mjs",
54
+ "types": "./index.d.ts"
55
+ },
56
+ "./transferlist": {
57
+ "import": "./transferlist/index.mjs",
58
+ "types": "./index.d.ts"
59
+ },
12
60
  ".": {
13
61
  "import": "./index.mjs",
14
62
  "require": "./index.cjs",
package/rating/rating.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { defaultIcon } from '@formkit/inputs'
2
- import rate from '../features/rate'
3
2
  import { FormKitProInput } from '@formkit/pro'
4
3
  import {
5
4
  outer,
@@ -20,6 +19,8 @@ import {
20
19
  suffix,
21
20
  } from '../sections/ratingSections'
22
21
 
22
+ import { rate } from '../features/index'
23
+
23
24
  /**
24
25
  * Input definition for a rating input.
25
26
  * @public
@@ -29,10 +29,10 @@ import {
29
29
  dragHandleWrapper,
30
30
  dragHandle,
31
31
  } from '../sections/repeaterSections'
32
- import repeats from '../features/repeats'
33
32
  import { localize, defaultIcon } from '@formkit/inputs'
34
33
  import { $if } from '../compose'
35
34
  import { disablesChildren } from '@formkit/inputs'
35
+ import { repeats } from '../features/index'
36
36
 
37
37
  /**
38
38
  * Input definition for a repeater input.
package/slider/index.mjs CHANGED
@@ -1 +1 @@
1
- import{createSectionFactory as a,createBaseSections as e}from"../index.mjs";const l=a("sl"),{outer:t,wrapper:s,inner:$,icon:n,label:i,prefix:r,suffix:d,help:o,messages:u,message:c}=e(l),h=l("chart",(()=>({$el:"div",if:"$chart"}))),p=l("chartBar",(()=>({$el:"div",for:["bar","index","$chart"],attrs:{"data-active":{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:"$bar.at >= $_value.0 && $bar.at <= $_value.1",else:"$bar.at >= $_value.1 && $bar.at <= $_value.0"},else:"$bar.at <= $_value"},style:{left:'$bar.at / ($max - $min) * 100 + "%"',width:'$: "calc(" + (100 / $chart.length) + "% - 2px)"',height:{if:"$largestBar",then:'$bar.value / $largestBar * 100 + "%"'}}}}))),v=l("sliderInner",(()=>({$el:"div",attrs:{"data-has-mark-labels":"$markLabels && $marks.length > 0"}}))),m=l("track",(()=>({$el:"div",attrs:{id:"$: 'track-' + $id",onClick:"$handlers.clickTrack"}}))),f=l("trackWrapper",(()=>({$el:"div"}))),b=l("trackInner",(()=>({$el:"div"}))),k=l("fill",(()=>({$el:"div",attrs:{style:"$fillStyles"}}))),_=l("linkedValues",(()=>({$el:"div"}))),x=l("maxValue",(()=>({$formkit:"number",bind:"$computedMaxInputAttrs",ignore:!0,value:{if:"$isMulti",then:"$_value.1",else:"$_value"},tabindex:{if:"$disabled",then:-1},onNode:"$handlers.maxNode",onBlur:"$handlers.inputBlur"}))),M=l("minValue",(()=>({$formkit:"number",bind:"$computedMinInputAttrs",ignore:!0,value:{if:"$isMulti",then:"$_value.0",else:"$_value"},tabindex:{if:"$disabled",then:-1},onNode:"$handlers.minNode",onBlur:"$handlers.inputBlur"}))),g=l("marks",(()=>({$el:"div",if:"$marks"}))),y=l("mark",(()=>({$el:"span",for:["step","index","$marks"],attrs:{"data-active":{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:"$step.at >= $_value.0 && $step.at <= $_value.1",else:"$step.at >= $_value.1 && $step.at <= $_value.0"},else:"$step.at <= $_value"},class:{if:"$step.class",then:'$: $classes.mark + " " + $step.class',else:"$classes.mark"},style:{left:'$: $fns.calculateMarkPosition($step.at) + "%"'}}}))),I=l("markLabel",(()=>({$el:"span",if:"$markLabels",children:{if:"$step.label !== undefined",then:"$step.label",else:""},attrs:{class:'$: $classes.markLabel + " " + $step.labelClass'}}))),w=l("handles",(()=>({$el:"ul"}))),B=l("handleMax",(()=>({$el:"li",attrs:{"data-active":"$dragging","data-is-target":'$lastHandleInteraction === "max"',"data-handle":"max","data-show-tooltip":"$tooltip",class:"$: 'formkit-handle ' + $classes.handle + ' ' + $classes.handleMax",onFocus:"$handlers.focus",onClick:"$handlers.clickHandle",onMousedown:"$handlers.startDrag",onTouchstart:"$handlers.startDrag",style:"$maxHandleStyles",tabindex:{if:"$disabled",then:-1,else:0},onBlur:"$handlers.blur",onKeydown:"$handlers.keydown"}}))),F=l("handleMin",(()=>({$el:"li",if:"$isMulti",attrs:{"data-active":"$dragging","data-is-target":'$lastHandleInteraction === "min"',"data-handle":"min","data-show-tooltip":"$tooltip",class:"$: $classes.handle + ' ' + $classes.handleMin",onFocus:"$handlers.focus",onClick:"$handlers.clickHandle",onMousedown:"$handlers.startDrag",onTouchstart:"$handlers.startDrag",style:"$minHandleStyles",tabindex:{if:"$disabled",then:-1,else:0},onBlur:"$handlers.blur",onKeydown:"$handlers.keydown"}}))),H=l("handleMinInner",(()=>({$el:"div",attrs:{class:'$: $classes.handleInner + " " + $classes.handleMinInner'}}))),C=l("handleMaxInner",(()=>({$el:"div",attrs:{class:'$: $classes.handleInner + " " + $classes.handleMaxInner'}}))),D=l("tooltipMax",(()=>({$el:"div",if:'$tooltip === true || $tooltip === "auto"',children:{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:'$tooltipFormat($_value.1, "max")',else:'$tooltipFormat($_value.0, "max")'},else:'$tooltipFormat($_value, "max")'},attrs:{class:"$classes.tooltip + ' ' + $classes.tooltipMax"}}))),L=l("tooltipMin",(()=>({$el:"div",if:'$isMulti && ($tooltip === true || $tooltip === "auto")',children:{if:"$_value.0 < $_value.1",then:'$tooltipFormat($_value.0, "min")',else:'$tooltipFormat($_value.1, "min")'},attrs:{class:"$classes.tooltip + ' ' + $classes.tooltipMin"}})));export{h as chart,p as chartBar,l as createSection,k as fill,B as handleMax,C as handleMaxInner,F as handleMin,H as handleMinInner,w as handles,o as help,n as icon,$ as inner,i as label,_ as linkedValues,y as mark,I as markLabel,g as marks,x as maxValue,c as message,u as messages,M as minValue,t as outer,r as prefix,v as sliderInner,d as suffix,D as tooltipMax,L as tooltipMin,m as track,b as trackInner,f as trackWrapper,s as wrapper};
1
+ import{createSectionFactory as a,createBaseSections as e}from"../index.mjs";const l=a("sl"),{outer:t,wrapper:s,inner:$,icon:n,label:i,prefix:r,suffix:d,help:o,messages:u,message:c}=e(l),h=l("chart",(()=>({$el:"div",if:"$chart"}))),p=l("chartBar",(()=>({$el:"div",for:["bar","index","$chart"],attrs:{"data-active":{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:"$bar.at >= $_value.0 && $bar.at <= $_value.1",else:"$bar.at >= $_value.1 && $bar.at <= $_value.0"},else:"$bar.at <= $_value"},style:{left:'$bar.at / ($max - $min) * 100 + "%"',width:'$: "calc(" + (100 / $chart.length) + "% - 2px)"',height:{if:"$largestBar",then:'$bar.value / $largestBar * 100 + "%"'}}}}))),v=l("sliderInner",(()=>({$el:"div",attrs:{"data-has-mark-labels":"$markLabels && $marks.length > 0"}}))),m=l("track",(()=>({$el:"div",attrs:{id:"$: 'track-' + $id",onClick:"$handlers.clickTrack"}}))),f=l("trackWrapper",(()=>({$el:"div"}))),b=l("trackInner",(()=>({$el:"div"}))),k=l("fill",(()=>({$el:"div",attrs:{style:"$fillStyles"}}))),_=l("linkedValues",(()=>({$el:"div"}))),x=l("maxValue",(()=>({$formkit:"number",bind:"$computedMaxInputAttrs",ignore:!0,value:{if:"$isMulti",then:"$_value.1",else:"$_value"},tabindex:{if:"$disabled",then:-1},onNode:"$handlers.maxNode",onBlur:"$handlers.inputBlur"}))),M=l("minValue",(()=>({$formkit:"number",if:"$isMulti",bind:"$computedMinInputAttrs",ignore:!0,value:{if:"$isMulti",then:"$_value.0",else:"$_value"},tabindex:{if:"$disabled",then:-1},onNode:"$handlers.minNode",onBlur:"$handlers.inputBlur"}))),g=l("marks",(()=>({$el:"div",if:"$marks"}))),y=l("mark",(()=>({$el:"span",for:["step","index","$marks"],attrs:{"data-active":{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:"$step.at >= $_value.0 && $step.at <= $_value.1",else:"$step.at >= $_value.1 && $step.at <= $_value.0"},else:"$step.at <= $_value"},class:{if:"$step.class",then:'$: $classes.mark + " " + $step.class',else:"$classes.mark"},style:{left:'$: $fns.calculateMarkPosition($step.at) + "%"'}}}))),I=l("markLabel",(()=>({$el:"span",if:"$markLabels",children:{if:"$step.label !== undefined",then:"$step.label",else:""},attrs:{class:'$: $classes.markLabel + " " + $step.labelClass'}}))),w=l("handles",(()=>({$el:"ul"}))),B=l("handleMax",(()=>({$el:"li",attrs:{"data-active":"$dragging","data-is-target":'$lastHandleInteraction === "max"',"data-handle":"max","data-show-tooltip":"$tooltip",class:"$: 'formkit-handle ' + $classes.handle + ' ' + $classes.handleMax",onFocus:"$handlers.focus",onClick:"$handlers.clickHandle",onMousedown:"$handlers.startDrag",onTouchstart:"$handlers.startDrag",style:"$maxHandleStyles",tabindex:{if:"$disabled",then:-1,else:0},onBlur:"$handlers.blur",onKeydown:"$handlers.keydown"}}))),F=l("handleMin",(()=>({$el:"li",if:"$isMulti",attrs:{"data-active":"$dragging","data-is-target":'$lastHandleInteraction === "min"',"data-handle":"min","data-show-tooltip":"$tooltip",class:"$: $classes.handle + ' ' + $classes.handleMin",onFocus:"$handlers.focus",onClick:"$handlers.clickHandle",onMousedown:"$handlers.startDrag",onTouchstart:"$handlers.startDrag",style:"$minHandleStyles",tabindex:{if:"$disabled",then:-1,else:0},onBlur:"$handlers.blur",onKeydown:"$handlers.keydown"}}))),H=l("handleMinInner",(()=>({$el:"div",attrs:{class:'$: $classes.handleInner + " " + $classes.handleMinInner'}}))),C=l("handleMaxInner",(()=>({$el:"div",attrs:{class:'$: $classes.handleInner + " " + $classes.handleMaxInner'}}))),D=l("tooltipMax",(()=>({$el:"div",if:'$tooltip === true || $tooltip === "auto"',children:{if:"$isMulti",then:{if:"$_value.0 < $_value.1",then:'$tooltipFormat($_value.1, "max")',else:'$tooltipFormat($_value.0, "max")'},else:'$tooltipFormat($_value, "max")'},attrs:{class:"$classes.tooltip + ' ' + $classes.tooltipMax"}}))),L=l("tooltipMin",(()=>({$el:"div",if:'$isMulti && ($tooltip === true || $tooltip === "auto")',children:{if:"$_value.0 < $_value.1",then:'$tooltipFormat($_value.0, "min")',else:'$tooltipFormat($_value.1, "min")'},attrs:{class:"$classes.tooltip + ' ' + $classes.tooltipMin"}})));export{h as chart,p as chartBar,l as createSection,k as fill,B as handleMax,C as handleMaxInner,F as handleMin,H as handleMinInner,w as handles,o as help,n as icon,$ as inner,i as label,_ as linkedValues,y as mark,I as markLabel,g as marks,x as maxValue,c as message,u as messages,M as minValue,t as outer,r as prefix,v as sliderInner,d as suffix,D as tooltipMax,L as tooltipMin,m as track,b as trackInner,f as trackWrapper,s as wrapper};
package/slider/slider.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { FormKitProInput } from '@formkit/pro'
2
- import { default as sliderFeature } from '../features/slider'
3
2
  import {
4
3
  outer,
5
4
  wrapper,
@@ -32,6 +31,7 @@ import {
32
31
  chartBar,
33
32
  } from '../sections/sliderSections'
34
33
  import { $if } from '../compose'
34
+ import { sliderFeature } from '../features/index'
35
35
 
36
36
  /**
37
37
  * Input definition for a slider input.
@@ -22,11 +22,13 @@ import {
22
22
  tagLabel,
23
23
  } from '../sections/taglistSections'
24
24
  import { $if } from '../compose'
25
- import dropdownFamily from '../features/dropdown-family/index'
26
- import taglistProps from '../features/dropdown-family/taglist/props'
27
- import searchInput from '../features/dropdown-family/searchInput'
28
- import taglistFeatures from '../features/dropdown-family/taglist/index'
29
- import usePopover from '../features/popover'
25
+ import {
26
+ dropdownFamily,
27
+ taglistProps,
28
+ searchInput,
29
+ taglistFeatures,
30
+ usePopover,
31
+ } from '../features/index'
30
32
 
31
33
  /**
32
34
  * Input definition for a taglist input.
package/toggle/toggle.ts CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  innerLabel,
17
17
  valueLabel,
18
18
  } from '../sections/toggleSections'
19
- import toggles from '../features/toggles'
19
+ import { toggles } from '../features/index'
20
20
 
21
21
  /**
22
22
  * Input definition for a toggle input.
@@ -13,11 +13,12 @@ import {
13
13
  help,
14
14
  messages,
15
15
  message,
16
- prefix,
16
+ prefix,
17
17
  suffix,
18
18
  icon,
19
19
  } from '../sections/togglebuttonsSections'
20
- import togglebuttonsFeatures from '../features/togglebuttons'
20
+
21
+ import { togglebuttonsFeatures } from '../features/index'
21
22
 
22
23
  /**
23
24
  * Input definition for a toggle group input.
@@ -39,13 +40,13 @@ export const togglebuttons: FormKitProInput = {
39
40
  '$fns.isChecked($option) === true',
40
41
  buttonInput(
41
42
  '$slots.default || $slots.on || ' +
42
- '$option.onLabel || $option.label'
43
+ '$option.onLabel || $option.label'
43
44
  ),
44
45
  buttonInput(
45
46
  '$slots.default || $slots.off || ' +
46
- '$option.offLabel || $option.label'
47
+ '$option.offLabel || $option.label'
47
48
  )
48
- ),
49
+ )
49
50
  )
50
51
  )
51
52
  )
@@ -53,7 +54,7 @@ export const togglebuttons: FormKitProInput = {
53
54
  wrapper(
54
55
  $if(
55
56
  '$label && ($slots.default || $slots.on || $onLabel)',
56
- label('$label'),
57
+ label('$label')
57
58
  ),
58
59
  singleToggle(
59
60
  icon('prefix'),
@@ -61,18 +62,16 @@ export const togglebuttons: FormKitProInput = {
61
62
  $if(
62
63
  '$_isChecked === true',
63
64
  buttonInput(
64
- '$slots.default || $slots.on || '+
65
- '$onLabel || $label'
65
+ '$slots.default || $slots.on || ' + '$onLabel || $label'
66
66
  ),
67
67
  buttonInput(
68
- '$slots.default || $slots.off || '+
69
- '$offLabel || $label'
68
+ '$slots.default || $slots.off || ' + '$offLabel || $label'
70
69
  )
71
70
  ),
72
71
  suffix(),
73
- icon('suffix'),
74
- ),
75
- ),
72
+ icon('suffix')
73
+ )
74
+ )
76
75
  ),
77
76
  help('$help'),
78
77
  messages(message('$message.value'))
@@ -87,9 +86,7 @@ export const togglebuttons: FormKitProInput = {
87
86
  /**
88
87
  * An array of extra props to accept for this input.
89
88
  */
90
- props: [
91
- 'options'
92
- ],
89
+ props: ['options'],
93
90
 
94
91
  /**
95
92
  * Additional features that make this input work.
@@ -38,10 +38,11 @@ import {
38
38
  targetEmptyMessage,
39
39
  emptyMessageInner,
40
40
  } from '../sections/transferListSections'
41
- import { default as transferListFeature } from '../features/transferlist/index'
42
41
  import { options, defaultIcon, localize } from '@formkit/inputs'
43
42
  import { $if } from '../compose'
44
43
 
44
+ import { transferListFeature } from '../features/index'
45
+
45
46
  /**
46
47
  * Input definition for a transferlist input.
47
48
  * @public