Skip to content

Commit d7d3ac3

Browse files
committed
docs(VOtpInput): add API documentation for new props and sub-components
1 parent 526d6c9 commit d7d3ac3

6 files changed

Lines changed: 29 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"props": {
3+
"index": "The index of the OTP character this field represents."
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"props": {
3+
"merged": "Merges the fields within this group into a single visual block with shared elevation and border radius. Inherits from the root VOtpInput `merged` prop when not set."
4+
}
5+
}

packages/api-generator/src/locale/en/VOtpInput.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@
44
"divider": "Specifies the dividing character between items.",
55
"focusAll": "Puts all inputs into a focus state when any are focused",
66
"length": "The OTP field's length.",
7+
"merged": "Renders all fields in a single merged group with shared elevation and border radius.",
8+
"pattern": "Restricts input to characters matching the given pattern. Accepts `’numeric’`, `’alpha’`, `’alphanumeric’`, or a custom `RegExp`. Defaults to `’numeric’` when `type=\"number\"`.",
79
"placeholder": "Sets the input’s placeholder text.",
810
"masked": "Hides the entered characters with bullets, similar to a password input, but makes it possible to also restrict characters to digits with `type=\"number\"`.",
911
"type": "Supported types: `text`, `password`, `number`."
1012
},
1113
"events": {
1214
"finish": "Emitted when the input is filled completely and cursor is blurred."
1315
},
16+
"slots": {
17+
"divider": "Slot for custom divider content between fields. Receives `{ index }` with the divider position."
18+
},
1419
"exposed": {
15-
"reset": "Reset's the input model to an empty array"
20+
"reset": "Resets the input model to an empty string."
1621
}
17-
}
22+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"props": {
3+
"tag": "Specify a custom tag used on the root element."
4+
}
5+
}

packages/docs/src/data/new-in.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,12 @@
268268
"VOtpInput": {
269269
"props": {
270270
"density": "3.12.0",
271-
"masked": "3.12.0"
271+
"masked": "3.12.0",
272+
"merged": "4.1.0",
273+
"pattern": "4.1.0"
274+
},
275+
"slots": {
276+
"divider": "4.1.0"
272277
}
273278
},
274279
"VOverlay": {

packages/docs/src/data/page-to-api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"components/navigation-drawers": ["VNavigationDrawer"],
124124
"components/no-ssr": ["VNoSsr"],
125125
"components/number-inputs": ["VNumberInput"],
126-
"components/otp-input": ["VOtpInput"],
126+
"components/otp-input": ["VOtpInput", "VOtpField", "VOtpGroup", "VOtpSeparator"],
127127
"components/overflow-btns": ["VOverflowBtn"],
128128
"components/overlays": ["VOverlay"],
129129
"components/paginations": ["VPagination"],

0 commit comments

Comments
 (0)