@formkit/pro 0.123.4 → 0.123.6-e6b9b3a
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/currency/currency.ts +51 -0
- package/currency/index.mjs +1 -0
- package/dropdown/dropdown.ts +1 -1
- package/index.cjs +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/taglist/taglist.ts +1 -1
- package/unit/index.mjs +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FormKitProInput } from '@formkit/pro'
|
|
2
|
+
import { options as optionsCore } from '@formkit/inputs'
|
|
3
|
+
// import { $if } from '../compose'
|
|
4
|
+
import {
|
|
5
|
+
outer,
|
|
6
|
+
inner,
|
|
7
|
+
input,
|
|
8
|
+
wrapper,
|
|
9
|
+
label,
|
|
10
|
+
help,
|
|
11
|
+
messages,
|
|
12
|
+
message,
|
|
13
|
+
prefix,
|
|
14
|
+
suffix,
|
|
15
|
+
icon,
|
|
16
|
+
} from '../sections/currencySections'
|
|
17
|
+
import currencyFeatures from '../features/currency'
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Input definition for a toggle group input.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export const currency: FormKitProInput = {
|
|
24
|
+
/**
|
|
25
|
+
* The actual schema of the input, or a function that returns the schema.
|
|
26
|
+
*/
|
|
27
|
+
schema: outer(
|
|
28
|
+
wrapper(
|
|
29
|
+
label('$label'),
|
|
30
|
+
inner(icon('prefix'), prefix(), input(), suffix(), icon('suffix'))
|
|
31
|
+
),
|
|
32
|
+
help('$help'),
|
|
33
|
+
messages(message('$message.value'))
|
|
34
|
+
),
|
|
35
|
+
/**
|
|
36
|
+
* The type of node, can be a list, group, or input.
|
|
37
|
+
*/
|
|
38
|
+
type: 'input',
|
|
39
|
+
|
|
40
|
+
family: 'text',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An array of extra props to accept for this input.
|
|
44
|
+
*/
|
|
45
|
+
props: ['options'],
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Additional features that make this input work.
|
|
49
|
+
*/
|
|
50
|
+
features: [currencyFeatures, optionsCore],
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSectionFactory as e,createBaseSections as a}from"../index.mjs";const n=e("cr"),{outer:l,inner:t,wrapper:d,label:o,prefix:r,suffix:i,help:u,messages:s,message:p,icon:$}=a(n),c=n("input",(()=>({$el:"input",bind:"$attrs",attrs:{name:"$node.name",type:"tel",autocomplete:"$attrs.autocomplete || off",id:"$id",onChange:"$handlers.handleInput",onInput:"$handlers.handleInput",onKeydown:"$handlers.handleKeyDown",onBeforeinput:"$handlers.handleBeforeInput",readonly:"$readonly",disabled:"$disabled","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,$ as icon,t as inner,c as input,o as label,p as message,s as messages,l as outer,r as prefix,i as suffix,d as wrapper};
|
package/dropdown/dropdown.ts
CHANGED
|
@@ -85,7 +85,7 @@ export const dropdown: FormKitProInput = {
|
|
|
85
85
|
tagWrapper(
|
|
86
86
|
tag(
|
|
87
87
|
$if(
|
|
88
|
-
'$state.loading && $optionLoaderValues.includes($option.value)',
|
|
88
|
+
'$state.loading && $optionLoaderValues.includes($option.value) || $option.label === undefined',
|
|
89
89
|
tagLoading('$ui.isLoading.value'),
|
|
90
90
|
tagLabel('$option.label')
|
|
91
91
|
),
|