feat(popover): add Popover component

This commit is contained in:
Eric Y Liu 2021-03-19 06:34:42 -07:00
commit a3a4a02d94
10 changed files with 280 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# Component Index
> 160 components exported from carbon-components-svelte@0.30.0.
> 161 components exported from carbon-components-svelte@0.30.0.
## Components
@ -93,6 +93,7 @@
- [`PaginationNav`](#paginationnav)
- [`PaginationSkeleton`](#paginationskeleton)
- [`PasswordInput`](#passwordinput)
- [`Popover`](#popover)
- [`ProgressIndicator`](#progressindicator)
- [`ProgressIndicatorSkeleton`](#progressindicatorskeleton)
- [`ProgressStep`](#progressstep)
@ -2632,6 +2633,29 @@ None.
| focus | forwarded | -- |
| blur | forwarded | -- |
## `Popover`
### Props
| Prop name | Kind | Reactive | Type | Default value | Description |
| :----------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------- |
| open | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to display the popover |
| caret | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` render a caret |
| align | <code>let</code> | No | <code>"top" &#124; "top-left" &#124; "top-right" &#124; "bottom" &#124; "bottom-left" &#124; "bottom-right" &#124; "left" &#124; "left-bottom" &#124; "left-top" &#124; "right" &#124; "right-bottom" &#124; "right-top"</code> | <code>"top"</code> | Specify the alignment of the caret |
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
| highContrast | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the high contrast variant |
| relative | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use a relative position |
### Slots
| Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :------- |
| -- | Yes | -- | -- |
### Events
None.
## `ProgressIndicator`
### Props