mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 04:13:02 +00:00
feat(v11): Popover
* Breaking changes * - The `Popover` now uses a different markup. The trigger becomes a child of the component. - The new `PopoverContent` becomes an additional child of the `Popover` component. - remove `relative` property
This commit is contained in:
parent
baf33c0505
commit
d139d19524
13 changed files with 245 additions and 174 deletions
24
types/Popover/Popover.svelte.d.ts
vendored
24
types/Popover/Popover.svelte.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["div"];
|
||||
type RestProps = SvelteHTMLElements["span"];
|
||||
|
||||
export interface PopoverProps extends RestProps {
|
||||
/**
|
||||
|
@ -17,14 +17,20 @@ export interface PopoverProps extends RestProps {
|
|||
closeOnOutsideClick?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` render a caret
|
||||
* Set to `true` to render the tab tip variant
|
||||
* @default false
|
||||
*/
|
||||
isTabTip?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` render a caret
|
||||
* @default undefined
|
||||
*/
|
||||
caret?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the alignment of the caret
|
||||
* @default "top"
|
||||
* @default undefined
|
||||
*/
|
||||
align?:
|
||||
| "top"
|
||||
|
@ -41,10 +47,10 @@ export interface PopoverProps extends RestProps {
|
|||
| "right-top";
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @default false
|
||||
* Set to `false` to omit the drop shadow
|
||||
* @default true
|
||||
*/
|
||||
light?: boolean;
|
||||
dropShadow?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the high contrast variant
|
||||
|
@ -52,12 +58,6 @@ export interface PopoverProps extends RestProps {
|
|||
*/
|
||||
highContrast?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use a relative position
|
||||
* @default false
|
||||
*/
|
||||
relative?: boolean;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue