Skip to content

Commit 826bd40

Browse files
committed
refactor: standardize example imports and update currency/unit docs
- Update example imports to use @content/_examples/_data/ path instead of relative imports for countries.js and citiesByState.js - Refresh currency.md and unit.md documentation
1 parent ac34164 commit 826bd40

12 files changed

+210
-209
lines changed

3.inputs/currency.md

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ navigation:
1414

1515
The `currency` input allows for restricted input of values based on the provided currency and locale.
1616

17-
## ::Example
18-
17+
::Example
18+
---
1919
name: "Currency input defaults"
20-
file: "\_examples/currency/currency-default.vue"
21-
20+
file: "_examples/currency/currency-default.vue"
2221
---
23-
2422
::
2523

2624
## Props
@@ -33,13 +31,11 @@ The `currency` prop is the three letter currency code and sets the proper format
3331

3432
By default, the locale used will be that of what is set in your `formkit.config.ts`. This can be overriden with the `display-locale` prop. For example, `en`, `de`, `en-IN`, `zh-CN`, etc, etc.
3533

36-
## ::Example
37-
34+
::Example
35+
---
3836
name: "Currency and Locale settings"
39-
file: "\_examples/currency/currency-simple-locale.vue"
40-
37+
file: "_examples/currency/currency-simple-locale.vue"
4138
---
42-
4339
::
4440

4541
## Currency Additional Props
@@ -58,73 +54,69 @@ Setting the props `min` or `max` will prevent entry of a higher or lower value.
5854

5955
Values can be incremented and decremented by use of the up/down keys. The degree by which the value changes is determined by the `step` prop.
6056

61-
## ::Example
62-
57+
::Example
58+
---
6359
name: "Currency Prop Exploration"
64-
file: "\_examples/currency/currency-props-explore.vue"
65-
60+
file: "_examples/currency/currency-props-explore.vue"
6661
---
67-
6862
::
6963

7064
## Props & Attributes
7165

72-
## ::ReferenceTable
73-
66+
::ReferenceTable
67+
---
7468
input: "currency"
7569
data: [
76-
{
77-
prop: "currency",
78-
type: "string",
79-
default: "USD",
80-
description: "Set the specified currency to use for this input"
81-
},
82-
{
83-
prop: "displayLocale",
84-
type: "string",
85-
default: "en-US",
86-
description: "Set the desired display locale to use for this input"
87-
},
88-
{
89-
prop: "decimals",
90-
type: "boolean|number",
91-
default: "null",
92-
description: "Choose to either completely disallow decimals or override the maximum number of decimals for the input"
93-
},
94-
{
95-
prop: "minDecimals",
96-
type: "number",
97-
default: "null",
98-
description: "Choose to show a minimum number of decimals should your input require this"
99-
},
100-
{
101-
prop: "min",
102-
type: "number",
103-
default: "null",
104-
description: "Minimum numeric value allowed. If zero or above, negatives will not be allowed"
105-
},
106-
{
107-
prop: "max",
108-
type: "number",
109-
default: "null",
110-
description: "Maximum numeric value allowed for this input"
111-
},
112-
{
113-
prop: "step",
114-
type: "number",
115-
default: "1",
116-
description: "When using the up/down keys, how much to modify the current value."
117-
},
118-
{
119-
prop: "valueFormat",
120-
type: "string",
121-
default: "number",
122-
description: "Choose between <code>number</code> and <code>string</code> whether you want a numeric value or a parsed string value"
123-
},
70+
{
71+
prop: "currency",
72+
type: "string",
73+
default: "USD",
74+
description: "Set the specified currency to use for this input"
75+
},
76+
{
77+
prop: "displayLocale",
78+
type: "string",
79+
default: "en-US",
80+
description: "Set the desired display locale to use for this input"
81+
},
82+
{
83+
prop: "decimals",
84+
type: "boolean|number",
85+
default: "null",
86+
description: "Choose to either completely disallow decimals or override the maximum number of decimals for the input"
87+
},
88+
{
89+
prop: "minDecimals",
90+
type: "number",
91+
default: "null",
92+
description: "Choose to show a minimum number of decimals should your input require this"
93+
},
94+
{
95+
prop: "min",
96+
type: "number",
97+
default: "null",
98+
description: "Minimum numeric value allowed. If zero or above, negatives will not be allowed"
99+
},
100+
{
101+
prop: "max",
102+
type: "number",
103+
default: "null",
104+
description: "Maximum numeric value allowed for this input"
105+
},
106+
{
107+
prop: "step",
108+
type: "number",
109+
default: "1",
110+
description: "When using the up/down keys, how much to modify the current value."
111+
},
112+
{
113+
prop: "valueFormat",
114+
type: "string",
115+
default: "number",
116+
description: "Choose between <code>number</code> and <code>string</code> whether you want a numeric value or a parsed string value"
117+
},
124118
]
125-
126119
---
127-
128120
::
129121

130122
## Sections
@@ -135,18 +127,26 @@ description: "Choose between <code>number</code> and <code>string</code> whether
135127

136128
:FormKitInputDiagrams
137129

138-
### Keyboard Interactions
130+
## Accessibility
131+
132+
All FormKit inputs are designed with the following accessibility considerations in mind. Help us continually improve accessibility for all by filing accessibility issues [here](https://github.com/formkit/formkit/issues/new?assignees=&labels=%F0%9F%90%9B+bug-report%2C%E2%9B%91+Needs+triage&projects=&template=bug-report.yml):
133+
134+
:AccessibilityChecks
139135

140-
## ::KeyboardEventsTable
136+
### Accessibility attributes
141137

138+
:AccessibilityTable
139+
140+
### Keyboard Interactions
141+
142+
::KeyboardEventsTable
143+
---
142144
data: [
143-
{
144-
event: ["up", "down"],
145-
separator: '',
146-
description: "Increments through input value by current step amount.",
147-
},
145+
{
146+
event: ["up", "down"],
147+
separator: '',
148+
description: "Increments through input value by current step amount.",
149+
},
148150
]
149-
150151
---
151-
152152
::

0 commit comments

Comments
 (0)