@formkit/pro 0.122.2 → 0.122.3-3e34f5b

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 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};
1
+ import{createSectionFactory as e,createBaseSections as r,createMaskOverlaySections as a}from"../index.mjs";const l=e("mk"),{outer:o,wrapper:s,inner:d,label:i,prefix:n,suffix:t,help:p,messages:y,message:m,icon:$}=r(l),{overlayPlaceholder:u,overlayLiteral:b,overlayChar:c,overlayEnum:v,overlay:h,overlayParts:f,overlayInner:x}=a(l),g=l("input",(()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onBlur:"$handlers.blur",value:"$_maskValue",placeholder:"$placeholder",id:"$id","aria-describedby":"$describedBy"}})));export{l as createSection,p as help,$ as icon,d as inner,i as label,g as maskInput,m as message,y as messages,o as outer,h as overlay,c as overlayChar,v as overlayEnum,x as overlayInner,b as overlayLiteral,f as overlayParts,u as overlayPlaceholder,n as prefix,t as suffix,s as wrapper};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formkit/pro",
3
- "version": "0.122.2",
3
+ "version": "0.122.3-3e34f5b",
4
4
  "description": "FormKit Pro — Form inputs and tools for high quality forms.",
5
5
  "main": "index.cjs",
6
6
  "module": "index.mjs",
package/unit/index.mjs ADDED
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1,58 @@
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
+ }