@formkit/pro 0.122.6-9cf4a5d → 0.122.7
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 +1 -137
- package/index.mjs +1 -1
- package/mask/index.mjs +1 -1
- package/package.json +1 -1
- package/slider/index.mjs +1 -1
- package/unit/index.mjs +0 -1
- package/unit/unit.ts +0 -58
package/mask/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSectionFactory as e,createBaseSections as r,createMaskOverlaySections as a}from"../index.mjs";const l=e("mk"),{outer:o,wrapper:s,inner:
|
|
1
|
+
import{createSectionFactory as e,createBaseSections as r,createMaskOverlaySections as a}from"../index.mjs";const l=e("mk"),{outer:o,wrapper:s,inner:i,label:n,prefix:d,suffix:t,help:p,messages:y,message:m,icon:u}=r(l),{overlayPlaceholder:$,overlayLiteral:b,overlayChar:v,overlayEnum:c,overlay:f,overlayParts:h,overlayInner:x}=a(l),g=l("input",(()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onBlur:"$handlers.blur",value:"$_maskValue",id:"$id","aria-describedby":"$describedBy"}})));export{l as createSection,p as help,u as icon,i as inner,n as label,g as maskInput,m as message,y as messages,o as outer,f as overlay,v as overlayChar,c as overlayEnum,x as overlayInner,b as overlayLiteral,h as overlayParts,$ as overlayPlaceholder,d as prefix,t as suffix,s as wrapper};
|
package/package.json
CHANGED
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/unit/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createSectionFactory as a,createBaseSections as e}from"../index.mjs";const n=a("tb"),{outer:l,inner:d,wrapper:o,label:t,prefix:r,suffix:i,help:u,messages:s,message:$,icon:c}=e(n),p=n("input",(()=>({$el:"input",bind:"$attrs",attrs:{name:"$node.name",type:"tel",autocomplete:"off",id:"$id",onClick:"$handlers.handleClick",onChange:"$handlers.handleInput",onInput:"$handlers.handleInput",onKeydown:"$handlers.handleKeyDown",onBeforeinput:"$handlers.handleBeforeInput",onBlur:"$handlers.handleBlur",onFocus:"$handlers.handleFocus",readonly:"$readonly",disabled:"$disabled",value:"$_displayValue","data-unit":"$unit","data-currency":"$currency","data-display-locale":"$displayLocale","data-value-locale":"$valueLocale","data-decimals":"$decimals","data-trailing":"$trailingZeros","data-numeric-value":"$_numericValue","data-align":"$_valueAlignAuto"}})));export{n as createSection,u as help,c as icon,d as inner,p as input,t as label,$ as message,s as messages,l as outer,r as prefix,i as suffix,o as wrapper};
|
package/unit/unit.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { FormKitProInput } from '@formkit/pro'
|
|
2
|
-
import { options as optionsCore } from '@formkit/inputs'
|
|
3
|
-
import {
|
|
4
|
-
outer,
|
|
5
|
-
inner,
|
|
6
|
-
input,
|
|
7
|
-
wrapper,
|
|
8
|
-
label,
|
|
9
|
-
help,
|
|
10
|
-
messages,
|
|
11
|
-
message,
|
|
12
|
-
prefix,
|
|
13
|
-
suffix,
|
|
14
|
-
icon,
|
|
15
|
-
} from '../sections/unitSections'
|
|
16
|
-
import unitFeatures from '../features/unit'
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Input definition for a toggle group input.
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export const unit: FormKitProInput = {
|
|
23
|
-
/**
|
|
24
|
-
* The actual schema of the input, or a function that returns the schema.
|
|
25
|
-
*/
|
|
26
|
-
schema: outer(
|
|
27
|
-
wrapper(
|
|
28
|
-
label('$label'),
|
|
29
|
-
inner(
|
|
30
|
-
icon('prefix'),
|
|
31
|
-
prefix(),
|
|
32
|
-
input(),
|
|
33
|
-
suffix(),
|
|
34
|
-
icon('suffix')
|
|
35
|
-
)
|
|
36
|
-
),
|
|
37
|
-
help('$help'),
|
|
38
|
-
messages(message('$message.value'))
|
|
39
|
-
),
|
|
40
|
-
/**
|
|
41
|
-
* The type of node, can be a list, group, or input.
|
|
42
|
-
*/
|
|
43
|
-
type: 'input',
|
|
44
|
-
|
|
45
|
-
family: 'text',
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* An array of extra props to accept for this input.
|
|
49
|
-
*/
|
|
50
|
-
props: [
|
|
51
|
-
'options'
|
|
52
|
-
],
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Additional features that make this input work.
|
|
56
|
-
*/
|
|
57
|
-
features: [unitFeatures, optionsCore],
|
|
58
|
-
}
|