mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
supersead PR #1260
This commit is contained in:
parent
2f406f0328
commit
451de06dd0
4 changed files with 70 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Component Index
|
# Component Index
|
||||||
|
|
||||||
> 165 components exported from carbon-components-svelte@0.63.1.
|
> 167 components exported from carbon-components-svelte@0.63.1.
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|
||||||
|
@ -289,10 +289,11 @@ export interface AutoCompleteItem {
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :------------ | :--------------- | :------- | :---------------------------------------------- | ----------------------------------------------------- | --------------------------------------------- |
|
| :-------------- | :--------------- | :------- | :---------------------------------------------- | ----------------------------------------------------- | --------------------------------------------- |
|
||||||
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
|
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
|
||||||
| inline | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to use the inline variant |
|
| inline | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to use the inline variant |
|
||||||
| open | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the dropdown |
|
| open | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the dropdown |
|
||||||
|
| selectedItem | <code>let</code> | Yes | <code>AutoCompleteItem</code> | <code>undefined</code> | Specify the selected item |
|
||||||
| selectedId | <code>let</code> | Yes | <code>AutoCompleteItemId</code> | <code>undefined</code> | Specify the selected item id |
|
| selectedId | <code>let</code> | Yes | <code>AutoCompleteItemId</code> | <code>undefined</code> | Specify the selected item id |
|
||||||
| filteredItems | <code>let</code> | Yes | <code>[]</code> | <code>[]</code> | -- |
|
| filteredItems | <code>let</code> | Yes | <code>[]</code> | <code>[]</code> | -- |
|
||||||
| items | <code>let</code> | No | <code>AutoCompleteItem[]</code> | <code>[]</code> | Set the dropdown items |
|
| items | <code>let</code> | No | <code>AutoCompleteItem[]</code> | <code>[]</code> | Set the dropdown items |
|
||||||
|
@ -309,6 +310,7 @@ export interface AutoCompleteItem {
|
||||||
| warnText | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the warning state text |
|
| warnText | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the warning state text |
|
||||||
| helperText | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the helper text |
|
| helperText | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the helper text |
|
||||||
| hideLabel | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to visually hide the label text |
|
| hideLabel | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to visually hide the label text |
|
||||||
|
| translateWithId | <code>let</code> | No | <code>(id: any) => string</code> | <code>undefined</code> | Override the default translation ids |
|
||||||
| id | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the list box component |
|
| id | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the list box component |
|
||||||
| name | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify a name attribute for the list box |
|
| name | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify a name attribute for the list box |
|
||||||
| placeholder | <code>let</code> | No | -- | <code>null</code> | Specify the placeholder text |
|
| placeholder | <code>let</code> | No | -- | <code>null</code> | Specify the placeholder text |
|
||||||
|
|
|
@ -246,6 +246,16 @@
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": false
|
"reactive": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "filteredItems",
|
||||||
|
"kind": "let",
|
||||||
|
"type": "[]",
|
||||||
|
"value": "[]",
|
||||||
|
"isFunction": false,
|
||||||
|
"isFunctionDeclaration": false,
|
||||||
|
"constant": false,
|
||||||
|
"reactive": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "itemToString",
|
"name": "itemToString",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
|
@ -364,16 +374,6 @@
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": false
|
"reactive": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "translateWithId",
|
|
||||||
"kind": "let",
|
|
||||||
"description": "Override the default translation ids",
|
|
||||||
"type": "(id: any) => string",
|
|
||||||
"isFunction": false,
|
|
||||||
"isFunctionDeclaration": false,
|
|
||||||
"constant": false,
|
|
||||||
"reactive": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "invalid",
|
"name": "invalid",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
|
@ -440,6 +440,16 @@
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": false
|
"reactive": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "translateWithId",
|
||||||
|
"kind": "let",
|
||||||
|
"description": "Override the default translation ids",
|
||||||
|
"type": "(id: any) => string",
|
||||||
|
"isFunction": false,
|
||||||
|
"isFunctionDeclaration": false,
|
||||||
|
"constant": false,
|
||||||
|
"reactive": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { Button, truncate, breakpoints } from "carbon-components-svelte";
|
import { Button, truncate, breakpoints } from "carbon-components-svelte";
|
||||||
import { Airplane } from "carbon-pictograms-svelte";
|
import { Airplane } from "carbon-pictograms-svelte";
|
||||||
|
|
||||||
import { AutoComplete } from "carbon-components-svelte";
|
import { AutoComplete } from "carbon-components-svelte";
|
||||||
|
|
||||||
let selectedId = 0;
|
let selectedId = 0;
|
||||||
|
|
12
types/AutoComplete/AutoComplete.svelte.d.ts
vendored
12
types/AutoComplete/AutoComplete.svelte.d.ts
vendored
|
@ -35,6 +35,12 @@ export interface AutoCompleteProps
|
||||||
*/
|
*/
|
||||||
selectedId?: AutoCompleteItemId;
|
selectedId?: AutoCompleteItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify the selected item
|
||||||
|
* @default undefined
|
||||||
|
*/
|
||||||
|
selectedItem?: AutoCompleteItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the type of dropdown
|
* Specify the type of dropdown
|
||||||
* @default "default"
|
* @default "default"
|
||||||
|
@ -119,6 +125,12 @@ export interface AutoCompleteProps
|
||||||
*/
|
*/
|
||||||
hideLabel?: boolean;
|
hideLabel?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the default translation ids
|
||||||
|
* @default undefined
|
||||||
|
*/
|
||||||
|
translateWithId?: (id: any) => string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an id for the list box component
|
* Set an id for the list box component
|
||||||
* @default "ccs-" + Math.random().toString(36)
|
* @default "ccs-" + Math.random().toString(36)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue