@formkit/pro 1.0.0-alpha.90 → 1.0.0-alpha.90-98f8f67

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/index.mjs CHANGED
@@ -1 +1 @@
1
- import{createSectionFactory as e,createBaseSections as a}from"../index.mjs";const r=e("mk"),{outer:s,wrapper:i,inner:d,label:n,prefix:t,suffix:l,help:p,messages:o,message:m,icon:$}=a(r),b=r("input",(()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onBlur:"$handlers.blur",value:"$_maskValue",id:"$id","aria-describedby":"$describedBy"}})));export{r as createSection,p as help,$ as icon,d as inner,n as label,b as maskInput,m as message,o as messages,s as outer,t as prefix,l as suffix,i as wrapper};
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/mask/mask.ts CHANGED
@@ -11,8 +11,16 @@ import {
11
11
  message,
12
12
  icon,
13
13
  maskInput,
14
+ overlay,
15
+ overlayLiteral,
16
+ overlayChar,
17
+ overlayEnum,
18
+ overlayParts,
19
+ overlayPlaceholder,
20
+ overlayInner,
14
21
  } from '../sections/maskSections'
15
22
  import useMask from '../features/mask'
23
+ import maskOverlay from '../features/maskOverlay'
16
24
 
17
25
  /**
18
26
  * Input definition for a mask input.
@@ -25,10 +33,27 @@ export const mask: FormKitProInput = {
25
33
  schema: outer(
26
34
  wrapper(
27
35
  label('$label'),
28
- inner(icon('prefix'), prefix(), maskInput(), suffix(), icon('suffix'))
36
+ inner(
37
+ icon('prefix'),
38
+ prefix(),
39
+ overlay(
40
+ overlayInner(
41
+ overlayParts(
42
+ overlayPlaceholder('$part.value'),
43
+ overlayLiteral('$part.value'),
44
+ overlayChar('$part.value'),
45
+ overlayEnum('$part.value')
46
+ )
47
+ )
48
+ ),
49
+ maskInput(),
50
+ suffix(),
51
+ icon('suffix')
52
+ )
29
53
  ),
30
54
  help('$help'),
31
- messages(message('$message.value'))
55
+ messages(message('$message.value')),
56
+ '$_overlayStyles'
32
57
  ),
33
58
  /**
34
59
  * The type of node, can be a list, group, or input.
@@ -47,6 +72,7 @@ export const mask: FormKitProInput = {
47
72
  'prefix',
48
73
  'suffix',
49
74
  'reverse',
75
+ 'overlay',
50
76
  ],
51
77
 
52
78
  /**
@@ -57,5 +83,5 @@ export const mask: FormKitProInput = {
57
83
  /**
58
84
  * Additional features that make this input work.
59
85
  */
60
- features: [useMask],
86
+ features: [maskOverlay, useMask],
61
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formkit/pro",
3
- "version": "1.0.0-alpha.90",
3
+ "version": "1.0.0-alpha.90-98f8f67",
4
4
  "description": "FormKit Pro — Form inputs and tools for high quality forms.",
5
5
  "main": "index.cjs",
6
6
  "module": "index.mjs",
@@ -37,7 +37,7 @@
37
37
  "vue"
38
38
  ],
39
39
  "dependencies": {
40
- "@formkit/inputs": "latest"
40
+ "@formkit/inputs": "^1.0.0-beta.15"
41
41
  },
42
42
  "type": "module"
43
43
  }
package/rating/index.mjs CHANGED
@@ -1 +1 @@
1
- import{createSectionFactory as e,createBaseSections as t,$if as o}from"../index.mjs";const r=e("rt"),{outer:i,wrapper:l,inner:s,label:a,prefix:n,suffix:d,help:$,messages:p,message:f,icon:h}=t(r),m=r("input",(()=>({$el:"input",attrs:{id:"$id",type:"range",max:"$max",name:"$name",min:"0",disabled:"$disabled",step:"$step",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",style:{position:"absolute",zIndex:"0",top:0,right:0,bottom:0,opacity:"0"}}}))),v=r("itemsWrapper",(()=>({$el:"div",attrs:{style:{position:"relative",zIndex:"2"},id:"$id + _items_wrapper",onMousemove:"$hoverHighlight && $handlers.ratingHoverOver",onMouseleave:"$hoverHighlight && $handlers.ratingHoverOut",onTouchstart:"$handlers.ratingHoverOver",onTouchmove:"$handlers.ratingHoverOver",onTouchend:"$handlers.handleClick",onClick:"$handlers.handleClick"}}))),u=r("onItems",(()=>({$el:"div",attrs:{id:'$id + "_on_wrapper"',style:{position:"relative",display:"flex",width:'$onWidth + "%"',top:"0",bottom:"0",left:"0",overflow:"hidden",color:"$onColor"}}}))),x=r("offItems",(()=>({$el:"div",attrs:{id:'$id + "_off_wrapper"',style:{position:"absolute",display:"flex",flexDirection:"row-reverse",width:'$offWidth + "%"',top:"0",bottom:"0",right:"0",overflow:"hidden",color:"$offColor"}}}))),g=r("onItemWrapper",(()=>({$el:"div",for:["item","index","$max"],attrs:{style:{flex:"$wrapperWidth"}}}))),c=r("offItemWrapper",(()=>({$el:"div",for:["item","index","$max"],attrs:{style:{flex:"$wrapperWidth"}}}))),I=()=>g(o("$slots.onItem",(()=>()=>"$slots.onItem"),o("$slots.default",(()=>()=>"$slots.default"),h("rating")))),w=()=>c(o("$slots.offItem",(()=>()=>"$slots.offItem"),o("$slots.default",(()=>()=>"$slots.default"),h("rating"))));export{r as createSection,$ as help,h as icon,s as inner,m as input,v as itemsWrapper,a as label,f as message,p as messages,w as offItem,x as offItems,I as onItem,u as onItems,i as outer,n as prefix,d as suffix,l as wrapper};
1
+ import{createSectionFactory as e,createBaseSections as t,$if as o}from"../index.mjs";const r=e("rt"),{outer:i,wrapper:l,inner:s,label:a,prefix:n,suffix:d,help:$,messages:p,message:f,icon:h}=t(r),m=r("input",(()=>({$el:"input",bind:"$attrs",attrs:{id:"$id",type:"range",max:"$max",name:"$name",min:"0",disabled:"$disabled",step:"$step",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",style:{position:"absolute",zIndex:"0",top:0,right:0,bottom:0,opacity:"0"}}}))),v=r("itemsWrapper",(()=>({$el:"div",attrs:{style:{position:"relative",zIndex:"2"},id:"$id + _items_wrapper",onMousemove:"$hoverHighlight && $handlers.ratingHoverOver",onMouseleave:"$hoverHighlight && $handlers.ratingHoverOut",onTouchstart:"$handlers.ratingHoverOver",onTouchmove:"$handlers.ratingHoverOver",onTouchend:"$handlers.handleClick",onClick:"$handlers.handleClick"}}))),u=r("onItems",(()=>({$el:"div",attrs:{id:'$id + "_on_wrapper"',style:{position:"relative",display:"flex",width:'$onWidth + "%"',top:"0",bottom:"0",left:"0",overflow:"hidden",color:"$onColor"}}}))),x=r("offItems",(()=>({$el:"div",attrs:{id:'$id + "_off_wrapper"',style:{position:"absolute",display:"flex",flexDirection:"row-reverse",width:'$offWidth + "%"',top:"0",bottom:"0",right:"0",overflow:"hidden",color:"$offColor"}}}))),g=r("onItemWrapper",(()=>({$el:"div",for:["item","index","$max"],attrs:{style:{flex:"$wrapperWidth"}}}))),c=r("offItemWrapper",(()=>({$el:"div",for:["item","index","$max"],attrs:{style:{flex:"$wrapperWidth"}}}))),I=()=>g(o("$slots.onItem",(()=>()=>"$slots.onItem"),o("$slots.default",(()=>()=>"$slots.default"),h("rating")))),w=()=>c(o("$slots.offItem",(()=>()=>"$slots.offItem"),o("$slots.default",(()=>()=>"$slots.default"),h("rating"))));export{r as createSection,$ as help,h as icon,s as inner,m as input,v as itemsWrapper,a as label,f as message,p as messages,w as offItem,x as offItems,I as onItem,u as onItems,i as outer,n as prefix,d as suffix,l as wrapper};