Skip to content

Commit

Permalink
feat(input): add number prop for vmodel casting (#884)
Browse files Browse the repository at this point in the history
* feat(input): udpate generic types

* docs: update input example

* docs: update component docs

* feat(input): udpate generic input
  • Loading branch information
mlmoravek authored Jun 12, 2024
1 parent 5f8d324 commit ded99f9
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 181 deletions.
6 changes: 3 additions & 3 deletions packages/docs/components/Autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ title: Autocomplete
| teleport | Append the component to another part of the DOM.<br/>Set `true` to append the component to the body.<br/>In addition, any CSS selector string or an actual DOM node can be used. | boolean\|string\|object | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>autocomplete: {<br>&nbsp;&nbsp;teleport: false<br>}</code> |
| type | Input type | string | - | <code style='white-space: nowrap; padding: 0;'>"text"</code> |
| useHtml5Validation | Enable html 5 native validation | boolean | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>{<br>&nbsp;&nbsp;useHtml5Validation: true<br>}</code> |
| v-model | | string\|number | - | |
| v-model | The input value | string | - | |
| validationMessage | The message which is shown when a validation error occurs | string | - | |

### Events

| Event name | Properties | Description |
| ----------------- | ------------------------------------------------------- | ---------------------------------------------- |
| icon-click | **event** `Event` - native event | on icon click event |
| update:modelValue | **value** `string \| number` - updated modelValue prop | modelValue prop two-way binding |
| input | **value** `string \| number` - input value | on input change event |
| update:modelValue | **value** `string` - updated modelValue prop | modelValue prop two-way binding |
| input | **value** `string` - input value | on input change event |
| select | **value** `string \| number \| object` - selected value | selected element changed event |
| select-header | **event** `Event` - native event | header is selected |
| select-footer | **event** `Event` - native event | footer is selected |
Expand Down
25 changes: 12 additions & 13 deletions packages/docs/components/Icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ title: Icon

### Props

| Prop name | Description | Type | Values | Default |
| ----------- | ------------------------------------------------------------------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| clickable | When true makes icon clickable | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| component | Icon component name | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>{<br>&nbsp;&nbsp;iconComponent: undefined<br>}</code> |
| customClass | Add class to icon font.<br/>See icon library documentation for custom classes. | string | - | |
| customSize | Overrides icon font size | string | `Depends on library: null (smallest)`, `fa-sm`, `fa-lg`, `fa-xl`, `mdi-18px`, `mdi-24px`, `mdi-36px`, `mdi-48px` | |
| icon | Icon name | string | - | |
| override | Override existing theme classes completely | boolean | - | |
| pack | Icon pack to use | string | `mdi`, `fa`, `fas and any other custom icon pack` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>{<br>&nbsp;&nbsp;iconPack: "mdi"<br>}</code> |
| rotation | Rotation 0-360 | number\|string | - | |
| size | Icon size | string | `small`, `medium`, `large` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>icon: {<br>&nbsp;&nbsp;size: undefined<br>}</code> |
| spin | Enable spin effect on icon | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| variant | Color of the icon | string | `primary`, `info`, `success`, `warning`, `danger`, `and any other custom color` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>icon: {<br>&nbsp;&nbsp;variant: undefined<br>}</code> |
| Prop name | Description | Type | Values | Default |
| ---------- | ------------------------------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| clickable | When true makes icon clickable | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| component | Icon component name | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>{<br>&nbsp;&nbsp;iconComponent: undefined<br>}</code> |
| customSize | Overrides icon font size | string | `Depends on library: null (smallest)`, `fa-sm`, `fa-lg`, `fa-xl`, `mdi-18px`, `mdi-24px`, `mdi-36px`, `mdi-48px` | |
| icon | Icon name | string | - | |
| override | Override existing theme classes completely | boolean | - | |
| pack | Icon pack to use | string | `mdi`, `fa`, `fas and any other custom icon pack` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>{<br>&nbsp;&nbsp;iconPack: "mdi"<br>}</code> |
| rotation | Rotation 0-360 | number\|string | - | |
| size | Icon size | string | `small`, `medium`, `large` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>icon: {<br>&nbsp;&nbsp;size: undefined<br>}</code> |
| spin | Enable spin effect on icon | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| variant | Color of the icon | string | `primary`, `info`, `success`, `warning`, `danger`, `and any other custom color` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>icon: {<br>&nbsp;&nbsp;variant: undefined<br>}</code> |

</div>

Expand Down
Loading

0 comments on commit ded99f9

Please sign in to comment.